svrooij / sonos2mqtt

:speaker: Sonos mqtt controller. Control your speakers from your mqtt server. mqtt-smarthome insprired.
https://sonos2mqtt.svrooij.io/
MIT License
76 stars 18 forks source link

Messages on sonos/status/+ are not retained #158

Closed peti69 closed 2 years ago

peti69 commented 2 years ago

I noticed that information posted by sonos2mqtt to the topics sonos/status/+ is not retained. Is there a reason for that since messages on sonos/ have the retain flag set?

Retained messages have the great advantage that a new topic subscriber immediately has the latest status.

Any feedback is welcome.

svrooij commented 2 years ago

The topics your referring to is the artifact of how it all started. If I’m correct all the data in those topics is also in the combined status message. Why would you want to use those separated topic? If there is a good reason we can just enable retaining them, as long as it’s configurable.

The reason to not retain them is because in my opinion an app should be able to clean all topics if the user wants that. By only retaining the combined messages the amount of messages to clear would be small.

peti69 commented 2 years ago

Thanks for your answer. I will make use of combined status message which is retained.