Expression, which represents on or off

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
LAN-Opfer
Posts: 98
Joined: 03 Oct 2014 13:23

Expression, which represents on or off

Post by LAN-Opfer »

I want to have a Switch for my heating (device 5): "On" -> setpoint=21°C, "Off" -> setpoint=5°C
Therefore I created a binary Switch with "Code for action On" = "zway.devices[5].ThermostatSetPoint.Set(1,21)" and "Code for action Off" = "zway.devices[5].ThermostatSetPoint.Set(1,5)".

Now I Need a Expression which is "off" for "devices[5].instances[0].ThermostatSetPoint.data[1].setVal.value" = 5.

I know that the construct have 3 states: ON (21°C), Off (5°C) and undefined - but therefor I have no solution. Perhaps 2 Switches...

Uwe
Z-Way v2.0.1-rc18 on Raspberry Pi
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Expression, which represents on or off

Post by pz1 »

20141229 Confirmed that it is working in 2.0.0-rc7 as specified

I had hoped to do something similar with two CodeDevice using toggleButton with the expressions you suggest. Next I selected those two in a RoundRobinScene. Unfortunately I do get an error there:

Code: Select all

Type: core
Timestamp: 17/12/14-09:51
Message:
Can not init module RoundRobinScenes: TypeError: Cannot read property 'deviceType' of undefined
roundrobin.PNG
roundrobin.PNG (12.03 KiB) Viewed 6600 times
Since 29-12-2016 I am no longer a moderator for this forum
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

RoundRobinScene failure log

Post by pz1 »

Here is the log of the RoundRobin Scene failure as produced by 2.0.1-rc5

Code: Select all

[2014-12-20 11:41:27.626] [I] [core] Instantiating module 32 from class RoundRobinScenes
[2014-12-20 11:41:27.631] [I] [core] --- Starting module Round robin scene switcher
[2014-12-20 11:41:27.691] [I] [core] Notification: error (core): Can not init module RoundRobinScenes: TypeError: Cannot read property 'deviceType' of undefined
[2014-12-20 11:41:27.721] [I] [core] TypeError: Cannot read property 'deviceType' of undefined
    at _.extend.create (automation/classes/DevicesCollection.js:44:58)
    at RoundRobinScenes.init (automation/modules/RoundRobinScenes/index.js:35:41)
    at AutomationController.instantiateModule (automation/classes/AutomationController.js:254:22)
    at AutomationController.createInstance (automation/classes/AutomationController.js:388:14)
    at ZAutomationAPIWebRequest.<anonymous> (automation/webserver.js:556:44)
    at ZAutomationAPIWebRequest.ZAutomationWebRequest.handleRequest (automation/request.js:252:30)
    at automation/request.js:41:35
    at WebServerRequestHandler (automation/main.js:85:10)
Since 29-12-2016 I am no longer a moderator for this forum
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Expression, which represents on or off

Post by pz1 »

Should be fixed in v2.0.0-rc7, I have as yet to test

20141229 Confirmed that it is working as specified
Since 29-12-2016 I am no longer a moderator for this forum
LAN-Opfer
Posts: 98
Joined: 03 Oct 2014 13:23

Re: Expression, which represents on or off

Post by LAN-Opfer »

fine :-)
is it possible, to get automatic a message, when a new release candidate appears? Where could I see the changes of the new Releases?

Uwe
Z-Way v2.0.1-rc18 on Raspberry Pi
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Expression, which represents on or off

Post by pz1 »

http://razberry.z-wave.me/z-way-server
Got it from this RaZberry page(http://razberry.zwave.me/index.php?id=24), where the link is placed just before the Changelogs.
When in doubt, it is always good to check these Razberry pages ;)
Since 29-12-2016 I am no longer a moderator for this forum
Post Reply