-
Notifications
You must be signed in to change notification settings - Fork 43
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
Daily Energy zero #185
Comments
I now have all the inverters working after switching to HA via the HACS installation. Sees all 6 the inverters. However, two issues remain:
|
Hi, |
I see in HA that the Timzone for the ECU is set to GMT-8 while in the EMA App, it is showing Europe/Amsterdam. What could be causing this? I stil have the question as to why the Total Daily Energy and Lifetime Energy do not match between HA and ECU app or EMA Website. HA is always behind. Could the timezone be impacting this? |
Hi, For me the difference between the number is not small.
|
What interval is set for the integration? I would recommend setting it to 300. But I might have to dive deeper into this. Fact is that the daily values should not differ to much. |
It is set to 300. |
Lifetime energy shown in HA is data taken from the ECU. This same data is sent to EMA but is not being used so I assume that the EMA site uses different calculations. |
For interest sake, I just connected to the AP on the ECU with EMA MGR to check the values on the ECU-R. It seems that HA and EMA MGR lines up but EMA App (and Website) is way above. Lifetime Energy
Daily Energy
Really Strange! Which numbers should we trust? |
I have asked APS support for clarification. |
@schalkk Did you happen to receive a reply from APsystems yet? |
@HAEdwin No reply yet. Sending them another e-mail. This time specifically to EMEA Support. |
@HAEdwin Really strange! I have check using the EMA Mgr app, it shows the correct time and timezone. If I check via the port 8899 I get GMT-8, which is not correct. Is the one API call for GetRealTimeData (code 0002) collecting all the values or do you collect energy via the GetEnergyOfWeekMonthYear (code 0040)? Could they be using different timestamps (as seen by the EMA Mgr app & API) |
@HAEdwin This issue has now been sent to the APSystems programmers according to the Tech Support team. |
I suppose there was no answer from APsystems? Daily energy, timezone as well as a missing MAC address for the wireless interface are all ECU firmware bugs that have been around for a long time, no effort is being done to solve it. For the daily energy; it is not being sent to EMA (I sniffed the data), it is calculated at EMA. I have to think of a way to calculate kWH within the integration. See also #207 YC1000 and QT2 share the same protocol. In the new release you'll also see the QT2 mentioned. The difference between the lifetime energy in HA versus EMA is strange. Lifetime energy from the ECU is being sent to EMA but I guess they wanted to synchronize it with the actual data being sent to EMA and is therefor calculated at EMA. Thing is that there is a five minute interval which means that there is always a estimate... a cloud can shortly appear in front of the sun that is not picked up bij the ECU and vice versa. The push to EMA and the pull for HA are not synchronized so there always will be a difference. |
I am currently evaluating the values when using the history data read by the ECU. The daily energy value is a better match than the previously read value, so I will implement it in a beta version. |
The pre-release v1.2.31b contains an extra ECU query that introduces (part of) the use of energy history data. This is a query I previously described but was never needed (we thought). To compensate load time for the integration, I shortened the sleep-time between opening and closing the port. I also introduced the keepalive, a careful introduction to removing this sleep-time and keeping the port open. Success will depend greatly on compatibility with different ECU models and firmware. If you own an older model starting with 2160xxxxxxx ECU-R, you can even leave out the open/close functions, but does this work for other ECU models? I could make it optional in the UI settings. Anyway it should solve this issue. Please let me know if it does so that I can close the issue. |
Hi, On HA the daily energy is still 0 @11:51am and the Lifetime Energy is way lower than EMA (6.28MWh vs. 4,357.9kWh) Thanks for the effort! |
Thanks for the feedback! I noticed that EMA itself does the calculation for Today's Energy and Life Time Energy. You are on firmware version 1.3.6C with the ECU 2160xxxxx (that's the older model ECU-R without SunSpec logo on the back right?) - I'm still on firmware 1.2.25b with the same type of ECU so there's a difference also. If you enable debug logging for the integration, what does the log show? I am especially interested in the four lines of the log after "Querying ECU...". I have forgotten to specify END in the suffix. |
Hi, Debug info: |
Thanks for testing, this looks much better now. Don't forget to disable debug logging again ;) |
I'm pretty sure Today Energy's issue has been resolved for the ECU-R, ECU-B and ECU-C. I'm closing this issue, if anything pops up, feel free to create a new issue. Notice that there might still be a small difference between the ECU en EMA values. EMA does it's own calculation but is sometimes adjusted by the maintenance interaction with the ECU in the evening. That's also the reason that the Lifetime Energy is different between both the ECU and EMU. I'm not sure what the valid/true value would be. Need a arithmetician for that to give us some advise. |
@schalkk Strange, I don't think this is due to the integration right now. All the values in the debug log are set to zero so that's what is being read and displayed. The Life Time value of zero means that the ECU must have reset somehow or might have a defect. EMA calculates the Today Energy and Life Time Energy seperate from the ECU so these numbers don't always match up with HA. There are 18 people that have updated to the latest release until now. Have you powercycled the ECU allready? |
On the 21th of november your ECU status was:
At 10:03 in the morning, but still only one inverter online.
How are the panels positioned? |
Hi, Here are the latest debug after a restart of the ECU-R. 2023-11-22 13:34:11.193 DEBUG (SyncWorker_6) [custom_components.apsystems_ecur] Querying ECU... |
Upgraded to 1.2.31 and restarted HA. No change. 2023-11-22 14:42:08.424 DEBUG (SyncWorker_3) [custom_components.apsystems_ecur] Querying ECU... |
What if you install the previous version? v1.2.30. I think Firmware Version (ECU_R_1.3.6C) killed the Today Energy and History data function for the ECU-R with sunspec logo on the back. Version (ECU_R_1.3.5B and ECU_R_1.3.6A) worked well Because the values did not match and EMA calculates the values themselves based on incoming data, I think they have now removed this from the ECU. If anyone can help with how these two values are calculated please let us know. |
@schalkk I think the best option will be to calculate Today Energy and LifeTime Energy within the integration. The only disadvantage is that people will initially have to equate their Lifetime Energy to the EMA site. Yesterday I got a zero Energy Today using the history query method anyway which was corrected later but I can't find the reason for that to happen. There must be something going wrong in the firmware. |
@schalkk Currently I've added three extra sensors on DEV where I calculate the LifeTime Energy, Daily Energy and (new sensor) Hourly Energy myself to compare them to the internal values from the ECU. This will also resolve the occasional zero values. I've allready seen measurement deviations that have to do with rounding. I can imagine that this will paint a more positive picture on the EMA site over a longer period of time. I will continue the measurements. In the mean time firmware versions on the ECU have been updated so I keep that in mind. |
@schalkk There have been several firmware updates in the mean time.
A solution could be to run the first ECU query more often and look at the timestamp of the last ECU update. If it differs from the previous one, run a full query. This also argues for removing the optional interval setting and implementing a fixed interval of, for example, 200 seconds. But even then there is a chance that a query beat is skipped, so there will always be differences in measurement results. |
For me it is still about 5-7 kWh off on a daily basis. Anything generated under 5kWh does not even get registered and reports as 0 for Today energy. |
@arnovannijnatten I think there is something wrong with your ECU, try to replace it under warranty if possible. |
Hi,
Has anybody tried to retrieve data from the QT2 (3 phase / 4 Channel Micro invertor) via the ECU-R? When I do this, the system only recognizes the first of the 6 active invertors.
In the invertor_qty it does show "6".
Any pointers would be appreciated.
The text was updated successfully, but these errors were encountered: