Page 1 of 1

Can we have toggleButton in rules and/or scenes?

Posted: 11 Dec 2014 16:11
by pz1
How desirable/difficult would it be for you to add toggleButton as a device type that can be selected in logical rules or lightscenes?

The reason for asking is that I would like to set my StellaZ thermostat (heating) modes with a scheduler. That runs now fom the OpenRemote automation engine.
Via the built-in module OpenRemoteHelpers, I have made a HTTP Device toggleButton that uses the URL http://raspberryIP:8083/OpenRemote/Ther ... tMode/11/x, where x is the operation mode. Each mode would require one toggleButton.
edit20141212:Of course it can be done better with CodeDevice directly using zway.devices[11].ThermostatMode.Set(x)

I am aware it is a clumsy solution, but at least I can move forward.

Re: Can we have toggleButton in rules and/or scenes?

Posted: 13 Dec 2014 19:51
by PoltoS
We want to extend LogicalRules module to add more reasons for triggering. Currently rules are checked on change of ANY of devices mentioned in rules.

As next improvement we want to add a radion on the top:
- toggle on any device change it is currently
- toggle on scene activation

(or even allow any of them, not exclusively).

This will allow to run a scene by schedule an run logical rules based on it. Is it something you want?

Re: Can we have toggleButton in rules and/or scenes?

Posted: 13 Dec 2014 22:04
by pz1
In summary ultimately I want to tackle two situations:
  1. Set StellaZ mode at a certain time for one or more devices with zway.devices[N].ThermostatMode.Set(x) or in a Virtual equivalent of that command
  2. If a window sensor says it's open, I want to switch mode on one or more StellaZ devices
As there is not (yet?) a virtual "ThermostatMode device", I thought I could work around it with a toggleButton if that was available in the action part. (either in Rule or Scene)

Re: Can we have toggleButton in rules and/or scenes?

Posted: 14 Dec 2014 00:28
by PoltoS
We have improved LogicalRules to allow trigger by toggleButton (scenes). Please test latest rc2

Re: Can we have toggleButton in rules and/or scenes?

Posted: 14 Dec 2014 00:33
by pz1
PoltoS wrote:We have improved LogicalRules to allow trigger by toggleButton (scenes). Please test latest rc2
Just noted you were fiddling there when I looked at github. Unfortunately, I won't have time until tomorrow evening to test

Re: Can we have toggleButton in rules and/or scenes?

Posted: 15 Dec 2014 23:20
by pz1
It works nicely now. See Recipe

As I do have 10 StellaZ thermostats for which I have to support three modes, I only have to create 30 toggleButtons :geek: