Trying to figure out how I can send a z wave command inside a runIn handler. The return type is void so it’s not like parse.
Thanks
Simon
Trying to figure out how I can send a z wave command inside a runIn handler. The return type is void so it’s not like parse.
Thanks
Simon
I think the most common approach is to have the scheduled method call a command method.
I believe that you can also use sendHubCommand(), though I can’t find where this is documented.
Thanks Tony.
Had another play, couldn’t find a syntax that allowed me to execute a device command from within the device handler (apart from a tile action). But a little searching through the other device handler templates revealed the way to get sendHubCommand working:
def cmds = []
cmds << new physicalgraph.device.HubAction(zwave.basicV1.basicSet(value: 0x00).format())
cmds << new physicalgraph.device.HubAction(zwave.switchBinaryV1.switchBinaryGet().format())
sendHubCommand(cmds)