-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Pow-P1: Day History Missing #717
Comments
So you lost the history during upgrade? |
No, I updated to v2.2.28 just after it was released and as you see above only yesterday's day value is presented. |
OK, I see. I'm trying to understand what has happened: |
Correct value is 99,47kWh and not 61kWh as presented by Pow-P1s web-ifc |
Interesting. There is a known issue with a 1-hour time shift to HA from smart meters used in Norway and Sweden that follow the HAN-NVE standard for payloads. The reason for this is that those payloads only send accumulated energy (kWh) once per hour, a few seconds after whole hour. So when that measurement arrives in HA, it will be time stamped with the incoming time, which is the hour after the measurement was done. This has proven to be quite difficult to circumvent for us, as it is HA that time stamps the message when it arrives. You will find other threads here on the subject. Since your device is a Pow-P1, you should not be affected by this, as P1 meters report accumulated energy (kWh) in each payload. So your observation is something quite different, and I am really not sure what is going on here. |
No no, sorry, that was a typo from me in my last comment. Corrected: "Correct value is 98,47kWh and not 61kWh as presented by Pow-P1s web-ifc" With that comment I wanted to highlight that in Pow-P1s several hour values were missing when the day value was calculated. I confirm what you stated: I have no 1-hour time shift problem. HA is in sync with Pow-P1 there and the history i HA is correct and complete. |
Aha... No, reading are as follows: The 16th was very cold for our part of Sweden, below -10 degrees. Could the problem be temperature related or related to the huge energy value? |
As long as I have had Pow-P1 together with HA the recorded monthly energy value has been exactly the same as on my monthly energy bill. |
No, that sounds unlikely. This is digital; it either works or it does not. We have had reported a Pow-K in Sweden that stopped working below -25°C. It worked at -23, did not work at -29. We don't know what caused that, and do not have access to test facilities that could help us find out. The suspects are the supercap or timing issues in the ESP module (although both are specified to -40°C). Your issue sounds more like something related to missing readings - for some reason. But that is more likely to be an issue with meters configured as HAN-NVE, as they only send kWh once per hour. The P1 meters send kWh in each payload. Can you check in on the GUI from time to time and see if you get any error messages (parity error or checksum error flagged in red on the top of the screen)? And also please follow-up how that Month graph evolves, compared to what you see in HA. |
Interesting stuff. How is your energy dashboard configured in HA? |
My understanding is that things are fine in HA, it is the firmware GUI that is wrong (or did I misunderstand, @nossaile ?). |
That is correct, everything looks fine in HA, but the history shown by the GUI from Pow-P1 loose values both in day- and month- history. When I entered the GUI yesterday an error message shown i red appeared for a second or two. I think it was something like "HAN FOOTER CHECKSUM ERROR" |
OK, so there seems to be an issue here (although I don't yet understand how that could give the discrepancy HA/GUI).
|
If the buffer increase did not help: Can you do a test with shorter cable? The bitrate on these meters is quite high, so your cable length might be an issue. |
"Consumption Last Month" above is also wrong. Correct value for December is 2353kWh. |
@gskjold : What do you get out of this? |
If you loose data, this is to be expected. Consumption for last month is stored when passing into a new month, and is based on consumption from the graph data. When the graph is not complete, the number will be wrong.
This sounds plausible, and in any case we should identify why this happens before drawing any conclusions.
|
Pow-P1 reboots for three reasons:
|
RSSI around -60 dBm should not be an issue, and your placement seems fine.
This is new and interesting information. I can't remember having user report something like this before. Please contact me on post@amsleser.no to arrange shipment of a replacement board to you. |
Just want to explain my silence. It’s because I test my Pow-P1 with the 30cm RJ12-cable provided by amsreader.no. Unfortunately, this forces it to be placed inside the meter cabinet (made of steel) and as a result the RSSI drops to around -80dBm. So far it looks stabile. I will keep you updated. In the meantime I have a small request of improvement connected to this: Add information in the payload about last boot or just a running number increased by one every boot to enable HA to log it and take actions like set an alarm. |
OK, I see. Please take care to position it on the front of the meter, using the enclosed ziplock pad. The signal strength is surprisingly little attenuated by most indoor steel cabinets. Outdoor cabinets is a different story, they give far more damping. -80 dBm usually works, but is "limit". Maybe you can buy a longer cable? It is a standard 1:1 RJ12 cable. Cable should not be longer than 3 meters. |
You could make a binary template sensor and check for uptime less than 120. Then you will have something indicating a boot.
|
@stigvi: Thanks, I found a variable called "up" with uptime in seconds. For some reason not automatically visible in HA GUI. |
Hi! I've lost the contents of the Energy use last 31 days (kWh) graph a few times too, lately. At least two times the last two weeks. I had some version below 2.2.27 when I upgraded to 2.2.28, and don't recall I've seen this behaviour before. The disappearance of the 31 days history seems to coincide with the last reboot. The reason for reboot is also unknown to me. Device information |
I try to read the previous messages, but don't quite understand what your thoughts are about this issue. My energy use for the preceding month ("29 days") was reset again at March 3rd. |
@andreas1974: Don’t know if your question was for me, but it looks like we have the same kind of problem. As I wrote on Jan29 my Pow-P1 reboots for three reasons:
It’s only after spontaneous reboots that I have observed the history values to be affected (month history partly reset and some calculated values are faulty (see my Jan26 comment above)). My Pow-P1 reboots spontaneous about 3-10 times per week, but the history is only affected once every two to three months (last time was in mid January). It’s no big deal to me because it’s connected to my Home Assistant system and the payloads are not affected. I have an unverified feeling that the problem is somehow temperature related. It looks to happen only when the outside temperature is below +5ͦC. Additionally; I think the trigger for spontaneous reboot could be due to poor connection in RJ12-connector on the board. |
We have been trying to find a cause for this, but are really struggling. As far as we can see there are two reports, both are Pow-P1 users - but that can be a coincidence. And you are "only" 2-3 persons that have reported this, out of around 2500 users. So it is not common. Our plan now is to first release v2.3 - and then wait for your updates whether the issue is still there, as there are quite a number of changes vs v2.2.x. If the problem then persists for you 2-3 persons, we want to replace the hardware for the one that first reports the issue with v2.3. |
You have to open the ams web page daily if you are going to see this. The reported values on {publish topic}/realtime/import/hour and {publish topic}/realtime/import/day are not affected much (or in a obvious way) about this. So out of 2500 users, my guess a lot more than 2-3 persons have this issue without knowing it. |
The code below ..... float EnergyAccounting::getUseToday() { .... should instead had a return like "return ret + getUseSinceLastHourImport();" As it is working in the current firmware, /realtime/import/day decrement a little when an import is missing for an hour. A kwh counter for the day should never be less than it was during that day. |
You are probably right, and I can assure you we would very much like to get to the bottom of this!
Thank you for the concrete proposition, @gskjold will look into it and consider testing an adjustment. |
You would still experience a decrement in that sensor, as "use this hour" is a calculated value and can deviate from the actual value. Creating a method for "getUseSinceLastHourImport" would still be calculated, and will differ from actual use over time. |
Yes, I agree on that. The calculated/estimated value can be higher than the actual value. A decreasing value is in fact a little troublesome for HA users: https://developers.home-assistant.io/blog/2021/08/16/state_class_total/ "For sensors with state_class STATE_CLASS_TOTAL_INCREASING, a decreasing value is interpreted as the start of a new meter cycle or the replacement of the meter. It is important that the integration ensures that the value cannot erroneously decrease in the case of calculating a value from a sensor with measurement noise present. This state class is useful for gas meters, electricity meters, water meters etc." Decreasing values mess things up, but I am not sure at the moment how large impact this has. Anyway, it will only be a problem for those users which is using energy accounting in HA. |
And I am not using that value in my HA because of this. I have implemented my own stuff. Which is not what I wanted, because amsreader is so close of getting this right. Edit: My solution is to ignore values that is less than previous value (except when it is expected on a new cycle for a new day). The integration error is so small that it only takes a few seconds or a minute before the increasing value as become larger than the integration error. |
Some thoughts on code to deal with this comes to mind now, I will take notes of this for a future change |
I have a new development build in #738 that may fix this. If anyone could try it, that would be great. |
For anyone who have upgraded to 2.3, have you experience this since? |
Values in the real time plot are not stored, only held in working memory, so this is the expected behavior. |
Okay, as expected then. |
From my point of view: This issue can be closed. I have not experienced any history failure since January and my PowP1 is working more stabile (a lot fewer reboots) since the v2.3ff updates. |
Day history missing, only current day shown, se image below:
![image](https://private-user-images.githubusercontent.com/119525843/297761569-5ab69f44-d184-43aa-8fd6-59eec319f505.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2MTE2MjUsIm5iZiI6MTcxOTYxMTMyNSwicGF0aCI6Ii8xMTk1MjU4NDMvMjk3NzYxNTY5LTVhYjY5ZjQ0LWQxODQtNDNhYS04ZmQ2LTU5ZWVjMzE5ZjUwNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOFQyMTQ4NDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kMTE1YzBjMTVjN2VkYTQwYmVjNTYwNGQyYTlkNmIzOGM5MDdjYTg0ZmJhZjNkNGYxZmJkYWQ3YmE2ZmI0M2RmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.ZS5805kJevHoLyM0-4nD3srTx9lCp4IYwvmVAujrXcQ)
Hardware information:
Relevant firmware information:
The text was updated successfully, but these errors were encountered: