Skip to content

PowerOnState is not obeyed #2140

@niklasfink

Description

@niklasfink

Hi, I'm using a Sonoff T1 and am noticing a sudden power toggle during day or night, without interacting with the device. Upon further research, I found out that after the device reboots, it turns power ON, even though it was OFF before rebooting.

I played around with the settings a bit, but I can't figure out why it is doing that. The specific settings are:

23:32:53 MQT: stat/sonoff-light2/STATUS = {"Status":{"Module":29,"FriendlyName":"Sonoff","Topic":"sonoff-light2","ButtonTopic":"0","Power":2,"PowerOnState":0,"LedState":1,"SaveData":1,"SaveState":0,"ButtonRetain":0,"PowerRetain":0}}

This is how the log looks like when rebooting and then switching the light ON, even though it was OFF:

ESP-HTP: Web server active on sonoff-light2-5465.local with IP address 192.168.120.80
ESP-MQT: Attempting connection...
ESP-MQT: Connected
ESP-MQT: tele/sonoff-light2/LWT = Online (retained)
ESP-MQT: cmnd/sonoff-light2/POWER = 
ESP-MQT: Subscribe to cmnd/sonoff-light2/#
ESP-MQT: Subscribe to cmnd/sonoffs/#
ESP-MQT: Subscribe to cmnd/sonoff-light2/#
ESP-MQT: tele/sonoff-light2/INFO1 = {"Module":"Sonoff T1 2CH","Version":"5.11.1d","FallbackTopic":"sonoff-light2","GroupTopic":"sonoffs"}
ESP-MQT: tele/sonoff-light2/INFO2 = {"WebServerMode":"Admin","Hostname":"sonoff-light2-5465","IPAddress":"192.168.120.80"}
ESP-MQT: tele/sonoff-light2/INFO3 = {"RestartReason":"Software/System restart"}
ESP-RSL: Received Topic cmnd/sonoff-light2/POWER1, Data Size 3, Data OFF
ESP-RSL: Group 0, Index 1, Command POWER, Data OFF
ESP-MQT: stat/sonoff-light2/RESULT = {"POWER1":"OFF"}
ESP-MQT: stat/sonoff-light2/POWER1 = OFF
ESP-RSL: Received Topic cmnd/sonoff-light2/POWER2, Data Size 2, Data ON
ESP-RSL: Group 0, Index 2, Command POWER, Data ON
ESP-MQT: stat/sonoff-light2/RESULT = {"POWER2":"ON"}
ESP-RSL: Received Topic cmnd/sonoff-light2/POWER1, Data Size 3, Data OFF
ESP-RSL: Received Topic cmnd/sonoff-light2/POWER2, Data Size 2, Data ON
ESP-CFG: Saved to flash at F7, Count 1717, Bytes 1648
ESP-MQT: stat/sonoff-light2/RESULT = {"POWER1":"OFF"}
ESP-MQT: stat/sonoff-light2/POWER1 = OFF
ESP-MQT: stat/sonoff-light2/RESULT = {"POWER2":"ON"}
ESP-MQT: stat/sonoff-light2/POWER2 = ON
ESP-APP: (UTC) Sun Mar 11 21:16:19 2018
ESP-APP: (DST) Sun Mar 25 02:00:00 2018
ESP-APP: (STD) Sun Oct 28 03:00:00 2018
ESP-MQT: tele/sonoff-light2/STATE = {"Time":"2018-03-11T23:16:25","Uptime":0,"Vcc":3.520,"POWER1":"OFF","POWER2":"ON","Wifi":{"AP":2,"SSId":"WIFI","RSSI":54,"APMac":"--removed--"}}

I'm using Mosca as my MQTT broker. I would assume there is a power ON message saved on the broker which then gets read by the Sonoff, even though I set the settings to not read it (PowerRetain 0).

Any help appreciated. :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    good tipType - Very useful informationhelp neededAction - Asking for help from the community

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions