howanghk / homebridge-ewelink

Homebridge plugin to control Sonoff relays with OEM firmware
MIT License
81 stars 46 forks source link

WebSocket closed error 406 on Setting Power On / Off #113

Open francescomoriniwk opened 4 years ago

francescomoriniwk commented 4 years ago

Hi, I get the following when trying to switch Power (On/Off) on my sonoff(s) (TH16, Basic, Mini):

[2020-7-6 18:26:08] [eWeLink] Setting power state to [on] for device [Giardino] [2020-7-6 18:26:08] [eWeLink] WebSocket messge received: {"error":406,"sequence":"1594052768478"} [2020-7-6 18:26:08] [eWeLink] WebSocket was closed. Reason [1006]

Strange thing is that the Temperature / Humidity from TH16 works fine.

Any ideas?

Thank you

francescomoriniwk commented 4 years ago

I've found a preceding error (just changed the api-key):

[2020-7-6 18:52:34] [eWeLink] Sending login request [{"action":"userOnline","userAgent":"app","version":6,"nonce":"159405435495200","apkVesrion":"1.8","os":"ios","at":"fbed5116f68584a50149e3b7beb8e1daac320e9b","apikey":"xxx","ts":"1594054354","model":"iPhone10,6","romVersion":"11.1.2","sequence":1594054354952}] [2020-7-6 18:52:35] [eWeLink] WebSocket messge received: {"error":406,"apikey":"xxx","sequence":"1594054354952","actionName":"userOnline"}

Thank you

bwp91 commented 4 years ago

Hi Probably butting in here where I shouldn't be. I have spent the last few weeks of lockdown trying to improve on the fantastic work of this package. At the moment mine is a separate package, with so many changes that a pull request would be out the picture. But eventually it would be nice to gather all these different ewelink packages into one. My package is at homebridge-ewelink-sonoff. At the moment it's still quite a work in progress, but I've replied to your "issue" on here specifically because I think it might make your thermostat and other devices function again. I know this comment won't "fix" the issue for this particular package. I'd like to state again that my package is still a work in progress and although it might fix your issue, you might come across a few other issues.

CsabaVK commented 4 years ago

Hey, Im getting the same issue I can see the switches in the home app, even their state, but cant change them :(

[2020-7-22 18:51:02] [eWeLink] Setting power state to [off] for device [Living Room CH 1] [2020-7-22 18:51:03] [eWeLink] WebSocket messge received: {"error":406,"sequence":"1595458262811"} [2020-7-22 18:51:03] [eWeLink] WebSocket was closed. Reason [1006]