MCP23017 Switch Button Type

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
przemek63
Normal user
Posts: 13
Joined: 16 Feb 2020, 16:10

MCP23017 Switch Button Type

#1 Post by przemek63 » 02 Apr 2020, 19:14

hello

Dear colleagues, is it possible to configure the "Switch Button Type - Push button active low" option in the "Switch input - MCP23017" device?

This option is available for GPIO in board configuration, but not available in mcp23017.

I want the momentary short-circuit of the mcp23017 pin to ground causing its state to change permanently and the next short circuit to return to its initial state.

just like a bistable relay.


Thank you for your time.

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: MCP23017 Switch Button Type

#2 Post by ThomasB » 03 Apr 2020, 19:59

That option is not built into the plugin. But you have described a Push-On / Push-Off switch function, which can be emulated in Rules.

That is to say, an event rule could be called each time the switched is pressed. Then a dummy var can be toggled (inverted) with each press event. The dummy var's new state can then be used in other rules or sent to your controller.

- Thomas

przemek63
Normal user
Posts: 13
Joined: 16 Feb 2020, 16:10

Re: MCP23017 Switch Button Type

#3 Post by przemek63 » 03 Apr 2020, 22:17

It's a very good idea. I think I can easily do it, but I don't know how to send the variable status to domoticz from the rules level? Can you suggest something?

Post Reply

Who is online

Users browsing this forum: No registered users and 83 guests