Sonoff 4 Channel Pro - Power on State

Hi

I have a 4 channel pro Sonoff switch. I have my garage doors and gate connected. When the switch loses connection to the server or if the server restarts - the 4 channel toggles the relays - meaning that my garage doors open each time the switch looses connection with the server.

Here is my config for one of the 4 channels :slight_smile:

  • platform: mqtt
    name: “Garage”
    state_topic: “stat/channel/POWER2”
    command_topic: “cmnd/channel/POWER2”
    qos: 1
    payload_on: “ON”
    payload_off: “OFF”
    retain: false

In the console of the switch - The powerretain is on and the PowerOnState is 3

Please assist - thanks

This behavior normally is the result of improper use of the retain flag. Set powerretain to off, and use mqtt explorer to delete all retained messages from your 4CH pro.

Hi there

Apologies for the post revival but I’m having similar issues recently with a 4CH pro and have tried everything suggested but cannot get it resolved, it has worked perfectly for almost 2 years but about 2-3 months ago it started randomly switching on switch 2, PowerRetain was set to off, I’ve tried it at both on and off with the same results.

Ran MQTT Explorer and removed the retained message but that too has not helped, I’m not at all familiar with MQTT Explorer just installed it because of this post so perhaps I’ve done something wrong here.

It is about ± 2 metres away from the wireless AP so has good signal and is not a case of it going offline it is just randomly switching the switch on.

Below some images and history log, hope someone can point me in the right direction.

Thanks


