Well when I realized that the HA plugin relies on the main Publish 
extension things clicked for me in terms of the topic names.  As far as my 
current setup, it's been solid with the changes I made.  

On Monday, July 13, 2026 at 10:08:35 a.m. UTC-4 [email protected] wrote:

> I did not mean to imply it was something you are doing.  There seems to be 
> something wrong with MQTTPublish’s plugin MQTTHomeAssistantConfig.
>
> Maybe thinking of them as two separate WeeWX extensions will help. The 
> reason they are packaged together is because MQTTHomeAssistantConfig needs 
> to know the data being published. (maybe MQTTHomeAssistantConfig config 
> information belongs at the top level instead of under MQTTPublish’s?)
>
> Because they are separate, when talking about config data like topics, 
> lwt, retain, etc.; it’s important to say which section it is in.  
>
> Your symptoms sound a lot like what I was seeing when publishing json 
> sensor data.  So, depending on how much you want to experiment you could 
> try a couple of things. 
>
> 1. Watch HA carefully. Does the wind data show available  and all other 
> unavailable when that is published? And vice versa for the other data?
>
> 2. Try publishing as individual topics.
>
> I'll try to set up an experiment with bigger gaps between my data being 
> published. 
> rich
>
> On Monday, 13 July 2026 at 08:33:06 UTC-4 [email protected] wrote:
>
>> 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/a6ea4ee7-53b8-4ad8-a423-fbb87f0c0732n%40googlegroups.com.

Reply via email to