Sometimes it happens that even though the message is reported by code.py as published, the MQTT broker does not receive it - at least according to the output from mosquitto_sub -d -t "devices/terasa/shield". For better robustness it might make sense to subscribe to the topic and verify the message was received. If not, throw an exception to retry.
Sometimes it happens that even though the message is reported by
code.py
as published, the MQTT broker does not receive it - at least according to the output frommosquitto_sub -d -t "devices/terasa/shield"
. For better robustness it might make sense to subscribe to the topic and verify the message was received. If not, throw an exception to retry.