Tasmota problem

Hi to all!
I have problem with sonoff 4ch PRO flashed with tasmota.
the problem is that switches turns on and off by them selfs.

I’ll try to explain whole thing.

I have bought Sonoff 4ch PRO device because my house mostly run on 12V
From UPS I provide power to lights and all 12V devices. Wall switches are VIMAR Plana, and for this setup, I have changed 2 switches to push buttons, so I can turn on and off lights from Home Assistant, and by pushing wall button. UTP wire is soldered to push switch on the Sonoff 4CH pro flashed with tasmota. Firmware is 5.12.0
first, and second relay are controlled by HA automations, and other two by push buttons.
first and second works properly, and third and fourth switch are turning on and off by them self, without any user interaction.


Can Anyone help me to solve this issue, cause it’s annoying and WAF didn’t passed :frowning:

Thanks to everyone willing to help.

First thing to check - you do have a unique client_ID for the Sonoff (as referenced here under Disconnects and Reconnects)?

If this isn’t the problem then I’d suggest that RF interference is the issue you should look in to, There is a Dr Z video about this showing the resistor/capacitor that can be soldered in to solve the issue.

I removed second Sonoff PRO from network, just to troubleshoot issue, so now is just one connected…
and one switch is keep going ON, and I manually turn it off.

I agree that RF interference could be issue, but I have never put sonoff PRO into 433 MHz learning mode…, so I don’t know how it could pick up RF frequency.
is this video You are referring to?

thanks

Yes, that’s the one.

It’s not an area I’m an expert in, but my understanding is that interference isn’t just a 433MHz issue, it is a more general phenomenon associated with long leads (even though you are using STP).

OK
I’ll try that and report back if problem is solved.
although the 2nd sonoff pro I have mentioned, is untouched, and unmodified, just flashed tasmota firmware, and it sits on workbench plugged into 12V adapter, and ghost switching is also happening.

If you have no wires connected to that second Sonoff and it is still exhibiting random behaviour then RF interference seems unlikely. And if you have no other Sonoff devices then a name conflict also seems unlikely.

What are the Sonoff and MQTT logs showing?

I have several Sonoffs working… Sonoff basic works perfectly a while now…
and Sonoffs PRO (new in family) are having issues:

both of them have different names…
If there is problem with MQTT broker, the issue will also pop up somewhere else, but issue is just with PRO switches.
And not all of them…
first and second on both devices are working without issues. Channels three and four are having problems on both devices

three hours later…


take a look a number of triggers till now

and nobody is at home…

What are the Sonoff and MQTT logs showing?

