-
Notifications
You must be signed in to change notification settings - Fork 18
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
Pb Maj Domoticz 2022.2/2023.1 #36
Comments
looks like a python library function has changed its api from taking a string to requiring bytes. I‘ll have a look… |
Hello, have you had time to take a look at this problem? https://www.domoticz.com/forum/viewtopic.php?t=39354 Thanks |
I can‘t reproduce it, but I think I can fix it. Can you test a change once I create a pull request? |
Hello and thank you for your answer. |
I think you misunderstood me. I meant, I can do a change, but I cannot test it. So I would need someone who takes the changed file, tests it and reports back. |
Here is a link to the file mqtt.py of PR #37 that needs to be replaced, in case you're interested: https://raw.githubusercontent.com/joba-1/Tasmoticz/a219314cebff25bcf7aba97eb8170294687cd5c1/mqtt.py |
Indeed I had not understood, I will test and I will let you know. |
attached the log after the test with the us mqtt.py 2023-04-07 10:08:46.441 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096) 2023-04-07 10:08:55.251 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096) 2023-04-07 10:09:05.715 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096) 2023-04-07 10:09:15.293 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096) 2023-04-07 10:09:35.267 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096) |
looks like nothing changed??? |
Yes I am sure I have modified the Mqtt.py file ***** mqtt.old.py
***** MQTT.PY
and I reboot my PC |
Strange, I don’t understand how this Error: Tasmoticz: if 'Topic' in Data: can cause this: 2023-04-07 10:09:45.194 Error: Tasmoticz: TypeError: a bytes-like object is required, not 'str' Need to investigate further, probably next week |
This is the relevant error:
And this clearly should not happen, since the mqtt spec says a topic MUST be an utf string (and not a byte like object) see https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901107
So I consider this an error in the mqtt lib that you use (mine does not do this). |
Hello and thank you for your research Should I change broker knowing that I am on Windows 10 ? |
no, it is not about the broker (i guess). Domoticz gives plugins a python environment. This python environment must include a mqtt client library. |
Hello, I have been using TASMOTICZ latest version under windows for quite a long time but since the last update of domoticz 2022.2 or 2023.1 I have errors with the plugin.
In doubt I switched to mosquitto 2.0.15 but nothing has changed.
I went from python 3.7.4 to 3.10.7 but still the same problem.
If anyone has any idea, thanks in advance.
Attached is a log:
2023-03-09 18:29:37.210 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096)
2023-03-09 18:29:37.210 Error: (ProcessInbound) MQTT protocol violation, sending DisconnectedEvent to Connection.
2023-03-09 18:29:37.210 Error: Tasmoticz: Call to function 'onMessage' failed, exception details:
2023-03-09 18:29:37.211 Error: Tasmoticz: Traceback (most recent call last):
2023-03-09 18:29:37.211 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 183, in onMessage
2023-03-09 18:29:37.211 Error: Tasmoticz: _plugin.onMessage(Connection, Data)
2023-03-09 18:29:37.211 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 127, in onMessage
2023-03-09 18:29:37.211 Error: Tasmoticz: self.mqttClient.onMessage(Connection, Data)
2023-03-09 18:29:37.211 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\mqtt.py", line 165, in onMessage
2023-03-09 18:29:37.211 Error: Tasmoticz: topic = Data['Topic'] if 'Topic' in Data else ''
2023-03-09 18:29:37.211 Error: Tasmoticz: TypeError: a bytes-like object is required, not 'str'
2023-03-09 18:29:37.212 Error: Tasmoticz: MqttClient::onDisconnect: localhost:1883
2023-03-09 18:29:47.298 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096)
2023-03-09 18:29:47.299 Error: (ProcessInbound) MQTT protocol violation, sending DisconnectedEvent to Connection.
2023-03-09 18:29:47.299 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:29:47.300 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:29:47.300 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:29:47.300 Error: Tasmoticz: Call to function 'onMessage' failed, exception details:
2023-03-09 18:29:47.301 Error: Tasmoticz: Traceback (most recent call last):
2023-03-09 18:29:47.301 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 183, in onMessage
2023-03-09 18:29:47.301 Error: Tasmoticz: _plugin.onMessage(Connection, Data)
2023-03-09 18:29:47.301 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 127, in onMessage
2023-03-09 18:29:47.301 Error: Tasmoticz: self.mqttClient.onMessage(Connection, Data)
2023-03-09 18:29:47.301 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\mqtt.py", line 165, in onMessage
2023-03-09 18:29:47.302 Error: Tasmoticz: topic = Data['Topic'] if 'Topic' in Data else ''
2023-03-09 18:29:47.302 Error: Tasmoticz: TypeError: a bytes-like object is required, not 'str'
2023-03-09 18:29:47.302 Error: Tasmoticz: MqttClient::onDisconnect: localhost:1883
2023-03-09 18:29:57.256 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096)
2023-03-09 18:29:57.256 Error: (ProcessInbound) MQTT protocol violation, sending DisconnectedEvent to Connection.
2023-03-09 18:29:57.257 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:29:57.257 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:29:57.257 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:29:57.257 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:29:57.257 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:29:57.257 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:29:57.257 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:29:57.257 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:29:57.257 Error: Tasmoticz: Call to function 'onMessage' failed, exception details:
2023-03-09 18:29:57.258 Error: Tasmoticz: Traceback (most recent call last):
2023-03-09 18:29:57.258 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 183, in onMessage
2023-03-09 18:29:57.258 Error: Tasmoticz: _plugin.onMessage(Connection, Data)
2023-03-09 18:29:57.258 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 127, in onMessage
2023-03-09 18:29:57.258 Error: Tasmoticz: self.mqttClient.onMessage(Connection, Data)
2023-03-09 18:29:57.258 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\mqtt.py", line 165, in onMessage
2023-03-09 18:29:57.258 Error: Tasmoticz: topic = Data['Topic'] if 'Topic' in Data else ''
2023-03-09 18:29:57.258 Error: Tasmoticz: TypeError: a bytes-like object is required, not 'str'
2023-03-09 18:29:57.258 Error: Tasmoticz: MqttClient::onDisconnect: localhost:1883
2023-03-09 18:30:00.914 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096)
2023-03-09 18:30:00.914 Error: (ProcessInbound) MQTT protocol violation, sending DisconnectedEvent to Connection.
2023-03-09 18:30:00.914 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:00.914 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:00.915 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:00.915 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:00.915 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:00.916 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:00.916 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:00.916 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:00.917 Error: Tasmoticz: Call to function 'onMessage' failed, exception details:
2023-03-09 18:30:00.918 Error: Tasmoticz: Traceback (most recent call last):
2023-03-09 18:30:00.918 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 183, in onMessage
2023-03-09 18:30:00.919 Error: Tasmoticz: _plugin.onMessage(Connection, Data)
2023-03-09 18:30:00.919 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 127, in onMessage
2023-03-09 18:30:00.919 Error: Tasmoticz: self.mqttClient.onMessage(Connection, Data)
2023-03-09 18:30:00.919 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\mqtt.py", line 165, in onMessage
2023-03-09 18:30:00.920 Error: Tasmoticz: topic = Data['Topic'] if 'Topic' in Data else ''
2023-03-09 18:30:00.920 Error: Tasmoticz: TypeError: a bytes-like object is required, not 'str'
2023-03-09 18:30:00.920 Error: Tasmoticz: MqttClient::onDisconnect: localhost:1883
2023-03-09 18:30:07.208 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096)
2023-03-09 18:30:07.209 Error: (ProcessInbound) MQTT protocol violation, sending DisconnectedEvent to Connection.
2023-03-09 18:30:07.209 Error: Tasmoticz: Call to function 'onMessage' failed, exception details:
2023-03-09 18:30:07.210 Error: Tasmoticz: Traceback (most recent call last):
2023-03-09 18:30:07.210 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 183, in onMessage
2023-03-09 18:30:07.211 Error: Tasmoticz: _plugin.onMessage(Connection, Data)
2023-03-09 18:30:07.211 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 127, in onMessage
2023-03-09 18:30:07.211 Error: Tasmoticz: self.mqttClient.onMessage(Connection, Data)
2023-03-09 18:30:07.211 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\mqtt.py", line 165, in onMessage
2023-03-09 18:30:07.211 Error: Tasmoticz: topic = Data['Topic'] if 'Topic' in Data else ''
2023-03-09 18:30:07.211 Error: Tasmoticz: TypeError: a bytes-like object is required, not 'str'
2023-03-09 18:30:07.211 Error: Tasmoticz: MqttClient::onDisconnect: localhost:1883
2023-03-09 18:30:10.921 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096)
2023-03-09 18:30:10.923 Error: (ProcessInbound) MQTT protocol violation, sending DisconnectedEvent to Connection.
2023-03-09 18:30:10.925 Error: Tasmoticz: Call to function 'onMessage' failed, exception details:
2023-03-09 18:30:10.928 Error: Tasmoticz: Traceback (most recent call last):
2023-03-09 18:30:10.928 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 183, in onMessage
2023-03-09 18:30:10.928 Error: Tasmoticz: _plugin.onMessage(Connection, Data)
2023-03-09 18:30:10.929 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 127, in onMessage
2023-03-09 18:30:10.929 Error: Tasmoticz: self.mqttClient.onMessage(Connection, Data)
2023-03-09 18:30:10.929 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\mqtt.py", line 165, in onMessage
2023-03-09 18:30:10.930 Error: Tasmoticz: topic = Data['Topic'] if 'Topic' in Data else ''
2023-03-09 18:30:10.930 Error: Tasmoticz: TypeError: a bytes-like object is required, not 'str'
2023-03-09 18:30:10.930 Error: Tasmoticz: MqttClient::onDisconnect: localhost:1883
2023-03-09 18:30:17.278 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096)
2023-03-09 18:30:17.279 Error: (ProcessInbound) MQTT protocol violation, sending DisconnectedEvent to Connection.
2023-03-09 18:30:17.280 Error: Tasmoticz: Call to function 'onMessage' failed, exception details:
2023-03-09 18:30:17.281 Error: Tasmoticz: Traceback (most recent call last):
2023-03-09 18:30:17.281 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 183, in onMessage
2023-03-09 18:30:17.281 Error: Tasmoticz: _plugin.onMessage(Connection, Data)
2023-03-09 18:30:17.281 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 127, in onMessage
2023-03-09 18:30:17.281 Error: Tasmoticz: self.mqttClient.onMessage(Connection, Data)
2023-03-09 18:30:17.281 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\mqtt.py", line 165, in onMessage
2023-03-09 18:30:17.282 Error: Tasmoticz: topic = Data['Topic'] if 'Topic' in Data else ''
2023-03-09 18:30:17.282 Error: Tasmoticz: TypeError: a bytes-like object is required, not 'str'
2023-03-09 18:30:17.282 Error: Tasmoticz: MqttClient::onDisconnect: localhost:1883
2023-03-09 18:30:27.240 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096)
2023-03-09 18:30:27.241 Error: (ProcessInbound) MQTT protocol violation, sending DisconnectedEvent to Connection.
2023-03-09 18:30:27.241 Error: Tasmoticz: Call to function 'onMessage' failed, exception details:
2023-03-09 18:30:27.242 Error: Tasmoticz: Traceback (most recent call last):
2023-03-09 18:30:27.242 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 183, in onMessage
2023-03-09 18:30:27.242 Error: Tasmoticz: _plugin.onMessage(Connection, Data)
2023-03-09 18:30:27.242 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 127, in onMessage
2023-03-09 18:30:27.242 Error: Tasmoticz: self.mqttClient.onMessage(Connection, Data)
2023-03-09 18:30:27.242 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\mqtt.py", line 165, in onMessage
2023-03-09 18:30:27.242 Error: Tasmoticz: topic = Data['Topic'] if 'Topic' in Data else ''
2023-03-09 18:30:27.242 Error: Tasmoticz: TypeError: a bytes-like object is required, not 'str'
2023-03-09 18:30:27.243 Error: Tasmoticz: MqttClient::onDisconnect: localhost:1883
2023-03-09 18:30:37.250 Error: (ProcessInbound) MQTT protocol violation: Invalid message length 24 for packet type '3' (iQoS:0, topicLen:4096)
2023-03-09 18:30:37.251 Error: (ProcessInbound) MQTT protocol violation, sending DisconnectedEvent to Connection.
2023-03-09 18:30:37.252 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:37.253 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:37.253 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:37.253 Error: (ProcessInbound) MQTT protocol errored, discarding additional data.
2023-03-09 18:30:37.254 Error: Tasmoticz: Call to function 'onMessage' failed, exception details:
2023-03-09 18:30:37.255 Error: Tasmoticz: Traceback (most recent call last):
2023-03-09 18:30:37.255 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 183, in onMessage
2023-03-09 18:30:37.255 Error: Tasmoticz: _plugin.onMessage(Connection, Data)
2023-03-09 18:30:37.255 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\plugin.py", line 127, in onMessage
2023-03-09 18:30:37.255 Error: Tasmoticz: self.mqttClient.onMessage(Connection, Data)
2023-03-09 18:30:37.255 Error: Tasmoticz: File "C:\Program Files (x86)\Domoticz\plugins\Tasmoticz-master\mqtt.py", line 165, in onMessage
2023-03-09 18:30:37.255 Error: Tasmoticz: topic = Data['Topic'] if 'Topic' in Data else ''
2023-03-09 18:30:37.255 Error: Tasmoticz: TypeError: a bytes-like object is required, not 'str'
2023-03-09 18:30:37.256 Error: Tasmoticz: MqttClient::onDisconnect: localhost:1883
The text was updated successfully, but these errors were encountered: