mqtt domoticz/in with motion sensor
Posted: Monday 30 March 2020 14:51
Hi,
i created a dummy motion sensor, with that commands i can put the motion on or off
curl "http://192.168.0.6:8080/json.htm?type=c ... itchcmd=On"
curl "http://192.168.0.6:8080/json.htm?type=c ... tchcmd=Off"
My goal is to use mqtt. Now i would like to do the same but with mosquitto_pub command like :
sudo mosquitto_pub -h localhost -m '{"idx" : 12, "switchcmd" : "On" }' -t 'domoticz/in'
this syntax doesn't work but the message is received correctly by domoticz, i can see that in the log
020-03-30 14:50:04.363 Status: Incoming connection from: 192.168.0.6
2020-03-30 14:50:57.320 MQTT: Topic: domoticz/in, Message: {"idx" : 12, "switchcmd" : "On" }
2020-03-30 14:50:57.321 Error: MQTT: Invalid data received!
Do you know what is the good syntax to do that with mosquitto_pub ?
thanks
regards
i created a dummy motion sensor, with that commands i can put the motion on or off
curl "http://192.168.0.6:8080/json.htm?type=c ... itchcmd=On"
curl "http://192.168.0.6:8080/json.htm?type=c ... tchcmd=Off"
My goal is to use mqtt. Now i would like to do the same but with mosquitto_pub command like :
sudo mosquitto_pub -h localhost -m '{"idx" : 12, "switchcmd" : "On" }' -t 'domoticz/in'
this syntax doesn't work but the message is received correctly by domoticz, i can see that in the log
020-03-30 14:50:04.363 Status: Incoming connection from: 192.168.0.6
2020-03-30 14:50:57.320 MQTT: Topic: domoticz/in, Message: {"idx" : 12, "switchcmd" : "On" }
2020-03-30 14:50:57.321 Error: MQTT: Invalid data received!
Do you know what is the good syntax to do that with mosquitto_pub ?
thanks
regards