The component stopped working today I see alot of Bad Requests in the log
See original GitHub issueSo, I see tons of: error 400 and 406 in the log (below) The interesting part is that state does synchronize after some time (if I manually switch on/off or use the app) so it seems they changed protocol maybe.
I’m using a different account to which I shared my devices and not my main account to login I verified that in the app that account works correctly
I tried using both master branch and the dev branch (log below is from dev)
019-12-17 16:56:04 DEBUG (MainThread) [custom_components.sonoff] Received state event change for: 10008d7ce2 2019-12-17 16:56:04 DEBUG (MainThread) [custom_components.sonoff] Device 10008d7ce2change to: {"switch": "off"} 2019-12-17 16:56:04 DEBUG (Thread-2) [custom_components.sonoff] websocket msg: {"error":406,"sequence":"15765945641975293"} 2019-12-17 16:56:04 ERROR (Thread-2) [custom_components.sonoff] websocket error: Connection is already closed. 2019-12-17 16:56:04 DEBUG (Thread-2) [custom_components.sonoff] websocket closed 2019-12-17 16:56:04 DEBUG (Thread-2) [custom_components.sonoff] (re)init websocket 2019-12-17 16:56:06 DEBUG (Thread-2) [custom_components.sonoff] websocket msg: {"error":400,"reason":"Bad Request","apikey":"068468a7-08fe-4e7f-9ace-e357723a788f","sequence":"15765945657868495","actionName":"userOnline"} 2019-12-17 16:56:38 DEBUG (MainThread) [custom_components.sonoff] Received state event change for: 10008d7ce2 2019-12-17 16:56:39 DEBUG (MainThread) [custom_components.sonoff] Device10008d7ce2change to: {"switch": "off"} 2019-12-17 16:56:39 DEBUG (MainThread) [custom_components.sonoff] Received state event change for: 10007f77df 2019-12-17 16:56:39 DEBUG (MainThread) [custom_components.sonoff] Device10007f77dfchange to: {"switch": "off"} 2019-12-17 16:56:39 DEBUG (MainThread) [custom_components.sonoff] Received state event change for: 10008d79ea 2019-12-17 16:56:39 DEBUG (MainThread) [custom_components.sonoff] Device10008d79eachange to: {"switch": "off"} 2019-12-17 16:56:39 DEBUG (MainThread) [custom_components.sonoff] Received state event change for: 1000333ca7 2019-12-17 16:56:39 DEBUG (MainThread) [custom_components.sonoff] Device1000333ca7change to: {"switch": "off"} 2019-12-17 16:56:39 DEBUG (MainThread) [custom_components.sonoff] Received state event change for: 1000856dae 2019-12-17 16:56:39 DEBUG (MainThread) [custom_components.sonoff] Device1000856daechange to: {"switch": "off"} 2019-12-17 16:56:39 DEBUG (MainThread) [custom_components.sonoff] Received state event change for: 1000857248 2019-12-17 16:56:39 DEBUG (MainThread) [custom_components.sonoff] Device1000857248change to: {"switch": "off"} 2019-12-17 16:56:39 DEBUG (Thread-2) [custom_components.sonoff] websocket msg: {"error":406,"sequence":"15765945990022745"} 2019-12-17 16:56:39 ERROR (Thread-2) [custom_components.sonoff] websocket error: Connection is already closed.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:48 (7 by maintainers)

Top Related StackOverflow Question
“houston we have a problem” type of situation here 😑
unfortunately the timing is quite bad for me, i’ll try to take a look at it but i’m quite swamped today in particular… weekend the latest
We are really happy that you find this method. Thanks from the bottom of my heart for doing this