-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solax integration occasionally returning all zeros #66912
Comments
solax documentation |
Hey there @squishykid, mind taking a look at this issue as it has been labeled with an integration ( |
I appear to have the same issue and have been looking into it. For me, it seems to happen fairly consistently at sunrise. So every morning between 6am and 6:20am, the "Total Energy" value will drop to zero, then back up to where it was previously, causing the massive spikes in solar production shown in OPs screenshot. This appears to be a bug in the inverter itself. I started logging the response body from the inverter so that I could catch it happening. Here are the logs
You can see that on all but the 06:02:12 line, the value 1144 is logged. I believe 1144 to be the total energy (114.4kwh). And of course, looking in home assistants history for the total_energy sensor, I see the same thing, 114.4kwh up until 06:02:12am, where it drops to zero, then immediately returns to 114.4kwh. I suspect that the integration will need to be modified to tolerate/ignore the incorrect data being returned by the inverter. |
From my inverter, I am unable to reproduce a few of the things mentioned in OP, but no doubt this is because we have slightly different inverters. For me, Grid frequency, pv1 power, current, voltage, ac power, output current, network voltage, todays energy, etc are all 0 while the sun is down (which makes sense). I have not noticed any random drops to zero during the day of these sensors (at least, not yet) Total energy seems to be the main problem, my solution has been to patch sensor.py to prevent the value of total energy from dropping. --- a/homeassistant/components/solax/sensor.py
+++ b/homeassistant/components/solax/sensor.py
@@ -131,10 +131,12 @@ class RealTimeDataEndpoint:
data = api_response.data
for sensor in self.sensors:
if sensor.key in data:
+ if sensor.key == "Total Energy" and data[sensor.key] == 0 and sensor.value >= 0:
+ _LOGGER.warning("SolaX inverter reported 0 for total energy, ignoring.")
+ continue
sensor.value = data[sensor.key]
sensor.async_schedule_update_ha_state() This seemed to work this morning. I'll test it for a while longer before committing it, though. |
Thanks for including the logs! I can’t look into this just right now. Once I get a chance though the logs will be a great help! |
No problem, thanks for looking into this! :) Just to update, I can confirm my patch seems to resolve the issue, most mornings I get the line in my logs, and I don't get massive spikes in my Energy->Solar production chart any more
I'll hold off on making any commits to HA though, since I'm not really sure my solution is the best way of solving it, but it is at least a temporary solution :) |
I had a similar problem today. Coincidentally (or not), the web portal is showing some alerts around the same time. |
If you like, we could continue the discussion over here: squishykid/solax#67 |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Unless I'm mistaken, this issue is not resolved. The child issues / PR is still open, can we reopen this? |
The problem
The Solax integration is occasionally returning zero for all values, including the energy.
Because the value goes to zero and back to the correct value, the Total (sum) value is wrong. This breaks the statistics calculation
This happens every one or two days.
What version of Home Assistant Core has the issue?
core-2022.2.9
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
solax
Link to integration documentation on our website
https://www.home-assistant.io/integrations/solax/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: