"[email protected]" <[email protected]> writes: > The only place I use retain=true is MQTTPublish's LWT (and due to current > implementaion its 'birth' message).
I don't think it's really an MQTT rule, but all publishes to a given topic should use the same retain setting. Otherwise, after a receiver goes down/up, they can get old state. > 3. HA comes up, sends a birth message. > 4. MQTTPublish receives it and republishes the device discovery > configuration. Very good point and this sounds like a good plan. > Note, having the device discovery message published with retain=true would > also work. But, I like this better. MQTTPublish supports either. Your > choice. > I believe this is necessary because HA doesn't persist the device discovery > configuration across an outage. I think you are correct here, in that this is the best approach for how HA is. Having discovery messages with retain=true is a problem because there's no reasonable way to have them go away. Arguably HA should persist discovery messages across restarts, with some timer to expire them, and there should be a rule that they are regularly republished. I'd suggest 7.5 days to expire and daily to publish, but this is an HA enhancement proposal in the wrong forum. -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/weewx-user/rmibjcbupm3.fsf%40s1.lexort.com.
