All I can say is that the data was publishing to my mqtt server I could see the data from the HA plugin in Rich's extension, but it wasn't making it into HA. I found information in an HA discussion that enabling retain and lwt is a best practice in this case so when I did, it started working. I didn't see anything in the HA logs, but that could be that I need to set the logging to a debug level to see what's going on.
On Monday, July 13, 2026 at 6:54:32 a.m. UTC-4 Greg Troxel wrote: > "[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/0a955914-9d4c-43ae-8029-369ea61ba590n%40googlegroups.com.
