Unable to use mqtt plugin in appdaemon

I am trying to use MQTT in AppDaemon, but as soon as I add the plugin in appdaemon.yaml as follows:

secrets: /config/secrets.yaml
  latitude: 56.79189
  longitude: 14.899431
  elevation: 2
  time_zone: Europe/Amsterdam
      type: mqtt
      namespace: mqtt
      verbose: True
      type: hass

I get the following error in appdaemons error main log:

2023-05-13 23:59:04.420512 ERROR MQTT: Unable to decode MQTT message, with Traceback: Traceback (most recent call last): File "/usr/lib/python3.10/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

I tried with and without some test code in a python app file, but no difference… as soon as I insert the MQTT section in appdaemon.yaml, the error appears.

Any idea what is going on here?

Same here, since I update the appdaemon 4.4.2 that use the python 3.11.

In the meantime I found out the following: Just out of curiosity, I moved the “MQTT” part in appdaemon.yaml after the “HASS” part and since then, I stopped getting those messages… But since I also have updated the appdaemon addon, I do not know if the solution is due to the update or to the change of the order of plugins in appdaemon.yaml…

I’ve had this “MQTT error” issue for ages and generally ignored it, but recent changes to AppDaemon mean it’s now not just a single line in the appdaemon.log it’s 5 or 6.

Moving my MQTT config section to after the HASS section made no difference. Currently running latest versions of everything.

Anyone found any other solutions?