Code Device - Code to get value

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
Tobus
Posts: 27
Joined: 31 Mar 2017 17:50

Code Device - Code to get value

Post by Tobus »

Hello,
I think I have a problem with the understanding of the 'Code to get value' functionality.

What I want to to with the code device:
-state on: My smartphone is connected to my wireless lan.
-state off: My smartphone isn't connected

So I created a new code device and added to 'Code to get value' an Python script. At the moment, the script contains only:

Code: Select all

sys.stdout.write('on')
In my understanding the code device should change the status to 'on', because the return value of the script is in this case always 'on'.

The z-ware logfile shows an new entry:

Code: Select all

[2017-04-15 13:34:50.819] [I] [core] Notification: device-info (device-OnOff): {"dev":"test return","l":[0,"on"]}
But the code device is without status (eigher 'on' or 'off')

Can anybody help me?

Thanks and best regards
Tobias
Tobus
Posts: 27
Joined: 31 Mar 2017 17:50

Re: Code Device - Code to get value

Post by Tobus »

Any idea?
Post Reply