howanghk / homebridge-ewelink

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

Error 400, Bad Request? #120

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello, today I started receiving this error for the ewelink plugin. [eWeLink] WebSocket messge received: {"error":400,"reason":"Bad Request"

When I try to change the status I get... WebSocket messge received: {"error":406,"sequence":"1603833318315"} [10/27/2020, 2:15:18 PM] [eWeLink] WebSocket was closed. Reason [1006]

luizjunior commented 3 years ago

same problem here... maybe Sonoff have changed their API?

howanghk commented 3 years ago

Hi, as I don't have a working ewelink device with me I do not have the incentive on updating this plugin. Please try https://github.com/bwp91/homebridge-ewelink as they are more actively updated and well maintained.

imajay commented 3 years ago

i m using the homebridge-ewelink-max ... how do i update the above suggestions

armandoi75 commented 3 years ago

Same problem: [eWeLink] WebSocket messge received: {"error":400,"reason":"Bad Request","............................

other error: [eWeLink] An error was encountered while requesting a list of devices. Response was [{"error":406,"msg":"{\"error\":401,\"msg\":\"Bearer:accessToken is empty\"}"}]

ukxxx commented 3 years ago

Exactly same problem here

[eWeLink] WebSocket messge received: {"error":400,"reason":"Bad Request","apikey":"*****","sequence":"1603900688504","actionName":"userOnline"}

daveramirez5 commented 3 years ago

Same problem here

ghost commented 3 years ago

For anyone with this issue do the following... uninstall homebridge-ewelink-max restart (This removes old devices - important!) install homebridge-ewelink restart & reconfigure accessories

Worked for me!

armandoi75 commented 3 years ago

Thanks a lot Zlockhart, your solution worked also for me ;-)

Stewart06 commented 3 years ago

Perso cela n'a pas fonctionné pour moi, pourtant j'ai bien redémarrer entre chaque étape.

John88a commented 3 years ago

Same problem since yesterday, guess better install the new plugin

charliejgallo commented 3 years ago

same problem here, Zlockhart solution also worked for me!

John88a commented 3 years ago

It also solved my problem with the new plug in, thanks

ukxxx commented 3 years ago

Exactly same problem here

[eWeLink] WebSocket messge received: {"error":400,"reason":"Bad Request","apikey":"*****","sequence":"1603900688504","actionName":"userOnline"}

Solved by changing plug-in, as Zlockhart wrote. Also looks like new plug-in works faster and more stabile.

migabc commented 3 years ago

For anyone with this issue do the following... uninstall homebridge-ewelink-max restart (This removes old devices - important!) install homebridge-ewelink restart & reconfigure accessories

Worked for me!

Hi, I'm trying to migrate from "homebridge-ewelink-max" to "homebridge-ewelink" as suggested above to solve this issue. but after the 1st step above (uninstall homebridge-ewelink-max) and the 2nd step (restart homebridge) the Sonoff accessories still show up in the Home app, and during startup I see these messages:

Nov 2 10:06:50 raspberrypi homebridge[2832]: Failed to find plugin to handle accessory Veranda Outlets Nov 2 10:06:50 raspberrypi homebridge[2832]: Failed to find plugin to handle accessory DIMMER1 Nov 2 10:06:50 raspberrypi homebridge[2832]: Failed to find plugin to handle accessory Christmas Tree Nov 2 10:06:50 raspberrypi homebridge[2832]: Failed to find plugin to handle accessory Sonoff Basic 3

How can I remove these old accessories, before going onto the 3rd step (install homebridge-ewelink)?

ghost commented 3 years ago

How can I remove these old accessories, before going onto the 3rd step (install homebridge-ewelink)?

https://github.com/bwp91/homebridge-ewelink/wiki/How-to-remove-an-accessory-from-the-cache

migabc commented 3 years ago

Is there a terminal command for clearing the cache I'm running the basic homebridge (not the UI)

ghost commented 3 years ago

Is there a terminal command for clearing the cache

You could try this... https://www.reddit.com/r/HomeKit/comments/96kgrm/help_with_removing_accessories_from_homebridge/

gcorly commented 3 years ago

solved by uninstalling this plugin for me, and installing ewelink homebridge (verified)

migabc commented 3 years ago

Any change of fixing this issue (400 - bad request) on this plugin (homebridge-ewelink-max)? Or, alternatively allow the other plugin (homebridge-ewelink) to run under the current/stable/wanted version of homebridge 0.4.53

I tried following zlockhart's recommendation to swap the homebridge-ewelink-max for the homebridge-ewelink but this plugin requires HomeBridge version of >=1.0.0 and I'm currently using homebridge v0.4.53 (because homebridge-knx only runs on this stable version of homebridge)

So it seems I am stuck :-(

pi@raspberrypi:~ $ date; npm outdated -g --depth=0 Sat Nov 7 08:55:53 WET 2020 Package Current Wanted Latest Location hap-nodejs 0.4.53 0.4.53 0.8.2 global homebridge 0.4.53 0.4.53 1.1.6 global homebridge-camera-ffmpeg 0.1.19 0.1.19 3.0.3 global

pi@raspberrypi:~ $ date; npm list --depth=0 -g
Sat Nov 7 09:31:26 WET 2020 /usr/lib ├── hap-nodejs@0.4.53 ├── homebridge@0.4.53 ├── homebridge-bmw-connected@1.0.0 ├── homebridge-broadlink-rm@3.6.22 ├── homebridge-camera-ffmpeg@0.1.19 ├── homebridge-ewelink-max@0.1.24 ├── homebridge-gpio-blinds@1.0.0 ├── homebridge-gpio-device@0.4.6 ├── homebridge-knx@0.3.27 ├── homebridge-yeelight-wifi@2.2.2 ├── node-gyp@7.1.2 ├── npm@6.14.8 └── request@2.88.2

pi@raspberrypi:~ $