bwp91 / homebridge-ewelink

Homebridge plugin to integrate eWeLink devices into HomeKit.
MIT License
384 stars 126 forks source link

[eWeLink] Server did not respond with an authentication token #437

Closed migabc closed 1 year ago

migabc commented 1 year ago

Hi,

I'm getting these errors:

Dec  3 20:35:59 raspberrypi homebridge[3226]: [12/3/2022, 8:35:59 PM] [eWeLink] HTTP API host received [eu-apia.coolkit.cc].
Dec  3 20:35:59 raspberrypi homebridge[3226]: [12/3/2022, 8:35:59 PM] [eWeLink] Sending HTTP login request.
Dec  3 20:36:01 raspberrypi homebridge[3226]: [12/3/2022, 8:36:01 PM] [eWeLink] ** eWeLink synchronisation error: **
Dec  3 20:36:01 raspberrypi homebridge[3226]: [12/3/2022, 8:36:01 PM] [eWeLink] Server did not respond with an authentication token. Please double check your eWeLink username and password in the Homebridge configuration.
Dec  3 20:36:01 raspberrypi homebridge[3226]: {
Dec  3 20:36:01 raspberrypi homebridge[3226]:   "error": 407,
Dec  3 20:36:01 raspberrypi homebridge[3226]:   "msg": "appid is unauthorized! xxxxxx",
Dec  3 20:36:01 raspberrypi homebridge[3226]:   "data": {}
Dec  3 20:36:01 raspberrypi homebridge[3226]: }

Any help is appreciated

Thanks,

bwp91 commented 1 year ago

hi, are you using a custom appid in the config?

bwp91 commented 1 year ago

Also which version of the plugin are you using? I do not recognise some of the log text here from the current version of this plugin

migabc commented 1 year ago

No, I'm using the normal config

    "platforms": [
        {
            "platform": "eWeLink",
            "name": "eWeLink",
            "username": "xxx@xxxx.xxx",
            "password": "xxxxxxxxx",
            "countryCode": "xxx",
            "debug": "true",
            "disablePlugin": "false"
        },
migabc commented 1 year ago

I'm using homebridge-ewelink-sonoff https://github.com/bwp91/homebridge-ewelink/issues/129#issuecomment-723661138

migabc commented 1 year ago

It was working fine up to about a month ago

migabc commented 1 year ago

Maybe some thing changed server side

bwp91 commented 1 year ago

Ahh I remember.

Yes the appId that this plugin uses needed to change and now the only plugin and version that works is homebridge-ewelink v10.0.0 or above.

eWeLink stopped the old appId working.

migabc commented 1 year ago

That's a bummer, because I cannot install that new version because I'm running HomeBridge version of 0.4.53 (homebridge-knx@0.3.27 cannot run on higher version)

migabc commented 1 year ago

I can install the homebridge-ewelink-max and it seems to register fine in homebridge

Dec  3 21:49:29 raspberrypi homebridge[6055]: [12/3/2022, 9:49:29 PM] [eWeLink] Veranda Outlets Configure Accessory
Dec  3 21:49:29 raspberrypi homebridge[6055]: [12/3/2022, 9:49:29 PM] [eWeLink] DIMMER1 Configure Accessory
Dec  3 21:49:29 raspberrypi homebridge[6055]: [12/3/2022, 9:49:29 PM] [eWeLink] Christmas Tree Configure Accessory
Dec  3 21:49:29 raspberrypi homebridge[6055]: [12/3/2022, 9:49:29 PM] [eWeLink] Sonoff Basic 3 Configure Accessory

But these accessories are not responding in Homekit app

bwp91 commented 1 year ago

The homebridge compatibility for the knx plugin shows as "homebridge": ">=0.4.28" which means homebridge v1.x will also be valid ?

migabc commented 1 year ago

Right, that's what it says on the repo page on homebridge-knx but it will not register on versions of homebridge higher than 0.4.53

migabc commented 1 year ago

I'm going to try to install the new version of homebridge-ewelink on another instance But first I need to remove the old sonoff accessories from the Homekit app - how can I do that?

migabc commented 1 year ago

since the homebridge-ewelink-sonoff stopped working I was not able to remove the accessories from the cache by using the disablePlugin flag in the config

But I managed to remove the stale ewelink accessories manually from the cachedAccessories file.

And now I have the latest plugin running on a another homebrige instance that does not have the knx dependency and it's working fine

bwp91 commented 1 year ago

Hi, Closing this just as been a little overwhelmed with issues recently. If this is still an issue or a feature you would like implemented then please do re-open this ticket! Thanks for your understanding!