Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "Error: Message payload is not valid JSON on topic home/OMG_lilygo_rtl_433_ESP/LWT." #2123

Open
puterboy opened this issue Nov 27, 2024 · 0 comments

Comments

@puterboy
Copy link
Contributor

puterboy commented Nov 27, 2024

Describe the bug
I have been capturing MQTT messages for OpenMQTTGateway in a log file using the command:
mosquitto_sub -h MYHOST -u MYUSER -P MYPASSWD -t 'home/#' -t 'home-crap/#' -F %J
I noticed today that I got a couple of error messages (to stderr) of form:
Error: Message payload is not valid JSON on topic home/OMG_lilygo_rtl_433_ESP/LWT.
Since the message is invalid, I don't get a copy of the message itself in my log file.
BUT, the usual message is of form:

{"tst":"2024-11-18T17:49:38.372771-0500","topic":"homeassistant/update/64B7088A06D4-update/config","qos":0,"retain":1,"payloadlen":504,"payload":{"stat_t":"home/OMG_lilygo_rtl_433_ESP/RLStoMQTT","avty_t":"home/OMG_lilygo_rtl_433_ESP/LWT","name":"SYS: Firmware Update","uniq_id":"XXXXXXXXXXX-update","payload_install":"{\"version\":\"latest\"}","pl_avail":"online","pl_not_avail":"offline","cmd_t":"home/OMG_lilygo_rtl_433_ESP/commands/MQTTtoSYS/firmware_update","device":{"ids":["XXXXXXXXXXXX"],"name":"OMG_lilygo_rtl_433_ESP","mdl":"[\"LilyGo_SSD1306\",\"WebUI\",\"rtl_433\"]","mf":"OMG_community","cu":"http://192.168.1.111/","sw":"version_tag"}}}

I hadn't noticed such errors before a couple of days ago.
But now I get the error message every time I restart mosquitto_sub

Not sure if it related, but I got a notification yesterday in HA that "OMG_lilygo_rtl_433_ESP SYS: Firmware Update" for version 1.8.0.
Note that the last time LWT was published was 11/26/2004 11;31:00 PM (as a retained message)

Is it possible that the format of the firmware update message (which seems like it might be part of LWT) is not constructed correctly, leading to parsing errors?

Environment (please complete the following information):
OpenMQTTGateway dev on a Lilygo rtl433 ESP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant