Folks,
I guess I do not understand smartthings DTH programming. So I want to trigger a switch action on script with a contact closure status, but when my script executes it sets the byte 0 on the wrong register name. Anyone know what I am missing? I know the switch works good and uses the right naming and works.
def zwaveEvent(physicalgraph.zwave.commands.sensorbinaryv1.SensorBinaryReport cmd)
{
log.debug "zwaveEvent SensorBinaryReport1: ‘${cmd}’"
delayBetween([
zwave.basicV1.basicSet(value: 0xFF).format(),
zwave.basicV1.basicSet(value: 0x00).format(),
zwave.switchBinaryV1.switchBinaryGet().format()
],200) \ expect this to event toggle the SwitchBinaryReport status
}
It’s still triggering SensorBinaryReport…
4352da65-f9e0-496a-86bf-cad63d37c505 1:42:17 PM: debug parse cmd: ‘SensorBinaryReport(sensorValue: 0)’ to result: '[[‘name’:‘switch’, ‘value’:‘off’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Doorbell’, ‘descriptionText’:Doorbell switch is off]]'
4352da65-f9e0-496a-86bf-cad63d37c505 1:42:17 PM: debug zwaveEvent SensorBinaryReport: 'SensorBinaryReport(sensorValue: 0)'
4352da65-f9e0-496a-86bf-cad63d37c505 1:42:17 PM: debug parse cmd: ‘BasicSet(value: 0)’ to result: '[[‘name’:‘contact’, ‘value’:‘closed’, ‘descriptionText’:Doorbell is closed, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Doorbell’]]'
4352da65-f9e0-496a-86bf-cad63d37c505 1:42:17 PM: debug Closed sensor value event: 0
4352da65-f9e0-496a-86bf-cad63d37c505 1:42:17 PM: debug zwaveEvent BasicSet: ‘BasicSet(value: 0)’
Thanks
Corey