12:07:21.416 MQT: sonoff_4ch/tele/STATE = {"Time":"2021-11-12T12:07:21","Uptime":"1T05:10:10","UptimeSec":105010,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER1":"OFF","POWER2":"ON","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"10A Fairview [2GHZ]","BSSId":"64:D1:54:AA:81:27","Channel":1,"Mode":"11n","RSSI":84,"Signal":-58,"LinkCount":4,"Downtime":"0T00:00:21"}}
12:07:25.422 MQT: sonoff_4ch/tele/HASS_STATE = {"Version":"9.5.0(tasmota)","BuildDateTime":"2021-06-17T08:26:35","Module or Template":"Sonoff 4CH Pro","RestartReason":"Power On","Uptime":"1T05:10:14","Hostname":"sonoff_4ch-2442","IPAddress":"192.168.88.119","RSSI":"96","Signal (dBm)":"-52","WiFi LinkCount":4,"WiFi Downtime":"0T00:00:21","MqttCount":4,"LoadAvg":19}
12:12:21.448 MQT: sonoff_4ch/tele/STATE = {"Time":"2021-11-12T12:12:21","Uptime":"1T05:15:10","UptimeSec":105310,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER1":"OFF","POWER2":"ON","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"10A Fairview [2GHZ]","BSSId":"64:D1:54:AA:81:27","Channel":1,"Mode":"11n","RSSI":96,"Signal":-52,"LinkCount":4,"Downtime":"0T00:00:21"}}
12:12:25.455 MQT: sonoff_4ch/tele/HASS_STATE = {"Version":"9.5.0(tasmota)","BuildDateTime":"2021-06-17T08:26:35","Module or Template":"Sonoff 4CH Pro","RestartReason":"Power On","Uptime":"1T05:15:14","Hostname":"sonoff_4ch-2442","IPAddress":"192.168.88.119","RSSI":"94","Signal (dBm)":"-53","WiFi LinkCount":4,"WiFi Downtime":"0T00:00:21","MqttCount":4,"LoadAvg":19}
12:12:28.888 MQT: sonoff_4ch/stat/BUTTON2T = {"TRIG":"SINGLE"}
12:12:28.896 MQT: sonoff_4ch/tele/STATE = {"Time":"2021-11-12T12:12:28","Uptime":"1T05:15:17","UptimeSec":105317,"Heap":25,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"10A Fairview [2GHZ]","BSSId":"64:D1:54:AA:81:27","Channel":1,"Mode":"11n","RSSI":98,"Signal":-51,"LinkCount":4,"Downtime":"0T00:00:21"}}
12:12:28.902 MQT: sonoff_4ch/stat/RESULT = {"POWER2":"OFF"}
12:12:28.907 MQT: sonoff_4ch/stat/POWER2 = OFF
12:17:21.447 MQT: sonoff_4ch/tele/STATE = {"Time":"2021-11-12T12:17:21","Uptime":"1T05:20:10","UptimeSec":105610,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"10A Fairview [2GHZ]","BSSId":"64:D1:54:AA:81:27","Channel":1,"Mode":"11n","RSSI":100,"Signal":-50,"LinkCount":4,"Downtime":"0T00:00:21"}}
12:17:25.415 MQT: sonoff_4ch/tele/HASS_STATE = {"Version":"9.5.0(tasmota)","BuildDateTime":"2021-06-17T08:26:35","Module or Template":"Sonoff 4CH Pro","RestartReason":"Power On","Uptime":"1T05:20:14","Hostname":"sonoff_4ch-2442","IPAddress":"192.168.88.119","RSSI":"100","Signal (dBm)":"-49","WiFi LinkCount":4,"WiFi Downtime":"0T00:00:21","MqttCount":4,"LoadAvg":19}
12:22:21.446 MQT: sonoff_4ch/tele/STATE = {"Time":"2021-11-12T12:22:21","Uptime":"1T05:25:10","UptimeSec":105910,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"10A Fairview [2GHZ]","BSSId":"64:D1:54:AA:81:27","Channel":1,"Mode":"11n","RSSI":94,"Signal":-53,"LinkCount":4,"Downtime":"0T00:00:21"}}
12:22:25.427 MQT: sonoff_4ch/tele/HASS_STATE = {"Version":"9.5.0(tasmota)","BuildDateTime":"2021-06-17T08:26:35","Module or Template":"Sonoff 4CH Pro","RestartReason":"Power On","Uptime":"1T05:25:14","Hostname":"sonoff_4ch-2442","IPAddress":"192.168.88.119","RSSI":"98","Signal (dBm)":"-51","WiFi LinkCount":4,"WiFi Downtime":"0T00:00:21","MqttCount":4,"LoadAvg":19}
12:27:21.430 MQT: sonoff_4ch/tele/STATE = {"Time":"2021-11-12T12:27:21","Uptime":"1T05:30:10","UptimeSec":106210,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"10A Fairview [2GHZ]","BSSId":"64:D1:54:AA:81:27","Channel":1,"Mode":"11n","RSSI":96,"Signal":-52,"LinkCount":4,"Downtime":"0T00:00:21"}}
12:27:25.419 MQT: sonoff_4ch/tele/HASS_STATE = {"Version":"9.5.0(tasmota)","BuildDateTime":"2021-06-17T08:26:35","Module or Template":"Sonoff 4CH Pro","RestartReason":"Power On","Uptime":"1T05:30:14","Hostname":"sonoff_4ch-2442","IPAddress":"192.168.88.119","RSSI":"100","Signal (dBm)":"-50","WiFi LinkCount":4,"WiFi Downtime":"0T00:00:21","MqttCount":4,"LoadAvg":19}
12:32:21.507 MQT: sonoff_4ch/tele/STATE = {"Time":"2021-11-12T12:32:21","Uptime":"1T05:35:10","UptimeSec":106510,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"10A Fairview [2GHZ]","BSSId":"64:D1:54:AA:81:27","Channel":1,"Mode":"11n","RSSI":98,"Signal":-51,"LinkCount":4,"Downtime":"0T00:00:21"}}
12:32:25.441 MQT: sonoff_4ch/tele/HASS_STATE = {"Version":"9.5.0(tasmota)","BuildDateTime":"2021-06-17T08:26:35","Module or Template":"Sonoff 4CH Pro","RestartReason":"Power On","Uptime":"1T05:35:14","Hostname":"sonoff_4ch-2442","IPAddress":"192.168.88.119","RSSI":"98","Signal (dBm)":"-51","WiFi LinkCount":4,"WiFi Downtime":"0T00:00:21","MqttCount":4,"LoadAvg":19}
12:33:55.219 CMD: PowerRetain off
12:33:55.227 MQT: sonoff_4ch/stat/POWER1 = 
12:33:55.230 MQT: sonoff_4ch/stat/POWER2 = 
12:33:55.232 MQT: sonoff_4ch/stat/POWER3 = 
12:33:55.234 MQT: sonoff_4ch/stat/POWER4 = 
12:33:55.237 MQT: sonoff_4ch/stat/RESULT = {"PowerRetain":"OFF"}
12:37:21.419 MQT: sonoff_4ch/tele/STATE = {"Time":"2021-11-12T12:37:21","Uptime":"1T05:40:10","UptimeSec":106810,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"10A Fairview [2GHZ]","BSSId":"64:D1:54:AA:81:27","Channel":1,"Mode":"11n","RSSI":98,"Signal":-51,"LinkCount":4,"Downtime":"0T00:00:21"}}
12:37:25.420 MQT: sonoff_4ch/tele/HASS_STATE = {"Version":"9.5.0(tasmota)","BuildDateTime":"2021-06-17T08:26:35","Module or Template":"Sonoff 4CH Pro","RestartReason":"Power On","Uptime":"1T05:40:14","Hostname":"sonoff_4ch-2442","IPAddress":"192.168.88.119","RSSI":"98","Signal (dBm)":"-51","WiFi LinkCount":4,"WiFi Downtime":"0T00:00:21","MqttCount":4,"LoadAvg":19}
12:37:31.581 MQT: sonoff_4ch/tele/STATE = {"Time":"2021-11-12T12:37:31","Uptime":"1T05:40:20","UptimeSec":106820,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER1":"OFF","POWER2":"ON","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"10A Fairview [2GHZ]","BSSId":"64:D1:54:AA:81:27","Channel":1,"Mode":"11n","RSSI":98,"Signal":-51,"LinkCount":4,"Downtime":"0T00:00:21"}}
12:37:31.587 MQT: sonoff_4ch/stat/RESULT = {"POWER2":"ON"}
12:37:31.591 MQT: sonoff_4ch/stat/POWER2 = ON
12:42:21.487 MQT: sonoff_4ch/tele/STATE = {"Time":"2021-11-12T12:42:21","Uptime":"1T05:45:10","UptimeSec":107110,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER1":"OFF","POWER2":"ON","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"10A Fairview [2GHZ]","BSSId":"64:D1:54:AA:81:27","Channel":1,"Mode":"11n","RSSI":94,"Signal":-53,"LinkCount":4,"Downtime":"0T00:00:21"}}
12:42:25.422 MQT: sonoff_4ch/tele/HASS_STATE = {"Version":"9.5.0(tasmota)","BuildDateTime":"2021-06-17T08:26:35","Module or Template":"Sonoff 4CH Pro","RestartReason":"Power On","Uptime":"1T05:45:14","Hostname":"sonoff_4ch-2442","IPAddress":"192.168.88.119","RSSI":"98","Signal (dBm)":"-51","WiFi LinkCount":4,"WiFi Downtime":"0T00:00:21","MqttCount":4,"LoadAvg":19}