By using NodeRed I can send an MQTT message to topic domoticz/in to update the Temperature meter.
I wrote a Python script which transmits exactly the same message with a dummy value (444) in order to recognize it.
The problem is that this message does not update the meter.
For preventing a timing conflict I delayed the transmission of the test message by 5 seconds.
So first the message from Nodered comes in and after 5 seconds the test message comes in.
With a MQTT tool I logged the MQTT trafic.
See the attachement for the catch of the 2 MQTT messages.
They look exactly equal.
For some reason the value of 444 is never displayed on the meter.
Who can tell me why?
JSON not recognized Topic is solved
Moderator: leecollings
-
- Posts: 53
- Joined: Friday 11 December 2020 15:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands Paesens
- Contact:
JSON not recognized
- Attachments
-
- 2Temps.png (16.92 KiB) Viewed 489 times
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: JSON not recognized
Can you share the Python script and the domoticz log? When I test withwillem9136 wrote: ↑Monday 14 December 2020 8:54 For some reason the value of 444 is never displayed on the meter.
Code: Select all
mosquitto_pub -h 192.168.192.115 -m '{ "idx" : 51, "svalue" : "444"}' -t domoticz/in
If the host and/or the topic look OK in your Python script, it might be a non alphanumeric char playing tricks somewhere in the MQTT message.
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: 53
- Joined: Friday 11 December 2020 15:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands Paesens
- Contact:
Re: JSON not recognized
Here python script and a tail of the log file.
- Attachments
-
- pyred.py.txt
- (1.07 KiB) Downloaded 24 times
-
- logfile.txt
- (2.39 KiB) Downloaded 20 times
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: JSON not recognized
You use topic domoticz.in and domoticz listens to 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: 53
- Joined: Friday 11 December 2020 15:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands Paesens
- Contact:
Re: JSON not recognized
Stupid me......
-
- Posts: 53
- Joined: Friday 11 December 2020 15:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands Paesens
- Contact:
Re: JSON not recognized
Works!
Thanks a lot Waaren.
Thanks a lot Waaren.
Who is online
Users browsing this forum: No registered users and 1 guest