macxq / foxess-ha

Home Assistant & FoxESS integration. Monitor you photovoltaic installation directly from HA ☀️ ⚡️
119 stars 37 forks source link

Invalid data retrieved from Foxess Cloud #92

Open Bartolini177 opened 1 year ago

Bartolini177 commented 1 year ago

I have a problem that I only noticed after a while. The component, in my opinion, gets incorrect data from the Foxess cloud. Below are the screenshots: fox2 db1 db2

Now I don't know which value is correct. Do you also have such data?

In the monthly balance, I had a very large difference between the values ​​in the application and HA - about 30kWh.

EDIT.

Today I noticed that in the morning the "Generated Energy" value updated to 5 minutes and there was no difference between the indications in the Foxsess application and the HA. Around noon, the value started to update every 25-35min and the differences started to appear, first 0.3kWh, then 0.6kWh and this difference keeps growing. Unfortunately, the same is happening on the foxess cloud on "Statistic" chart. At this point foxess integration is not working properly and does not show correct auto-consumption. Are there any chances can fix it somehow?

vicdavery commented 1 year ago

From my understanding the figure in FoxESS app for yield includes battery power. If you have batteries and charge overnight, it is basically pointless, IMHO.

Daibutt commented 1 year ago

https://github.com/macxq/foxess-ha/wiki/Understand-PV-string-power-generation-using-foxess-ha

opeth666tczew commented 1 year ago

The same problem FoxESS F3000

Kubixii commented 1 year ago

I have noticed that a while ago but never tried to fix it. Then the integration stopped working for me for like 2 months and i didn't bother with that. After the few updates macxq made recently it started to work again so i looked on foxcloud to find a solution and i've noticed that there's no need to pull data from the daily graph and sum it up like it is now. If we switch over to monthly graph the data for daily yield showed on it is the same for each day as the one above. I went through and looked at the network traffic and found that we can just change the "reportType" to month payload in browser I forked the project and started testing. I've made a function to pull the data and added a second entity for "generated energy" for testing purpouses to be able to see the difference in ha. It worked as expected and now the data in ha is the exact same as in the Foxess app. (screen taken late evening so entity value is unknown and i made the other one pull data even if inverter is off-line for testing) 2 entities to see the difference data on month graph data on day graph

Additional value for the entity (probably doesn't need to be here if data is written into "report", haven't really checked if "report" is used anywhere else) additional value in allData Payload payload Pulling yield value for current day getting value for current day from month graph