-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot access non Sonoff devices #88
Comments
PS: got it working.... needed the corresponding APP_SECRET '6Nz4n0xA8s8qdxQf2GqurZj2Fs55FUvM' Now it works with non Sonoff devices as well ! |
Hello @MarioDBianchi The app id and secret was provided by sonoff for this library. The solution i can think, it's to add a new parameter to the class constructor where you can use a different set of parameters. What do you think? |
On Sunday 31st May I noticed that everything stopped working with credential access problem to server. So I thought I'd update from ubuntu 18.04 to 20.04 & update to ewelink-api 2.0.0 to 3.0.0. Still nothing working still failing credentials when connecting to server, then some things started working on Monday evening. I think there were either server issues or INTERNET issues. Now Tue 2nd I'm finding the SonOff devices are working but not the KingArt light switches. If I use the android app all devices are usable, but from the ewelink-api getting the devices just returns the sonoff devices. So I tried using the APP_ID & APP_SECRET as above and I can now see all the devices off the server. Initially couldn't control them but most things are working now. Have a few bits to re-check from updating to ewelink-api 3.0.0 |
@MarioDBianchi @ttz642 please advice, |
If you on ewelink-api 3.0.0 there in node_modules/ewelink-api/src/data/constants.js
|
@ttz642 Thanks alot.. works!! |
@MarioDBianchi @ttz642 and @gaim281 this PR #93 allows to initialize class using custom APP_ID and APP_SECRET
anyone can test this? thank you |
Thanks Martin, It worked as expected !!! If I omit both APP_ID/APP_SECRET in the constructor it pulls only Sonoff devices following the former behavior, when I add the custom credentials, it start accessing all Sonoff and non Sonoff devices as expected. The credentials used to show all kind of devices is: APP_ID: 'oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq', Will do more testing during the weekend and post any new finding here. Regards, Mario. |
Hello, I also confirm that it works for non Sonoff devices with the APP_ID and APP_SECRET mentionned above. Many thanks. |
ESTO FUNCIONA!!!! ESTOY USANDO ewelink-api 3.1.1 |
Quick question... Why does this work for everyone? Aren't secrets supposed to be individual? |
I have also noticed missing devices in on my end (although not strictly non-Sonoff). This happens with every APP_ID and APP_SECRET I've tried, and seems to have started happening around 6+ months ago. I took the liberty of poking around the Ewelink Android app and understanding exactly what was going on. Without getting into the weeds too much, it is 100% down to the of kind session that the login sequence initiates. If you log in with an 'old' id and secret, you can only see certain devices. If you log in using the same method that the Android app uses (presumably with a current id and secret) you get the full list. No idea why they would set it up this way. Maybe they left the "old" login method for backwards compatibility and simply haven't maintained it. Or they're doing it on purpose to make life harder on us. Who knows. Anyway, it may also be notable that the Android app uses many more parameters than this repo's
vs.
The whole login string gets hashed against the APP_SECRET, then the hash is included in the Edit: I was able to extract the new APP_ID and APP_SECRET out of the android app. Works great-- I can see all of my devices. I don't think simply updating the default ID and secret is a good long-term fix, though. It feels like the better solution is to make folks sign up for their own keys via https://dev.ewelink.cc. |
Hi, I have a few non Sonoff devices, basically 1,2 & 4 channel 7-32V relay boards from eachen.cc that are not being shown by the library.
Seems the appid is for Sonoff specific devices only.
Was able to list them directly from postman using a bearer token got with this library and using appid 'oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq' taken from OpenHab's PHP integration API ( https://github.com/kukkjanos/ewelink )
Now, if I place this APP_ID on the data/constants.js file, the getCredentials call does not autenticate leaving the "at" and "apiKey" blank, from there the rest of the call requirig authentication fails.
The text was updated successfully, but these errors were encountered: