Open mflamm opened 1 month ago
what's your installed paho-mqtt version
python -m pip show paho-mqtt
?
Thanks for the quick reply...
Name: paho-mqtt
Version: 2.1.0
Summary: MQTT version 5.0/3.1.1 client class
Home-page:
Author:
Author-email: Roger Light <roger@atchoo.org>
License: EPL-2.0 OR BSD-3-Clause
Location: /root/decode-config/.venv/lib/python3.11/site-packages
Requires:
Required-by:
MQTT interactions are somewhat time-critical. Pls test the latest version. If the error still occurs, increase MQTT_DELAY in line 198 by 0.05 steps. If that fixes it, I'll have to think of something else.
Should now work without delays, give it a try...
Thank you for your help. I tried the latest decode-config including your changes. Unfortunately I'm getting the same error message
INFO: Load data by mqtt using 'mqtts://mqtt_user:mqtt_pw@<xyz>.s1.eu.hivemq.cloud:8883'
/root/decode-config/./decode-config.py:4389: DeprecationWarning: Callback API version 1 is deprecated, update to latest version
client = mqtt.Client()
ERROR 10 (@4448): Error during MQTT data processing: MD5 mismatch
Premature exit - #10 Download error
damn, I had this error once in the past too. I have a suspicion, but I can't reproduce the issue at the moment.
Want to ask you: Can you pls test the previous commit 9ed8dff and increase MQTT_DELAY as described above if necessary? That would help to better understand the error.
I tested the MQTT_DELAY in 0.05 steps till 0.7 without any success :(
(.venv) root@raspberrypi:~/decode-config# git status
HEAD losgelöst bei 9ed8dff
Änderungen, die nicht zum Commit vorgemerkt sind:
(benutzen Sie "git add <Datei>...", um die Änderungen zum Commit vorzumerken)
(benutzen Sie "git restore <Datei>...", um die Änderungen im Arbeitsverzeichnis zu verwerfen)
geändert: decode-config.py
keine Änderungen zum Commit vorgemerkt (benutzen Sie "git add" und/oder "git commit -a")
(.venv) root@raspberrypi:~/decode-config# ./decode-config.py -s mqtts://mqtt_user:mqtt_pw@<xyz>.eu.hivemq.cloud --fulltopic tele/mytopic --backup-file Config.json
INFO: Load data by mqtt using 'mqtts://mqtt_user:mqtt_pw@<xyz>.s1.eu.hivemq.cloud'
/root/decode-config/./decode-config.py:4390: DeprecationWarning: Callback API version 1 is deprecated, update to latest version
client = mqtt.Client()
ERROR 10 (@4449): Error during MQTT data processing: MD5 mismatch
Premature exit - #10 Download error
ok, will try to reproduce the issue using a hivemq account... (could take a couple of days, pls be patient)
Sorry for delayed response. Was not able to reproduce the issue with hivemq so I add some debug output.
pls could you test commit 3aac04f with additonal --debug
parm:
./decode-config.py -s mqtts://mqtt_user:mqtt_pw@<xyz>.eu.hivemq.cloud --fulltopic tele/mytopic --backup-file Config.json --debug
Hello, interestingly enough, I only got the error once (unfortunately without debug enabled), and it worked the at least 10 times that I tried it again in order to reproduce it and to produce debug logs for you.
This is the output with a few seconds in between the executions using commit 3aac04f:
(.venv) root@raspberrypi:~/decode-config# ./decode-config.py -s mqtts://mqtt_user:mqtt_pw@<xyz>.s1.eu.hivemq.cloud --fulltopic tele/b4e8c22a-b
9d9-4a9c-9b0b-bab54686747c --backup-file Config.json.json
INFO: Load data by mqtt using 'mqtts://mqtt_user:mqtt_pw@<xyz>.s1.eu.hivemq.cloud'
/root/decode-config/./decode-config.py:4373: DeprecationWarning: Callback API version 1 is deprecated, update to latest version
client = mqtt.Client()
ERROR 10 (@4432): Error during MQTT data processing: MD5 mismatch
Premature exit - #10 Download error
(.venv) root@raspberrypi:~/decode-config# ./decode-config.py -s mqtts://mqtt_user:mqtt_pw@<xyz>.s1.eu.hivemq.cloud --fulltopic tele/mytopic --backup-file Config.json.json
INFO: Load data by mqtt using 'mqtts://mqtt_user:mqtt_pw@<xyz>.s1.eu.hivemq.cloud'
/root/decode-config/./decode-config.py:4373: DeprecationWarning: Callback API version 1 is deprecated, update to latest version
client = mqtt.Client()
INFO: Backup successful to './Config.json.json' (JSON format)
I would expect to see a documented fix here: https://www.hivemq.com/changelog/whats-new-in-hivemq-4-31/. However, nothing mentioned fits the problem I believe.
Status: I can not reproduce the issue anymore. Even with your current master state (without mqtt delays) everything works as expected. Anyway your debug feature seems to be useful for other problems in the future, maybe that's worth merging.
Thank you.
I expected something like this.
The cause of the issue is probably a timing problem. In this case the MQTT messages do not arrive in the order Theo intended and I wanted to make it easy for myself with the debug output :grin: - now I have to have a look at the logic using my brain :cry:
But the suggestion is good, I'll merge that
Describe the bug
Hi there, I'm trying to backup my tasmota configuration, running on a NOUS A1T![image](https://github.com/user-attachments/assets/174f1e06-de44-4c19-bcf8-b268b0d0eef0)
To Reproduce
Steps to reproduce the behavior:
Program parameter:
Note: User, password and the actual hostname of the mqtt broker are obscured...
Result:
Expected behavior
I'm expecting a file called
MyBackup.json
to be created in my current directoryVersion Information
System' information of your Tasmota data
Additional context