I have a smart plug connected via zwave to a toon thermostat. I can control this via a command line switch. Turning the thing on and off works. But getting the status is the hard part.
When calling http://toon-ip:10080/hdrv_zwave?action=GetBasic&nodeID=5
the thermostat returns a json:
{
"value":"0xFF",
"nodeId":"5"
,"result":"ok"
}
where the value changes from 0x00 to 0xFF when turned on.
Based on the documentation found i put this in the configurations.yaml to control the smart plug and reads its status:
switch:
platform: command_line
switches:
neo_coolcam_lampjes:
command_on: '/usr/bin/curl "http://toon-ip:10080/hdrv_zwave?action=basicCommand&nodeID=5&state=1"'
command_off: '/usr/bin/curl "http://toon-ip:10080/hdrv_zwave?action=basicCommand&nodeID=5&state=0"'
command_state: '/usr/bin/curl "http://toon-ip:10080/hdrv_zwave?action=GetBasic&nodeID=5"'
value_template: '{"value":"0xFF","nodeId":"5","result":"ok"}'
But the command state doesn’t ever change the switch to on.
Because there is no error (not even in debug) I don’t know what’s going on.
Where am I going wrong?