Open jose1711 opened 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:
keepalive
$ 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:
mqtt_async.py
if lw is None: keepalive = 0
or
will
from mqtt_async import MQTTClient, config, MQTTMessage .. config['keepalive'] = 0 config['will'] = MQTTMessage('special/msg', 'bye')
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:There are two ways how to fix it:
keepalive
to 5 inmqtt_async.py
in this section:or
keepalive
andwill
manually in config: