flyte/mqtt-io

Option to ignore retained MQTT messages

molnarg opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
I'm using a GPIO to trigger a button. I'm using the timed_set_ms to only pull down the otput for a short amount of time to simulate a button push. However, when the service is restarted, the retained messages will be resent from the MQTT broker, and the button is pressed.

Describe the solution you'd like
Either have an option to explicitly ignore incoming retained messages, or just ignore them when timed_set_ms is set. In those scenarios, it seems to me that it'd be undesirable to trigger the interaction on each restart.

Describe alternatives you've considered
I've checked if I can turn off retained message delivery just for this client in the MQTT broker, but Mosquitto doesn't support that. I've also checked whether I can do it on the publishing side, but in the setup I have, I can't do it (Athom Home smart home hub + MQTT Hub app).