Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.
MIT License
460
stars
157
forks
source link
In case of reconnection to MQTT broker subscriptions are lost #333
Describe the bug
When connection to the MQTT broker is lost for a short time, mqtt-io reconnects to the broker and is able to publish again. But the subscriptions to topics which were made when mqtt-io first connected to the broker, are lost. That means, that after the reconnection mqtt-io does not react anymore when requests are made using those topics.
Expected behavior
The subscriptions should be repeated directly after the reconnection.
Error messages and traceback
Paste any error messages and Python traceback if applicable.
Config
Hardware
Raspberry Pi 4
Connected hardware: custom testboard
System:
OS: Raspbian
Python version: 3.7.3
User you're running as: pi
Using a virtualenv?: no
Additional context
I have implemented a solution for this problem and would like to commit it.
Describe the bug When connection to the MQTT broker is lost for a short time, mqtt-io reconnects to the broker and is able to publish again. But the subscriptions to topics which were made when mqtt-io first connected to the broker, are lost. That means, that after the reconnection mqtt-io does not react anymore when requests are made using those topics.
Expected behavior The subscriptions should be repeated directly after the reconnection.
Error messages and traceback
Paste any error messages and Python traceback if applicable.
Config
Hardware Raspberry Pi 4
System:
Additional context I have implemented a solution for this problem and would like to commit it.