tve / mqboard

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

Hello World example not working with Mosquitto broker #28

Open jose1711 opened 2 years ago

jose1711 commented 2 years ago

The Hello World example in https://github.com/tve/mqboard/blob/master/mqtt_async/README.md is not working with Mosquitto broker. Default setting of keepalive is 0, Mosquitto however does not support such setting:

$ mosquitto_pub -p 1883 -h HOST -t 'topic/subtopic' -m elho -u USER -P PASS -k 0                               
Error: Invalid keepalive given, it must be between 5 and 65535 inclusive.

There are two ways how to fix it: