Skip to content

PowerOnState with LedMask Issue #5663

@meingraham

Description

@meingraham

BUG DESCRIPTION

I finally installed one of the Kesen KS-604S in the house (I was just testing before). I hadn't noticed this before, but it appears as though the PowerOnState 0 setting is not taking effect. The relays that are ON when I restart the plug are coming back in the ON state after a restart.

REQUESTED INFORMATION

STATUS = {"Status":{"Module":0,"FriendlyName":["Plug","Lights","USB","LED2"],"Topic":"myTopic","ButtonTopic":"","Power":15,"PowerOnState":0,"LedState":1,"LedMask":"0001","SaveData":1,"SaveState":0,"SwitchTopic":"","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"sonoffs","OtaUrl":"http://thehackbox.org/tasmota/020300/sonoff.bin","RestartReason":"Software/System restart","Uptime":"0T00:02:28","StartupUTC":"2019-04-16T13:19:25","Sleep":50,"CfgHolder":4617,"BootCount":21,"SaveCount":48,"SaveAddress":"FA000"}}
STATUS2 = {"StatusFWR":{"Version":"6.5.0.8(4fa4397-sonoff)","BuildDateTime":"2019-04-13T16:01:33","Boot":4,"Core":"2_3_0","SDK":"1.5.3(aec24ac9)"}}
STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":2,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["mySSID",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008108","280500000100000000000000000000000000","000000C8"]}}
STATUS4 = {"StatusMEM":{"ProgramSize":506,"Free":496,"Heap":14,"ProgramFlashSize":1024,"FlashSize":1024,"FlashChipId":"1440C8","FlashMode":3,"Features":["00000809","0FDAE394","000783A0","23B617CE","00003BC0"]}}
STATUS5 = {"StatusNET":{"Hostname":"myTopic-<deviceID>","IPAddress":"192.168.1.nnn","Gateway":"192.168.1.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.1.1","Mac":"myMAC","Webserver":2,"WifiConfig":4}}
STATUS6 = {"StatusMQT":{"MqttHost":"myHost","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_myMACid","MqttUser":"myUserID","MqttCount":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}}
STATUS7 = {"StatusTIM":{"UTC":"Tue Apr 16 13:21:53 2019","Local":"Tue Apr 16 09:21:53 2019","StartDST":"Sun Mar 10 02:00:00 2019","EndDST":"Sun Nov 03 02:00:00 2019","Timezone":99,"Sunrise":"06:53","Sunset":"19:59"}}
STATUS10 = {"StatusSNS":{"Time":"2019-04-16T09:21:53"}}
STATUS11 = {"StatusSTS":{"Time":"2019-04-16T09:21:53","Uptime":"0T00:02:28","Vcc":3.086,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":59,"POWER1":"ON","POWER2":"ON","POWER3":"ON","POWER4":"ON","Wifi":{"AP":1,"SSId":"mySSID","BSSId":"E4:F0:42:DE:76:F4","Channel":6,"RSSI":78,"LinkCount":1,"Downtime":"0T00:00:08"}}}
  • Provide the output of console when you experience your issue if apply :
09:19:21 HTP: Restart
09:19:22 SRC: WebGui from 0.0.0.0
00:00:00 CFG: Loaded from flash at F4, Count 46
00:00:00 Project sonoff Plug Version 6.5.0.8(4fa4397-sonoff)-2_3_0
00:00:00 WIF: Checking connection...
00:00:00 WIF: Attempting connection...
00:00:01 WIF: Network (re)scan started...
00:00:01 WIF: Checking connection...
00:00:01 WIF: Attempting connection...
00:00:02 WIF: Checking connection...
00:00:02 WIF: Attempting connection...
00:00:03 WIF: Checking connection...
00:00:03 WIF: Attempting connection...
00:00:04 WIF: Network 0, AP-, SSId Rich's Network, Channel 1, BSSId 54:E4:3A:EC:AA:D8, RSSI -92, Encryption 1
00:00:04 WIF: Network 1, AP-, SSId ATT8FfL25W, Channel 1, BSSId F8:18:97:75:98:15, RSSI -91, Encryption 1
00:00:04 WIF: Network 2, AP-, SSId Acosta, Channel 5, BSSId 24:F5:A2:0F:34:09, RSSI -89, Encryption 1
00:00:04 WIF: Network 3, AP-, SSId Acosta-guest, Channel 5, BSSId 2A:F5:A2:0F:34:09, RSSI -88, Encryption 0
00:00:04 WIF: Network 4, AP-, SSId DIRECT-89-HP OfficeJet Pro 8710, Channel 6, BSSId 84:A9:3E:FE:8F:8A, RSSI -58, Encryption 1
00:00:04 WIF: Network 5, AP1, SSId mySSID, Channel 6, BSSId E4:F0:42:DE:76:F4, RSSI -50, Encryption 1
00:00:04 WIF: Network 6, AP-, SSId MySpectrumWiFib0-2G, Channel 6, BSSId E8:AD:A6:47:06:B6, RSSI -90, Encryption 1
00:00:04 WIF: Network 7, AP-, SSId CLC, Channel 6, BSSId 02:27:22:E9:49:DB, RSSI -91, Encryption 1
00:00:04 WIF: Network 8, AP-, SSId Gaston Dr 2G, Channel 9, BSSId B0:BE:76:08:D1:D3, RSSI -88, Encryption 1
00:00:04 WIF: Network 9, AP-, SSId Avalon, Channel 10, BSSId 94:10:3E:9F:D0:94, RSSI -82, Encryption 1
00:00:04 WIF: Network 10, AP-, SSId Avalon_EXT, Channel 10, BSSId C0:FF:D4:B6:67:10, RSSI -88, Encryption 1
00:00:04 WIF: Network 11, AP-, SSId Avalon-guest, Channel 10, BSSId 96:10:3E:9F:D0:96, RSSI -83, Encryption 0
00:00:04 WIF: Network 12, AP-, SSId HP-Print-C5-Photosmart 6520, Channel 11, BSSId 38:EA:A7:39:4E:C5, RSSI -71, Encryption 1
00:00:04 WIF: Network 13, AP-, SSId benz, Channel 11, BSSId 58:6D:8F:13:62:0F, RSSI -89, Encryption 1
00:00:04 WIF: Network 14, AP1, SSId mySSID, Channel 11, BSSId myBSSID, RSSI -61, Encryption 1
00:00:04 WIF: Network 15, AP-, SSId ATTuc57EFi, Channel 11, BSSId 78:96:84:6E:B0:40, RSSI -84, Encryption 1
00:00:04 WIF: Network 16, AP-, SSId ATTQczrS22, Channel 11, BSSId BC:2E:48:BB:5F:E0, RSSI -89, Encryption 1
00:00:04 WIF: Patch issue 2186
00:00:04 WIF: Connecting to AP1 mySSID in mode 11N as myTopic-<deviceID>...
00:00:04 WIF: Checking connection...
00:00:04 WIF: Attempting connection...
00:00:05 WIF: Checking connection...
00:00:05 WIF: Attempting connection...
00:00:06 WIF: Checking connection...
00:00:06 WIF: Attempting connection...
00:00:07 WIF: Checking connection...
00:00:07 WIF: Attempting connection...
00:00:08 WIF: Checking connection...
00:00:08 WIF: Connected
00:00:08 HTP: Web server active on myTopic-<deviceID> with IP address 192.168.1.nnn
00:00:08 HTP: Main Menu
00:00:09 APP: (UTC) Tue Apr 16 13:19:33 2019, (DST) Sun Mar 10 02:00:00 2019, (STD) Sun Nov 03 02:00:00 2019
09:19:38 MQT: Attempting connection...
09:19:38 MQT: Connected
09:19:38 MQT: tele/myTopic/LWT = Online (retained)
09:19:38 MQT: cmnd/myTopic/POWER = 
09:19:38 MQT: Subscribe to cmnd/myTopic/#
09:19:38 MQT: Subscribe to cmnd/sonoffs/#
09:19:38 MQT: Subscribe to cmnd/DVES_myMACid_fb/#
09:19:38 MQT: tele/myTopic/INFO1 = {"Module":"KS-604S","Version":"6.5.0.8(4fa4397-sonoff)","FallbackTopic":"cmnd/DVES_myMACid_fb/","GroupTopic":"sonoffs"}
09:19:38 MQT: tele/myTopic/INFO2 = {"WebServerMode":"Admin","Hostname":"myTopic-<deviceID>","IPAddress":"192.168.1.nnn"}
09:19:38 MQT: tele/myTopic/INFO3 = {"RestartReason":"Software/System restart"}
09:19:38 MQT: stat/myTopic/RESULT = {"POWER1":"ON"}
09:19:38 MQT: stat/myTopic/POWER1 = ON
09:19:38 MQT: stat/myTopic/RESULT = {"POWER2":"ON"}
09:19:38 MQT: stat/myTopic/POWER2 = ON
09:19:38 MQT: stat/myTopic/RESULT = {"POWER3":"ON"}
09:19:38 MQT: stat/myTopic/POWER3 = ON
09:19:38 MQT: stat/myTopic/RESULT = {"POWER4":"ON"}
09:19:38 MQT: stat/myTopic/POWER4 = ON
09:19:39 RUL: SYSTEM#BOOT performs "Backlog Power1 On"
09:19:39 SRC: Rule
09:19:40 RSL: Received Topic /Power1, Data Size 2, Data On
09:19:40 RSL: Group 0, Index 1, Command POWER, Data On
09:19:40 MQT: stat/myTopic/RESULT = {"POWER1":"ON"}
09:19:40 MQT: stat/myTopic/POWER1 = ON
09:19:40 APP: Boot Count 21
09:19:40 CFG: Saved to flash at FB, Count 47, Bytes 3584

TO REPRODUCE

Configuration:
Template:
{"NAME":"KS-604S","GPIO":[56,255,255,17,57,18,255,255,22,21,32,23,255],"FLAG":0,"BASE":18}
LedState 1
LedMask 1
PowerRetain 0
PowerOnState 0

EXPECTED BEHAVIOUR

Relays power up in OFF state when PowerOnState set to 0

SCREENSHOTS

N/A

ADDITIONAL INFORMATION

Rule

{"Rule1":"ON","Once":"OFF","StopOnError":"OFF","Free":438,"Rules":"ON System#Boot DO Power1 On ENDON ON Power2#State DO Power4 %value% ENDON"}

I have set PowerRetain 0. I checked and I don't believe this behavior is due to retained messages from my MQTT broker. I used MQTT-Explorer (the only retained message it showed was the LWT message) and also issued mosquitto_sub to record the messages going to the plug.

mosquitto_sub

09:19:38 tele/myTopic/LWT Online
09:19:38 cmnd/myTopic/POWER (null)
09:19:38 tele/myTopic/INFO1 {"Module":"KS-604S","Version":"6.5.0.8(4fa4397-sonoff)","FallbackTopic":"cmnd/DVES_myMACid_fb/","GroupTopic":"sonoffs"}
09:19:38 tele/myTopic/INFO2 {"WebServerMode":"Admin","Hostname":"myTopic-<deviceID>","IPAddress":"192.168.1.nnn"}
09:19:38 tele/myTopic/INFO3 {"RestartReason":"Software/System restart"}
09:19:38 stat/myTopic/RESULT {"POWER1":"ON"}
09:19:38 stat/myTopic/POWER1 ON
09:19:38 stat/myTopic/RESULT {"POWER2":"ON"}
09:19:38 stat/myTopic/POWER2 ON
09:19:38 stat/myTopic/RESULT {"POWER3":"ON"}
09:19:38 stat/myTopic/POWER3 ON
09:19:38 stat/myTopic/RESULT {"POWER4":"ON"}
09:19:38 stat/myTopic/POWER4 ON
09:19:40 stat/myTopic/RESULT {"POWER1":"ON"}
09:19:40 stat/myTopic/POWER1 ON

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicatedResult - Duplicated Issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions