Create a toggle switch?

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
dacwe
Posts: 14
Joined: 17 Jan 2016 02:52

Create a toggle switch?

Post by dacwe »

I haven't found a way to create a toggling switch.

For instance FGS-212 has a S2 switch that should be able to be used to drive some logic in the controller.

The "if -> then" and the "logical rule" apps can only turn on or off another switch based on a fixed condition. E.g. if a switch is on set this other switch to on.

I would like to write something like this:

Code: Select all

on(switch.any) // on or off
   toggle(another_switch);
where toggle(switch) is:

Code: Select all

if (switch.on)
   switch.off()
else
   switch.on()
Is there such an app already built?
bogr
Posts: 190
Joined: 16 Nov 2015 22:46

Re: Create a toggle switch?

Post by bogr »

I've also just started digging into this last week, but haven't found any existing solution. I'm trying to make a custom module.
dacwe
Posts: 14
Joined: 17 Jan 2016 02:52

Re: Create a toggle switch?

Post by dacwe »

So, I had to have this so I wrote this little plugin:

https://github.com/dacwe/zway-toggle

Basically copying the IfThen module and removing stuff until I had needed (and adding the any+toggle functionality).

Note, this works good for my binary switches but I need to add functionality to cover my dimmers S2 (fibaro) switch.
Post Reply