Working on a battery device driver, and ran into something I don't get. I'm quite certain it is something I'm missing/not understanding but it is eluding me...
This is how I used to do the command list building and sending. This works when said battery device is USB powered, but DOES NOT work when it is battery powered (when battery powered I'm doing it in the wake notification method):
def cmds = []
cmds << secure(zwave.configurationV2.configurationSet(scaledConfigurationValue: 1, parameterNumber: 1, size: 1).format())
cmds << secure(zwave.configurationV2.configurationGet(parameterNumber: 1))
delayBetween(cmds, 500)
This always works:
def cmds = []
cmds << sendHubCommand(new hubitat.device.HubAction(secure(zwave.configurationV2.configurationSet(scaledConfigurationValue: 1, parameterNumber: 1, size: 1)), hubitat.device.Protocol.ZWAVE))
cmds << sendHubCommand(new hubitat.device.HubAction(secure(zwave.configurationV2.configurationGet(parameterNumber: 1)), hubitat.device.Protocol.ZWAVE))
delayBetween(cmds, 500)
I really don't get why the 1st version doesn't work?