-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
powerfox integration availability check #134785
Comments
Hey there @klaasnicolaas, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) powerfox documentation |
The big question now is what makes it suddenly get 0 from the API, is anything of that reflected in the logs? ./Klaas |
The home-assistant.log file has 123 lines with homeassistant.components.rest messages. I did not activate debug logging for any integration. Snippet of the last occurrence with 0 value:
|
It looks like a timeout has occurred, but that doesn't explain why the value jumps to 0. The coordinator will raise an UpdateFailed in these situations and that's a nice way to handle it. The question is a bit what kind of data do we get from the API. |
Sound like my issue, too. But on my side it spikes to the current energy meter value of 19.000 kwh. This was the energy usage within 5 minutes based on the statistics. Really really wrong. |
I guess this happend "Empty reply found when expecting JSON data".
|
I have been running the integration on a test environment of Home Assistant for a few days now. Despite the fact that I often get a Timeout exception I can not reproduce the issue.
This is from the REST integration, what if you disable it? ./Klaas |
I will temporarily disable the REST integration and will reply Friday or Saturday. |
I can confirm this. The 0 comes from the API. Before switching to powerfox integration I integrated it using rest and had exactly the same problem. Here the way I fixed it for me - this prevented my home assistant from getting confused data. Maybe anything like this should be added to the official integration: `rest:
template:
|
@klaasnicolaas The error occurred again after disabling REST integration. Looks like the error frequency is lower than before. ![]() ![]() Snippet from home-assistant.log:
|
Could you maybe give me temporary access to your account, so I can debug more intensively? As long as I can't reproduce it, I can't really do anything more in this issue 🤷♂ You can send me an email for this (see github profile). ./Klaas |
The solution would be really simple: if the value that is received is 0, just ignore it. Only write values > 0 to the database. Example: The 0 values are not really reproducable. On some days it works perfectly and on other days like yesterdays I had 3 times a 0 value. If the 0s come, this is for all values of the counter.... |
This is a workaround with a restriction. The reset of the energy sensor value is initiated with a “0” value from the electricity meter ( |
I've first to determine in the API response that a 0 was actually sent as a value... ./Klaas |
Nice catch… that explains why I intermittently had 18.000kwh jumps within 5minutes… If a new meter is installed, it may starts at 0, but it will increase soon and than still show up… just because 0,001 is more than 0. I guess counting will be fine… worst case the statistics are missing 0.001kwh. |
Hi, have the same issues since a few days. Can confirm this issue happened last year already after a maintenance. Could that be also similar implemented here? Guess it makes sense not only for the power consumptions. Thanks |
Today zeroes came at 08:15, 09:15, 10:15 and 11:15 so I had to fix the entries every time. |
This offer still stands, without extensive testing I won't be working on a fix (how easy the fix would be). But I'm also on another similar problem and that is that the API suddenly sends a slightly lower value and then a higher like normal. Of course the state_class and long-term statistics do not like that 🤔 ./Klaas |
I keep having these 0 value issues ever other day, sometimes multiple times daily, so I used the code suggested by @EmenefHA above in my "manual" Powerfox integration. Lets see how it works. |
you have mail :-) |
I had the EXACT same timings today. Every time my counter-total (3800kWh) was added to my consumption. Expensive... |
Currently working on a fix, just need to test it thoroughly to make sure it works. ./Klaas |
The fix will be available from 2025.1.4. ./Klaas |
Kann der Fehler nicht auch mit den HT und NT Feldern auftreten? |
The problem
Thank you for the great integration unfortunately the stability of the powerfox is not very good. I do not know whether this is HW or API related but the entities
sensor.stromzahler_energieverbrauch
andsensor.stromzahler_energieeinspeisung
sometimes are showing 0 values which is bad forstate_class: "total_increasing"
.The energy dashboard will be useless for that day

What version of Home Assistant Core has the issue?
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
powerfox
Link to integration documentation on our website
https://www.home-assistant.io/integrations/powerfox
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
I switched back to my old configuration which uses workaround with availability setting e.g.
The text was updated successfully, but these errors were encountered: