-
Notifications
You must be signed in to change notification settings - Fork 70
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
M1 EXPORTED/IMPORTED KWH resetting to zero periodically #60
Comments
@ministryofsillywalks yeah sometimes we get bad data back from the inverter. #44 should fix it once upstream. |
This should now be fixed |
A new release hasn't gone out yet but the code to fix the 0 values has been merged into master. Just double checking if you have got the latest code? I'm not sure about the stats issues you are facing, I've been looking into this as well as I got some bad battery charged stats in my history which is impacting my long term stats as well. I believe you can delete the entity from the database and it will rebuild when new stars are added. |
hm... I had some issues whenever I deleted somehting from the stats table... The strange thing here is, that whenever I had this in the past, recalculating the SUM did work - and the graph was then OK (until the next bad reading / connection loss, or whatever) Only this time, after recalculating the sum, the issue came back with the next calculation. |
I don't believe that issue would be coming from this integration from my understanding of the code. There might have been a change in the core. |
@ChristophCaina |
only recalculating and editing manually... :-( I did this right now - trying to fix the values, but since my solar installation did start to produce a small amount of energy, the dashboard graph is now showing some values in the wrong "direction" ... honestly speaking: |
What are you editing the db with out of interest? |
Agreed - the energy dashboard is definitely pretty fragile at the moment - but it's still a young feature so some growing pains are kinda to be expected. These issues need to be reported against home assistant core though. I believe we've now solved the "zero problem" with the energy stats from this integration - zero is not tolerated as a valid value for either the inverter total generation nor the import / export meters. So as long as you have the latest version of this integration, any problems observed must be coming from the core. |
Currently, I am running Version 1.5.0 of this integration. |
Out of curiosity, what's your integration polling interval and how are you connecting to the inverter? |
? Polling Interval is just as the default setting of the app... don't remind the frequency. |
It looks like the default is 30 seconds. Can I suggest try changing that to 60 seconds? |
hm... should that change anything? |
So the reason I suggest 60 seconds is because that's what I use and have not seen any of these problems with meters or energy dashboard (although I am using my fork, because I have multiple inverters this fork does not yet support, but my fork is also still back on the previous modbus library). My M1 kWh values have never reset or returned zero. It makes me wonder if some of the data problems are from polling too fast. I'm not sure how robust the inverter modbus/tcp is for frequent polling, after all it only supports one connection at a time. |
Actually the modbus library might still be the same in my fork, for some reason I thought that change was merged here but it doesn't look like it was yet. So the major difference then is polling interval and all the extra stuff for control support (I don't have batteries). |
#44 Is now released in version 1.5.1. With this fix, the zero flats should be skipped. |
hm... can you please check the exact time-frame when this issue happened? nearly 30 secs, which is the default setting in my case: and - sure. both sensors have been affected. |
If you're willing to try a 60 second or longer interval before you try the patched version, I'm still curious if it's a polling frequency related thing or something else. I'd try it myself, but since I haven't had this issue I don't want to risk getting zeros in my data. |
Thanks :)
I would prefer the Update. |
Ok. I won't do any further digging since hiding the problem is the preferred solution. |
@WillCodeForCats I have faced issues with higher frequency polling (5 seconds) but I run mine on wifi a decent distance from my router. I have found that #39 solves this issue as the open/close of connections are handled differently. However this is a different issue to #60 so maybe best discussed in another issue like #37 |
Rapid polling ideally should hold the modbus/tcp connection open, but I don't know if HA is even capable of that. The inverter only supports a single TCP connection at a time, which gives me gut feeling that connection setup/teardown too often is asking for trouble. Getting random zeros and just masking it, well, I don't like it because the problem still exists. I'd rather have accurate data than masked bad data, but that's just me and I guess the typical HA user doesn't care about that level of accuracy. The inverter can certainly handle real time polling i.e. make a simple client with libmodbus, loop and sleep between reads, but the connection is always held open so there's no setup/teardown overhead between read cycles. |
Just for clarification: This are not 0 (zeroes), this are nulls (no value) So it could be either meter either inverter issue with rs485 communication. It's for sure not an integration problem, as I run for a year on Domoticz with my own integration. 4 month using Perl script, then switched to Python. So the only thing we can do is to handle this fault by ommiting 0 and null while it comes from SE |
Hi, And NULLs could be from an connection / polling issue... like described in #50 |
OK, I cannot verify now, as my HA recorder is set to 2 weeks storage (long term is in Influx) |
FYI, I have cleared historical data by deleting the entry from the states, statistics_meta, statistics_short_term and statistics tables. The trick was to lookup the meta_id in statistics_meta and then delete relevant entries from statistics_short_term and statistics. I just deleted everything so it could start again fresh, but I suppose you could try and manually remove the incorrect figures and update the sums etc. |
Hi @nerfherder, in the past, updating the sum has worked well for me (while I've used the solar edge api integration)... but when I tried it this time - the sum was recalculated with the wrong value on the next statistic calculation. I am still not sure, if this is related to a change in one of the recent core updates or not... haven't got any further reply or comment on my raised issue on the core repository. But I've updated this integration now and will observe the issue :) |
can be closed |
I have an issue where my sensor.solaredge_m1_exported_kwh & sensor.solaredge_m1_imported_kwh are occasionally resetting "0"
This is somehow happening at pretty similar times:
20:22
06:22
20:15
06:15
It happens to both sensors however not to any other sensors from the modbus integration.
I have no idea whats going on. HA doesn't reboot at these times and also all other network activity seems normal.
These "0" values of course royally screw up my energy dashboard
Any idea whats going on?
The text was updated successfully, but these errors were encountered: