-
Notifications
You must be signed in to change notification settings - Fork 636
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 R2 using CSE7759B not reporting current, active power & energy #867
Comments
quick update; I configured the POW R2 using tasmota; the same issue; voltage is shown, but everything else is zero. Since the voltage is shown, it seems to me reading the other values from the CSE7759B is not working? (indicating a possible adjustment to the sourcecode?) |
Hello, I have the same problem on a Sonoff Pow since 1.12.5. If you turn off the relay it should display the voltage. Jean-Paul |
Hi, |
@xoseperez : may be espsoftwareserial issue? |
Mmm... I think there are three different issues here:
Actually the CSE7759B chip is not supported (yet, but the other two should work fine. And I have two "R1" with 1.12.6 working fine. @jeanpaul79 do you have that setting active (the "Force reporting power values as 0 if relay is off"? |
Hello, I'm using the binary available on github. If relay is on, everything is at 0, even voltage. If relay is off then voltage is at 220V (but power is at 0 but that's normal because relay is off). I don't find the setting you are talking about? Regards |
I agree we seem to have 3 different issues. I was hoping the CSE7759B to be compatible (the fact that it is correctly reporting voltage is hopeful), pitty to hear it is not supported (yet ;-) Until then, I'll wait hoping you will find the time/opportunity to support it! (Let me know if there is anything I can do to assist.) |
I have compared the CSE7766 and CSE7759B datasheets and they are very similar. The CSE7759B is less accurate (twice as much less accurate) and it has special reset requirements and a coefficient loaded flag. But none of the difference has given me a clue on why it does not read the values. My POW R2 has a CSE7766, so I cannot test... @ServerCare would you mind update to the latest version in the dev branch and enable SENSOR_DEBUG in the sernsors.h file? Then flash your device and monitor the log via telnet, copy-paste here a few rows of data. Let's see if we can figure out what's going on. |
@cflurin can you confirm you have a CSE7766-based POW R2? Mine is also a CSE7766 and works fine... |
Hi, I used the pre_build binary esptool.py --port /dev/cu.usbserial-A50285BI erase_flash
esptool.py --port /dev/cu.usbserial-A50285BI write_flash --flash_mode dout 0x00000 espurna-1.12.6-itead-sonoff-pow-r2.bin |
@cflurin can you test building and flashing the latest version from the dev branch? I did some changes yesterday that could fix your issue... |
Trying to build the dev (first time, as I used to simply flash the binaries) but I keep bumping into: the error |
I did order a few more POW R2's, so I hopefully should be able to check more once they arrive... |
ESPurna uses this version of ESPSoftwareSerial: https://github.com/plerup/espsoftwareserial#3.4.1 |
@xoseperez
But I can't change the wifi settings. |
The same here: #879 Anyway power measuring with the latest dev version still doesn't work. |
So... I compiled & flashed the R2 with the dev build. Here's some debug output (from the debug window, as I wasn't going to put power on it while connected to terminal)
|
that was with some load connected to it; again only voltage shows. (and joule seems to count up, even with no load) Here's what I got when it was powered through my USB: |
(@ServerCare I edited your previous comment so the debug log is visible) That log is partial, it should be dumping 24 bytes with each line. Best way to do it is to use telnet (web interface debug window cannot cope with many data at once). The only almost complete line is the first one (22 bytes out of 24) and the only significant byte there for this issue if byte 20, which is 0x61. That's the ADJ byte in the CSE7766 and CSE7759B datasheets and it is telling us that the power cycle was not complete at that moment (bit 4 equals 0). But that's not bad, it simply means it had no time to complete a power cycle measurement, but is should report it in a future measurement. That bit to 0 is compatible with having voltage data but no power or current data (if power measurement is not completed power is set to 0 and current is not even checked). It will be really useful to have complete logs (several lines with 24 bytes without load and with a known load). |
I initially had it connected to the USB only, but I did not see anything in Putty. Does the device need to be swiched into a special debug mode? Secondly: I recall seeing somewhere that you should never connect the USB -and- power at the same time as that may kill your USB? The problem is that the device will only report loads when the device is connected to power... |
Instead of using the serial you can enable the telnet connection from the admin page and access the trace telnetting the device, with no physical connection between PC and the device required. |
AH of course.... I must not have had enough coffee yet... ;-) |
I hope this is more useful... sorry for the amount of data... This is a session with no load connected:
|
And this is with a small load connected;
|
How small is that load? Energy is increasing at 5J/6s, that's a less than 1W load. |
I have decoded a couple of lines and here's what I got:
Looks like at some point it stops reporting power values... I think I have to take a second look at the datasheet... |
@jeanpaul79 for R1 sonoff pow like post #894 SENSOR_POWER_CHECK_STATUS set to 0 THIS FUNCTION NOT TURN OFF the data if relay is OFF, i have solves this for version 1.12.5 and news, and have same problem for setting new password .... post #895 |
@xoseperez I think you are on to something.... it looks like the load was just too small. The fact that joules were showing an increasing number was throwing me off... The load was a label-printer and apparently it was using so little that it simply didn't show up/stopped showing up... (that's probably what you saw happening in the log). I have now given it a much larger load (a fan) and it is showing me:
It looks like my expectation of that label printer showing up was a little to much! I'm sorry for the confusion and extra work this has caused you! |
No problem, it's great to see it's working. Closing 😄 |
I have a freshly received POW R2 (rev v1.0 nov 30 2017) that has a CSE7759B measuring chip in place. The status page shows me 234 V (which could be OK) but all other values are zero.
Is my device broken, is my chip not a regular one (as I see CSE7766 mentioned) or is the firmware not reading the values?
What can I do to resolve this?
The text was updated successfully, but these errors were encountered: