I have a Sonoff basic flashed with Tasmota and communicating with OH via mqtt. The switch is used to control a lamp in my living room and has worked flawlessly for the past 8 months.
The issue happened last night when the lamp turned off, no OH rule or other commend, it just turned off. I used Alexa to send a command and was able to turn the light back on but after a few minutes it turned back off. Nothing in the OH log to indicate the lamp being commanded to turn off. I used BasicUI to turn the light back on and after a few minutes, same thing, it turned off. This time I left it off and noticed, after a few minutes, the lamp would do a quick flash like it was trying to turn on. This happened twice before I unplugged the lamp and checked the switch to see if it was maybe overheating. It wasn’t hot and looking at the switch I can see nothing to indicate an issue.
As mentioned above nothing in the logs to indicate it’s an OH issue but thought I would post this to see if others have experienced something similar, and if so what was the solution. I have several spare Sonoff’s but hate to just toss one if there’s a fix.
EDIT: I also check the Sonoff web console for anything suspicious but everything looked normal.
Thanks in advance for any suggestions.
I would open up the web interface to it, and keep an eye on the console. This should tell you what’s occurring internally - whether it’s receiving a command, or it thinks the switch is activated etc.
Thanks @Confused I forgot to mention that I had also check the web console for anything suspicious. I’ll add this to the OP.
Does it toggle when using the console?
Yep, toggles via the console but I didn’t try turning it on, and leaving it, to see if it would remain on. After the second flicker I got a bit worried and didn’t want to trip a breaker or burn something up so I unplugged it.
I honestly think its a component issue but thought I would ask before breaking out the meter and soldering iron.
I’d start a MQTT logger to see if something sends commands to the switch. mosquitto_sub or a debug logging in on the mqtt broker if you control it.
Probably someone got access to your broker?
Thanks @avk using debug is something I didn’t try, after the flickering I was worried about burning something up and just unplugged it.
Someone else having access to my broker is not likely but not impossible either.
You are probably correct. I had a few sonoff fail. But they always fail safely. Meaning: relay OFF.
In your case I think it’s the capacitor providing the constant voltage to the realy’s coil.
I’ve also had WiFi antenna amplifier failures and relay coil failures.
No swelled caps that I can see but de-soldering and checking is easy enough. This is the first Sonoff failure so taking the time to find the cause should save me a few $ down the road.
I think you sperimented a ghost switching because an elettro-magnetic field in your area activated the sonoff.
Try to look at these MrZ. video, it’s very usefull
you can also turn on syslog on tasmota devices to send logs to some machine. Maybe they can provide reasons for flickering.
Thanks @Muplex the videos were good, got them book marked, but I’m not using the extra GPIO.
I plugged in the Sonoff again to see what would happen and it’s worked without error. For now I’ll monitor and use the suggestions provided above, hopefully I can find the root cause.
During the summer we’ve got a new Home-Cinema system and the place between the wall and the self is narrow, I had power down everything for almost a day (while we installed the new AVR, loudspeakers, etc…). That means there were no OH, no internet, no Wi-Fi connection. During that the Kitchen Lights was on, which is controlled by a Sonoff Basic. There were these flickerings every 10-20 minutes, it turned off and right after on again. For me it was caused by that there were Wi-Fi connection.
How did you guys find the webinterface?
I can’t and it’s not listed in my FrItz, but I should have the right SSID/WPA2 key
I use this from the command line (linux PC) sudo arp-scan --interface=wlp12s0 --localnet
Note: replace wlp12s0 with your interface you can use ifconfig to find this info.
If you know the MAC address then match with the IP.
If not then unplug the Sonoff run the command above then plug in the Sonoff and rerun the command and compare to find the IP.
The Sonoff 120v cord connection was loose, when trying to secure the wire I found the screw terminal was stripped out. Not sure how I didn’t notice this when first installing. My plan is to replace the terminal, soon as I can find my spares, and put the switch back in service.
This may or may not be the cause but time will tell.
Update and Solution:
While repairing the questionable Sonoff I used a new one and started having the same issue.
The root cause was a bad plug on the outlet. The other plug seems to works fine and after 5 days without issues (four days on the repaired Sonoff) I’m calling it solved. It’s been years since having an issue with outlets, I guess nothing last forever, time to do some replacing.
For anyone that has similar issues I encourage you to read all the post, several great suggestions, and don’t forget to check the unexpected things like outlets.
Thanks to all that responded!