I had a Sonoff POW R2 lying around for some time and finally i found some use for it - monitoring my water pump consumption, warning when the pump runs longer then expected (possible tap left open in the garden somewhere, etc).
I flashed the Sonoff with ESPhome, did some tests with a lightbulb, set up some automations in HA, everything working OK for serveral hours, until I have decided to install it on its intended location, when the issues started:
relay started to turn off and on by itself, every 17-18 seconds. so relay was on, then after 17 seconds switched off briefly, stayed on for 17 seconds then back off
no connectivity via web interface or home assistant, although i could see it on the router with an IP address
no falback AP showed up from the sonoff
So I moved back the Sonoff into my office and hooked up to wall socket for observation. at first everything seemed alright - wifi connected, relay on, but after a few minutes the relay started to restart every 17 seconds and wifi connectivity got lost.
Looking into the ESPHome logs this is what I saw
[W][cse7766:080]: CSE7766 reports abnormal hardware: (0xF1)
[W][cse7766:081]: Coefficient storage area is abnormal.
Any idea why is this happening? I think the 17 sec interval would be a good start for the investigation
ESPhome config attached below (snatched it off a github page and modified slightly):
I’m impressed with all the features you put in your YAML - mine is way simpler than that. Now I want yours.
The relay clicking on and off sounds like the device is rebooting. Maybe monitor it in the Logs view to see what is happening.
From my own experience, way back in 1.13-ish, I had a problem with an ESPHome device that would lose connection to WiFi and get upset. I solved it by assigning it a static IP. As a result, I now always assign a static IP even though it’s probably not necessary. So maybe that’s something you can try too.
the problem is I can’t monitor the logs as the connection is lost when the device starts rebooting (appparently). wifi connectivity is not an issue, tried several locations near the AP, with the same result.
after thinking about it heavily my plan is the following:
try to power the board from UART to see if I get any useful logs
dumb down the YAML to a bare minimum to see if it helps
Okay but before you go overboard, do try @nickrout’s solution because he’s very knowledgeable about this platform and has been a great help to me in the past. If he said it, I trust it.
sure, will give it a try, but your config uses the same board as mine, and it was working a day before without any issues to i don’t have too high expectations
That’s true, but that doesn’t necessarily mean my POWR2 has the same ESP chip as yours. Sonoff are constantly tweaking.
Although, you do say yours was working on the test bench, but then not after you deployed it. Is there a chance you wired it wrong when you installed it, and maybe cooked it a little?
for some reason i am not able to get any logs from the device via USB. actually, when the POW R2 is connected via USB and trying to access the logs my dekstop compter become unusable, with random mouse movement and clicks, that disappear the instant i pull the USB out of the computer