hoymiles icon indicating copy to clipboard operation
hoymiles copied to clipboard

Always needs a restart after restarting Home Assistant

Open umrath opened this issue 1 year ago • 8 comments

Whenever I restart Home Assistant for whichever reason, the Addon will stop to provide data to Home Assistant.

Workaround: This can be cured by restarting the Addon itself.

umrath avatar Jul 20 '22 10:07 umrath

@umrath How long you wait? Are you aware that data is send every 15 min?

Cosik avatar Jul 20 '22 10:07 Cosik

It could very well be that I do not wait long enough.

Would it be an option to display cached data in case of a restart (until new data is available). Alternatively, the addon could pull data on HA restart (as it does on addon restart anyway).

umrath avatar Jul 20 '22 12:07 umrath

Just tested it. Restarted HA at 21:00. Now it's 21:20 and I still see the entities as unavailable.

21:42 - now they are back.

So, looks like it does recover eventually. But I do not think that it should work this way.

umrath avatar Jul 20 '22 19:07 umrath

So how this should work? This base on mqtt messages, and don't have any response from HA that it was restarted. If we want to make some ping it will also increase needed resources. We reduce used resources a lot during last code refactor.

Cosik avatar Jul 21 '22 07:07 Cosik

How do others (zigbee2mqtt) to it? Is there no way to listen for events, like a broadcast "I'm back!"?

I'm just a user and not into this topic on a technical level. I can only describe how the current way feels to me and how I would like it to act.

umrath avatar Jul 21 '22 09:07 umrath

I'm not sure if zigbee2mqtt is good example. It works in different way. Please se #84 for some solution. Implementation will take some resources and knowledge which I don't have now.

Cosik avatar Jul 22 '22 06:07 Cosik

Having the same problem… isn‘t it possible for the addon to wait 1min before it fully starts? Maybe that would solve the problem? I think maybe the addon starts before the mqtt server startet and that’s the problem?

ZaphodB72 avatar Feb 16 '24 22:02 ZaphodB72

@ZaphodB72 did you wait a 15 min? No one of you provide any log files. Addon is waiting for mqtt broker and try to connect to it in infinity loop which will be stop when connection is done. Data is send in 15min period due to refresh rate of Hoymiless cloud so it is out of sense to send it more often. So if addon will start earlier that homeassistant container start subscribe topics on mqtt you will need to wait 15min till addon will send new data.

I have no idea if this issue is different that behavior of your instances because no one of you was able to prepare good ticket and provide nought data to analyze it.

Cosik avatar Feb 17 '24 09:02 Cosik