00:00:00 Project sonoff vanjske (Topic sonoff4_1, Fallback DVES_809063, GroupTopic sonoffs) Version 5.12.0
00:00:00 WIF: Connecting to AP1 WiFi in mode 11N as sonoff4_1-4195…
00:00:05 WIF: Connected
00:00:05 DNS: Initialized
00:00:05 HTP: Web server active on sonoff4_1-4195.local with IP address 192.168.1.48
00:00:07 MQT: Attempting connection…
00:00:07 MQT: Connected
00:00:07 MQT: tele/sonoff4_1/LWT = Online (retained)
00:00:07 MQT: cmnd/sonoff4_1/POWER =
00:00:07 MQT: tele/sonoff4_1/INFO1 = {“Module”:“Sonoff 4CH Pro”,“Version”:“5.12.0”,“FallbackTopic”:“DVES_809063”,“GroupTopic”:“sonoffs”}
00:00:07 MQT: tele/sonoff4_1/INFO2 = {“WebServerMode”:“Admin”,“Hostname”:“sonoff4_1-4195”,“IPAddress”:“192.168.1.48”}
00:00:07 MQT: tele/sonoff4_1/INFO3 = {“RestartReason”:“Software/System restart”}
00:00:07 MQT: homeassistant/switch/sonoff4_1_1/config = (retained)
00:00:07 MQT: homeassistant/switch/sonoff4_1_2/config = (retained)
00:00:07 MQT: homeassistant/switch/sonoff4_1_3/config = (retained)
00:00:07 MQT: homeassistant/switch/sonoff4_1_4/config = (retained)
12:54:56 MQT: stat/sonoff4_1/RESULT = {“POWER1”:“OFF”}
12:54:56 MQT: stat/sonoff4_1/POWER1 = OFF
12:54:56 MQT: stat/sonoff4_1/RESULT = {“POWER2”:“OFF”}
12:54:56 MQT: stat/sonoff4_1/POWER2 = OFF
12:54:56 MQT: stat/sonoff4_1/RESULT = {“POWER3”:“OFF”}
12:54:56 MQT: stat/sonoff4_1/POWER3 = OFF
12:54:56 MQT: stat/sonoff4_1/RESULT = {“POWER4”:“OFF”}
12:54:56 MQT: stat/sonoff4_1/POWER4 = OFF
12:55:03 MQT: tele/sonoff4_1/STATE = {“Time”:“2018-03-19T12:55:03”,“Uptime”:“0T00:00:16”,“Vcc”:3.148,“POWER1”:“OFF”,“POWER2”:“OFF”,“POWER3”:“OFF”,“POWER4”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“WiFi”,“RSSI”:84,“APMac”:“F0:B4:29:D8:CC:6C”}}
12:56:46 MQT: stat/sonoff4_1/RESULT = {“POWER4”:“ON”}
12:56:46 MQT: stat/sonoff4_1/POWER4 = ON
12:57:14 MQT: stat/sonoff4_1/RESULT = {“POWER4”:“OFF”}
12:57:14 MQT: stat/sonoff4_1/POWER4 = OFF
12:58:11 MQT: stat/sonoff4_1/RESULT = {“POWER4”:“ON”}
12:58:11 MQT: stat/sonoff4_1/POWER4 = ON
12:58:23 MQT: stat/sonoff4_1/RESULT = {“POWER4”:“OFF”}
12:58:23 MQT: stat/sonoff4_1/POWER4 = OFF
12:58:42 MQT: stat/sonoff4_1/RESULT = {“POWER4”:“ON”}
12:58:42 MQT: stat/sonoff4_1/POWER4 = ON
12:58:54 MQT: stat/sonoff4_1/RESULT = {“POWER4”:“OFF”}
12:58:54 MQT: stat/sonoff4_1/POWER4 = OFF
12:59:44 MQT: stat/sonoff4_1/RESULT = {“POWER4”:“ON”}
12:59:44 MQT: stat/sonoff4_1/POWER4 = ON
12:59:52 MQT: stat/sonoff4_1/RESULT = {“POWER4”:“OFF”}
12:59:52 MQT: stat/sonoff4_1/POWER4 = OFF
13:00:08 MQT: tele/sonoff4_1/STATE = {“Time”:“2018-03-19T13:00:08”,“Uptime”:“0T00:05:16”,“Vcc”:3.149,“POWER1”:“OFF”,“POWER2”:“OFF”,“POWER3”:“OFF”,“POWER4”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“WiFi”,“RSSI”:82,“APMac”:“F0:B4:29:D8:CC:6C”}}

is this Sonoff log you are looking?
from this log, each ON command is GHOST command.
and each off command is by me.

I can’t access MQTT log.
MQTT broker is installed on Qnap NAS and yes, I am stupid, I don’t know how to setup MQTT log :blush:
but I can monitor mqtt messages with mqtt spy

Very odd - the status is changing with no obvious command. It does look like RF interference or something to me. But Let’s maybe wait and see if anyone else has seen this before. It just seems very odd that you are getting the same effect from another Sonoff.

To access what is happening on you MQTT broker you can use mqtt spy, or ssh in to the Qnap then run the following

mosquitto_sub -u USERNAME -P PASSWORD -v -t '\''#'\''

This will then start showing all messages published. My suspicion is that there won’t be anything associated with your random ON/OFFs

transformer:

One device (on workbench) is powered by AC to DC 12V2A transformer

The implemented device in circuit breaker cabinet is powered by 12V batteries.
Last year I have build a new house, and put in every room 12V outlet, and all lights run on 12V (off the batteries)
batteries are charged with UPS-s. there are 12 UPS batteries, 90Ah each.
These batteries are powering all lights, Internet modem, all routers and switches, so no matter what, I can always access my home, and have stable Internet and network connections.

so, answer is yes, two PRO’s are powered from different types of power sources.

Where in MQTTspy do I need to insert this command?

You are powering a Sonoff 4ch at 12V? I thought that it was a 90-250V device?
https://www.itead.cc/wiki/Sonoff_4CH

https://www.itead.cc/wiki/Sonoff_4CH_Pro

it’s PRO version

That is also a 90-250V device, according to the link.

Time to look at Sonoff SV?

EDIT - My bad, no that works off DC

PRO device is different from regular 4ch sonoff in dual power mode. it can be powered by 220V AC or 12VDC.
I choose 12V DC power source because I don’t need to convert power twice. first from UPS battery to 220AC, and again from 220AC to 12V DC. and all of devices i have mention are 12V DC devices…

can you please help me how to access mosquitto log from MQTT spy?

It’s been a while since I last looked at MQTT spy.

Can you ssh in to your Qnap? (So using Putty if you are a windows user, or Terminal for Mac - type ssh admin@QNAP_IP_ADDRESS) - then type the command above when you are in.

(I think it’s admin for a Qnap, may be root.)

OK
done that