Receive Z-Wave Command and reset variable

Posted on
Sat Aug 26, 2017 4:55 am
koburg offline
Posts: 167
Joined: Jul 27, 2017

Receive Z-Wave Command and reset variable

HI

Since im new yo photon I want to make this kind off script to reset a variable.

1. when the wave interface have not received any command from device in x sec then reset variable x
this is the command I want to check for.
Code: Select all
0x01 0x0C 0x00 0x04 0x00 0x19 0x06 0x60 0x06 0x01 0x30 0x03 0xFF 0x43


I found this script in the wiki but how do I put it together to the z wave command instead. it is important that it is the code form above since the
z-wave device is not updating its status like normal in the UI

scipt from wiki:
Code: Select all
Turn on a light only if it's been off for longer than 1 minute:

from datetime import datetime
lamp = indigo.devices[91776575] # "Hallway light"
timeDelta = datetime.now() - lamp.lastChanged
if not lamp.onState and timeDelta.seconds > 60:
        indigo.device.turnOn(91776575)

Posted on
Sat Aug 26, 2017 4:51 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Receive Z-Wave Command and reset variable

Rather than scripting this, have a look at kmarklew's Timed Devices plugin.

It can do exactly what you want - we're using it for motion sensors whose batteries have died; if they don't update in 12 hours, they send me a message so I can go and check them.


Sent from my iPhone using Tapatalk Pro

Posted on
Sat Aug 26, 2017 7:21 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Receive Z-Wave Command and reset variable

howartp wrote:
Rather than scripting this, have a look at kmarklew's Timed Devices plugin.

It can do exactly what you want - we're using it for motion sensors whose batteries have died; if they don't update in 12 hours, they send me a message so I can go and check them.


Actually, the plugin isn't good for this since it only notices changes in device state, not heartbeat. But then again, this is a perfectly logical addition to the plugin (which I could use myself). I'll get something whipped up in a day or so.

Posted on
Sun Aug 27, 2017 1:04 am
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Receive Z-Wave Command and reset variable

Thanks looking forward to .

Posted on
Sun Aug 27, 2017 12:02 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Receive Z-Wave Command and reset variable

Released. The plugin thread is here: viewtopic.php?f=134&t=18785

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 10 guests