-
Notifications
You must be signed in to change notification settings - Fork 638
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
Sonoff POW reports non zero power even with relay open #58
Comments
Original comment by Helmut Wieser (Bitbucket: fizze, GitHub: fizze): I've got a POW flashed with espurna 1.6.9 and the readings when it's idle are almost unusable. I've had it up like this for more than a day with the relay turned on and zero electrical usage. I've wired the POW in the fuse box between the breaker and the outlet. I've plugged in a watt-meter into the socket to verify the voltage, which is pretty stable. I've read somewhere that the POW actually sums up the values in flash (?), so the base values might be rubbish already. I do know C, so I'd like to help if possible. Any pointers? On a side note: nice work so far, I appreciate your efforts! |
Original comment by f-fish (Bitbucket: f-fish, GitHub: Unknown): Under 1.6.7 - I do have a few spikes, but I would not say that it is unusable. If you can not get some basic calibration done then you might have other hardware issues, let me flash to 1.6.9 see if it behaves any different to what I am happy with on 1.6.7. Later Ferdie PS did an easy OTA to 1.6.9 - everything worked as expected, will let it sit and report back on the metrics later on. |
Original comment by Helmut Wieser (Bitbucket: fizze, GitHub: fizze): Well, your graph does look a lot better. I have spikes up to 2500W when the relay is on, but idle consumers: Not sure how I calibrate the POW, when I enter values in the POWER menu on the web interface they disappear when I press "update"..? Did you make any changes to espurna? changed some #defines? |
Original comment by f-fish (Bitbucket: f-fish, GitHub: Unknown): Nope running stock pow-debug-ota. No change made other than flashing FS at the same time. Later Ferdie |
Original comment by Helmut Wieser (Bitbucket: fizze, GitHub: fizze): Funny thing is, when there is power consumption, the readings are actually pretty good. I had the washing machine on from 8:15 until 10:30. So the hardware is probably fine. Maybe there is some inductance on those wires that is picked up by the POW? |
Original comment by f-fish (Bitbucket: f-fish, GitHub: Unknown): On 1.6.9 now - can not say of it is better or not. Was wondering if it was the device rebooting - but that does not seem to be the case, I am doing the #85 hack to capture the updates on domoticz.
Clearly the device uptime is more than those semi regular patterns. Maybe it is when vcc drops below a certain point - not sure but letting it run now and logging will check if I can spot anything. Later Ferdie |
Original comment by f-fish (Bitbucket: f-fish, GitHub: Unknown): Managed to grab an event ...
We report power and energy consumption but no current ... so maybe a simple "check" of no current then power and energy is also zero ? This seems to be true for the vast majority of false reports. Later Ferdie |
Original comment by Helmut Wieser (Bitbucket: fizze, GitHub: fizze): i think there is an issue with the power calculation here. i just captured these values on my POW with idle consumers. the apparent power and cos phi do no add up. so, where is the "active power" reading coming from? |
The HLW8012 reports three different values: active power (or true power), current and voltage (RMS). With the caveat that it cannot measure current and voltage at the same time. The library that interfaces the chip switches from one to the other every 2 seconds aprox. The active power is directly related to the frequency the HLW8012 outputs in the CF pin. I would think the active power to be more credible... my guess is that sometimes it suffers from spurious readings. Apparent power is calculated multiplying RMS current and voltage (mind they are not measured at the same time) and reactive power is the other side of the power triangle: sqrt(apparent * apparent - active * active). |
Original comment by Helmut Wieser (Bitbucket: fizze, GitHub: fizze): Well, in my case the active power reading was totally wrong. We were at or around zero Watts. Even if the power readings would vary wildly between the 2 seconds those values would be shaky at best. edit: For what it's worth I also want to signal when my washing machine is ready. So I need to trigger on zero power usage after some non-zero power usage. Hence I don't need scientifically exact readings (like the HLW8012 can't give those... ;-) ). So I guess I'll tinker with the HLW8012 lib of yours and see if I can get some more reliably readings this way. |
Original comment by Nuno Sousa (Bitbucket: nunofgs, GitHub: nunofgs): Looks like we all had the same idea. I too am using a Sonoff POW on my washing machine. My intent is to receive notifications when a laundry cycle is complete. I am also having issues with reported power values being non-zero, even when the washing machine is turned off. Here's a graph of the last 24h: Both of those spikes were when the washing machine was turned off! If we end up discovering that this is a hardware issue, how about implementing a Kalman filter? |
I have just released version 1.7.0 and it has some improvements in the POW side. Basically I'm applying some logic to filter out spurious values. Not a Kalman filter but way more simple. The code is checking power every 5 seconds, I'm filtering out readings different from 0 that are surrounded by 0 readings assuming than even if you havesome power hungry appliance running for less than 5 seconds it won't sum up much. I'm not doing it in the HLW8012 library but in the ESPurna code since I though it is more like a high level (code-wise) hack. BTW: I am also using my POW in my washing machine and never had the problem since my approach was slightly more complex: I kept a 5 position ring buffer holding whether the reading on each of the last 5 minutes has been more than 100W. If the ring holds more than 2 such readings I set a flag. If the ring gets empty and the flag is set I raise a notification. |
Original comment by f-fish (Bitbucket: f-fish, GitHub: Unknown): Thanks for the Upgrade to 1.7.0 Xose, Spotted a single event on the web while the switch was off - active power 90, power factor 100, voltage 222 rest all zero. Decided to re-calibrate - reset power setting first then the normal calibration. MQTT needed to be tickled to connect - just made a root topic change, then it connected, but that was after I spotted the power issue. Will monitor and see if things look better, my power consumption is low < 50W that I am monitoring when on. Later Ferdie |
The data on the web interface is not filtered out. Those are raw values directly from the HLW8012 library. But if they are single events they get removed when averaging the minute power. I deployed this version to my POW monitoring the washer machine tonight and this is how it looks like without load. |
Original comment by f-fish (Bitbucket: f-fish, GitHub: Unknown): Ah thanks for the info on what has been fixed.... yeah did the upgrade just after 02:00 - good results, no funnies. Hmm my energy is at zero - need to go dig why. |
Great to know it's working fine for you guys. I'm closing this one. |
Original comment by izhar marinov (Bitbucket: izharmar, GitHub: Unknown): i upgraded to 1.7.1, the power reports are now much better, but I'm still seeing occasional wrong reports of tens of even hundreds of watts. Seems strange since as far as I understand the report is an average of 12 readings with some spike filtering. I am filtering the data in a openhab rule, so for on/off indications it is good enough, it is a problem for energy metering though. |
Removing milestone: 1.7.0 (automated comment) |
The power value the Sonoff POW reports is very unstable. Even with the relay opened (no current) it still reads some watts from time to time.
This has been originally reported by user @zerosub in issue #50. Moved here to track it better.
The text was updated successfully, but these errors were encountered: