Doing some further research, and coming across this post, I modified the methods to the following:
def on() {
log.debug "Turning Device On Programatically"
def zwaveCmds = [
new physicalgraph.device.HubAction(zwave.basicV1.basicSet(value: 0xFF).format()),
new physicalgraph.device.HubAction(zwave.basicV1.basicGet().format())
]
sendHubCommand(zwaveCmds)
if (( null != prefAutoTimeout ) && ( 0 != prefAutoTimeout )) {
log.debug "Activating Automatic Timeout At ${prefAutoTimeout} seconds"
runIn(prefAutoTimeout, off)
}
}
and
def off() {
log.debug "Turning Device Off Programatically"
def zwaveCmds = [
new physicalgraph.device.HubAction(zwave.basicV1.basicSet(value: 0x00).format()),
new physicalgraph.device.HubAction(zwave.basicV1.basicGet().format())
]
sendHubCommand(zwaveCmds)
}
Now, this does appear to work but it strays away so much from the code in the templates, and also the code that many of the other device handlers use that it doesn’t feel right…
So my follow up question is whether or not the re-writen methods are acceptable or am I doing something completely wrong?
Thanks again,
Jon