safepay / sensor.fronius

A Fronius Sensor for Home Assistant
MIT License
80 stars 31 forks source link

Problems losing entities #34

Open Tovrin opened 4 years ago

Tovrin commented 4 years ago

I've been having problems with the integration losing the entities ... in that they become unavailable.

I can fix the problem removing the entities, removing the integration from the config, rebooting, re-inserting the config back again and the rebooting again ... a painful process. Occasionally that doesn't work and I need to rename the integration so it creates brand new entities, losing all my history. I'm not sure if there's a better way, but it's the only way I know how to fix it.

It seems to happen on a complete reboot of the server or when patching Home Assistant. It occasionally happens on a soft reboot. It never used to be unstable, but I think it may be an issue with later patches breaking it.

nilrog commented 4 years ago

I haven't seen that problem and I have been running with this code since I submitted the latest changes. I do not use the bleeding edge HA though. I am always running one major release after the current one because I do not have time to deal with all the issues that happens in every release. So I am currently using the latest 0.109.x version and will go to 0.110.x when 0.111.0 is released.

And I do restart HA at times since some changes require restarts. But I try to perform those updates "after dark" when the inverter is not producing...but it is logging 24/7 and all the sensors keep on working.

To see if we can figure out what you are experiencing we need more info. Can you post this info and answer the questions:

Tovrin commented 4 years ago

Config: `- platform: fronius_inverter ip_address: name: power_units: kW powerflow: true smartmeter: true monitored_conditions:

Not sure how to get the logs. I can't seem to find any. IF you could point me in the right direction?

I'm currently running Home Assistant 0.110.4 on top of HassOS 4.9 and supervisor 227

I have a smart meter running, so the inverter is running 24/7.

I allocated some more memory to the HA VM last night (up to 2G now) and it's running so much better whereas beforehand it was running like a dead dog. I'm wondering if that may have been some of my issues. I'm just trying a gratuitous reboot to see if that upsets it. I'll let you know.

Edit: After a complete reboot, with more memory, it seems to be behaving itself. I noticed last night that I started to get hangs and process crashes where something was running out of memory. It hummed along quite well before on 1G, but maybe the latest builds require more? I'm not sure.

I'll keep you posted.

nilrog commented 4 years ago

Ok, let's cross fingers hand hope that was it :) I couldn't see anything strange in your config at least.

I have my HA running in docker on a Synology NAS. I don't remember when I changed, but it wasn't too long ago, the memory allocation to 2G. Before that I had 1.5G. Never really noticed that it has been memory constrained. But I have probably always kept it above what it has needed.

Deez73 commented 4 years ago

I have been experiencing a very similar issue, but running on a rpi3 ... after a HA restart (doing other HACS updates) the entities were not available and the sensor not working. What solved the issue was rebooting the host instead of just HA. Supervisor -> System -> Reboot (host system)