Can we have toggleButton in rules and/or scenes?

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Can we have toggleButton in rules and/or scenes?

Post 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.
Since 29-12-2016 I am no longer a moderator for this forum
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

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

Post 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?
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

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

Post 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)
Since 29-12-2016 I am no longer a moderator for this forum
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

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

Post by PoltoS »

We have improved LogicalRules to allow trigger by toggleButton (scenes). Please test latest rc2
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

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

Post 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
Since 29-12-2016 I am no longer a moderator for this forum
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

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

Post 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:
Since 29-12-2016 I am no longer a moderator for this forum
Post Reply