tve / mqboard

Micro Framework for MicroPython Boards Managed via MQTT
MIT License
120 stars 18 forks source link

mqview: dies if message contains non-utf8 #13

Open tve opened 4 years ago

tve commented 4 years ago
  File "/home/src/esp32/mpy-mqtt/mqboard/view.py", line 24, in on_log
    m = msg.payload.decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

It's sometimes convenient to use something like --topic board/location/# to see whether a seemingly dead board sends anything and the mqb messages sent by the watchdog start with 0x80 causing the above error.