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
mqtt domoticz/in with motion sensor
Moderators: leecollings, remb0
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: mqtt domoticz/in with motion sensor
Try with
Code: Select all
mosquitto_pub -m '{"command" : "udevice", "idx": 12, "nvalue": 0 }' -t domoticz/in
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 12
- Joined: Wednesday 01 June 2016 22:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: mqtt domoticz/in with motion sensor
hi ok thx working now
one last question: is it possible to add the battery level in a "dummy motion sensor" devices ?
regards
one last question: is it possible to add the battery level in a "dummy motion sensor" devices ?
regards
Who is online
Users browsing this forum: No registered users and 1 guest