I'm running a Hometroller Zee S2 (Linux) and need some help with a script. I want to write the date/time of the last motion detected with my kitchen motion sensor to a device.
HSTouch does not display the 'last change' so I'm wanting to create a device with this information in it so I can see when the motion sensor last tripped.
What I need is help with the (sudo) VB script below. The script will get triggered on a motion detector change to 'motion detected' and I will not retrigger the script for five seconds:
sub main()
Dim last_change As Date
last_change = hs.DeviceLastChange("kitchen motion")
hs.writelog(last_change) ' need help with this
hs.??? 'need help writing the last_change to a device
end sub
Is this the best way to go about this?
Thanks for the help!
BSR
HSTouch does not display the 'last change' so I'm wanting to create a device with this information in it so I can see when the motion sensor last tripped.
What I need is help with the (sudo) VB script below. The script will get triggered on a motion detector change to 'motion detected' and I will not retrigger the script for five seconds:
sub main()
Dim last_change As Date
last_change = hs.DeviceLastChange("kitchen motion")
hs.writelog(last_change) ' need help with this
hs.??? 'need help writing the last_change to a device
end sub
Is this the best way to go about this?
Thanks for the help!
BSR
Comment