Sensor
Posted: Saturday 20 May 2017 8:08
I have created a script (via ping) to detect my LAN printer is on or off. I cannot enable/disable the printer so it is only a sensor.
Script send commands van JSON
However in Domoticz I can toggle the 'sensor'. Which is not possible since it is a sensor not a switch. I found the option to protect it but than it is impossible to toggel it via JSON:
How can I prevent Domoticz to toggle the sensor?
Script send commands van JSON
Code: Select all
pi@raspberrypi:~ $ curl "http://pi:[email protected]:8080/json.htm?type=command¶m=switchlight&idx=10&switchcmd=On"
{
"status" : "OK",
"title" : "SwitchLight"
}
Code: Select all
pi@raspberrypi:~ $ curl "http://pi:[email protected]:8080/json.htm?type=command¶m=switchlight&idx=10&switchcmd=Off"
{
"message" : "WRONG CODE",
"status" : "ERROR",
"title" : "SwitchLight"
}