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

Several MQTT messages are unable to decode #352

Closed
anandv85 opened this issue Sep 28, 2024 · 1 comment
Closed

Several MQTT messages are unable to decode #352

anandv85 opened this issue Sep 28, 2024 · 1 comment

Comments

@anandv85
Copy link

anandv85 commented Sep 28, 2024

Problem/Motivation

The log shows several messages were not decoded due to a "UnicodeDecodeError".

Expected behavior

The log do not show any MQTT decode error messages. Doing so, a potential message is from one device to another device is getting discarded.

Actual behavior

The log is showing the MQTT decode error messages.

Steps to reproduce

  1. Install Appdaemon Add-on.
  2. Install the "Qolsys Gateway - qolsysgw" through HACS.
  3. Configure the Appdaemon to run the Qolsys Gateway.
  4. Observe the Appdaemon log shows several error messages.

Log

2024-09-28 20:16:31.285018 INFO AppDaemon: New client Admin Client connected
2024-09-28 20:16:52.383142 INFO MQTT: Unable to decode MQTT message
2024-09-28 20:16:52.384120 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

2024-09-28 20:16:52.469429 INFO MQTT: Unable to decode MQTT message
2024-09-28 20:16:52.469850 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

2024-09-28 20:17:11.707325 INFO AppDaemon: Client disconnection from Admin Client
2024-09-28 20:17:22.250166 INFO MQTT: Unable to decode MQTT message
2024-09-28 20:17:22.251115 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/mqtt/mqttplugin.py", line 271, in mqtt_on_message
    payload = payload.decode()
              ^^^^^^^^^^^^^^^^
.
.
.

Version

image

@anandv85
Copy link
Author

anandv85 commented Sep 28, 2024

This is a duplicate issue which was already reported here #350 and it was open. Also reported in AppDaemon/appdaemon#2103. Hence closing this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant