ewelink service error

thanks, i’ll wait then — meanwhile i’ll use eWeLink, don’t feel like taking everything apart to flash it, but it’s a shame all these APIs keep changing all the time, i have the impression we’re all heading towards full Zigbee?? let’s be patient

1 Like

For your information, I just ran some tests with their nodejs module, and everything is erroring out as well.

It seems they have enabled OAuth2 authentication, and that it is necessary to do the same as with Google Home or Alexa to log into your account (ewelink login screen, code exchange, use of client ID/secret…) and, if that’s the case, this integration would only be available from Gladys Plus (once the necessary modifications have been made).

I’m continuing my investigations by following the information found here:

1 Like

I don’t understand all the technical details, but I noticed a loss on both the Gladys side and the IFTTT side, which now offers IFTTT/Ewelink control via an account upgrade (€).
I was looking for an intermediary service to bypass the actions but to no avail.
HomeAssistant seems to be among the supported integrations, so their connection method must have become paid.
Thanks for the research work .. :+1:

Another discussion announcing the end of API v1 in favor of using API v2

And here is the doc for API v2, with pricing at $2,000 per year for a company.
Otherwise the « personal » mode is available, but requires a more complex configuration by the Gladys user (create an application on https://dev.ewelink.cc/, wait for its validation by the eWelink teams, retrieve the client ID/secret OAuth2…).

To check with @pierre-gilles what we plan to do:

  1. discuss with eWelink to see if they will charge this fee to Gladys and integrate OAuth2 into Gladys Plus (as with Google or Alexa)
  2. open the « personal » mode with a tutorial to properly configure your account
  3. we abandon eWelink and go DIY (DIY Sonoff pour une connexion locale), but I don’t think all devices will be compatible

I don’t know how many people use Ewelink, but $2000 per year seems difficult for me right now, even via Gladys Plus :sweat_smile:

For now, I’m leaning towards option 2 or 3.

Also, it’s worth looking at Ewelink’s plans regarding Matter — couldn’t a Matter integration solve this issue if, in the long run,

3 Likes

I think that’s a good Matter lead!!!
I can quickly test that with Google Home.

1 Like

@AlexTrovato If you want some gear, tell me and I’ll pay for it :slight_smile:

1 Like

So, the Sonoff / eWelink hardware I own is not Matter-compatible, but I asked about a possible Sonoff firmware update for the older devices to make them Matter-compatible.
I think I found some simulators for Matter devices to run a few tests, and it seems to me that the Matter Node.js library is not complete, so I’ll start with the simplest: integrate an on/off device, and we’ll evolve the service iteratively.

1 Like

Ok, that works :slightly_smiling_face: anyway it’s always satisfying to see it work in real life, so if you ever want, like, a Matter smart plug, let me know!

The response from Sonoff:

Dear Alexandre Trovato,

Thanks for your email.

Since we have the matter device (MINIR4M), we do not have a plan to upgrade the firmware of old devices to make them Matter-compatible.

Regards,
Taylor in SONOFF

In the meantime, Tasmota appears to be compatible:

But Node.js is rather lacking in libraries at the moment…

1 Like

Too bad!

As for Matter? We have 2 options for that:

  • Either we create a « native » service in Gladys with a Matter Node.js library (but then, we need to see whether their official library is usable yet)
  • Or we launch a container like we do with Zigbee2mqtt, and Home Assistant’s Matter container is open-source and has a WebSocket API, we could integrate with it. After that, we become very dependent on their changes, and since it’s not necessarily a container made to be used by other projects, the API may change…

If you want to dive into the Matter topic, we can discuss it in a dedicated thread if you want :wink:

I’ll start by maintaining the eWeLink service with a personal API and per-user client ID/secret generation, with the proper documentation; that will give the Matter library some time to make some progress.

1 Like

Hello, a few updates on this.

I’ve made good progress on the changes, I can now manipulate the devices again.
I still need to do some validations but I’m confident it will be ready very soon for a testing phase.

What’s mainly missing is the documentation, which becomes very important, because there are some actions to perform on the ewelink side to integrate Gladys.

In a second phase, I will look into:

  • using the devices via the local network to avoid too many calls to the API (because the new API is limited in the number of calls)
  • testing websockets with ewelink to avoid polling and thus limit API calls (for devices that are not on the local network)
  • adding compatibility with other devices

See you soon

PS: for those interested, prepare a Gladys test instance, I will give you the docker image and the doc shortly

3 Likes

Cool, I’m interested.
Thanks @AlexTrovato

1 Like

In Notion, there is already a page that you can edit.

Uh, I must have missed something about that. I can find info on the forum, I imagine.

You have the info here.

Re

The documentation is here, you need to wait ~48 hours before the eWeLink account is active:

and the test Docker image:

atrovato/gladys:ewelink

Thanks everyone.

1 Like

Hello,
so I’ve made progress on the WebSocket part (to do what’s recommended in the official documentation), it’s still the same image tag atrovato/gladys:ewelink (available in about 2 hours) and the same doc.

1 Like

While waiting for someone other than me to test the new version of the service, I’m providing the PR.

And the documentation:

There will be other changes / improvements to follow, but they can come in other PRs, as they don’t affect the implementation of API v2.

3 Likes