Page 1 of 1

switch without gpio

Posted: 11 Sep 2019, 07:45
by Sigalou
Hello

when I use a classic swith with a gpio, for example:

Jus: Ampoule and GPIO: GPIO12
For ON: gpio,12,1
For Off: gpio,12,0
To use in rule: if [Jus#Ampoule] = 1

If I have no more GPIO available, and I want to use the switch name directly, I do not know how to change the state:

Jus:Ampoule and GPIO: None
For ON: ?????????
For Off: ?????????
To use in rule: if [Jus#Ampoule] = 1

Can you help me ?
Thank you

Re: switch without gpio

Posted: 12 Sep 2019, 18:36
by budman1758
I don't know of a way to change the state of a GPIO that does not exist.
Maybe try using a dummy device to change values with rules?

Re: switch without gpio

Posted: 12 Sep 2019, 19:44
by Shardan
Are you talking about inputs or outputs?

Switch inputs are limited as an input needs a task - tasks are limited to 12.
Up to 12 inputs can be used with two PCF8574 or one MCP23017
(8 port and 16 port IO expanders)

Outputs are not limited by tasks as they don't need a task at all, they are just
driven by a command.
You can stack up to 8 MCP23017 by setting different addresses.
This gives 8 x 16 = 128 outputs.

Re: switch without gpio

Posted: 13 Sep 2019, 19:34
by Sigalou
budman1758 wrote:
12 Sep 2019, 18:36
I don't know of a way to change the state of a GPIO that does not exist.
Maybe try using a dummy device to change values with rules?
Yes, that's it, I need a dummy device.
I have no more GPIO available (it's on sonoff4chpro, so the gpio are taken by relays and buttons)