-
Notifications
You must be signed in to change notification settings - Fork 10
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
This is great - could maybe have more in the readme.md ... #2
Comments
Using this simple script I have got this errors, at least Im logged in :)
|
@PJanisio and @ajfhodgson well i have a lot of work, that's why im not able to focus on it. Janisio you might have not got that error if u would have used the repo before the latest commit which broke stuff unknowingly cause i left somethings incomplete. 😔 |
Dont let it die :) |
I have done an asynchronous re write of this. Its under development still, check out the new examples. |
And, this isn't a port anymore, its a independent wrapper around the API. Independent of what ewelink-api does. It will have its own features. I cannot assure anything about its future |
Thanks for udpates, but damn im newbie at python, so maybe you can take a look at this syntax error I got:
|
@PJanisio make sure your Python version is 3.9+ |
Damn, mine is 3.6.8 and unfortunatelly I can not update it to 3.9 so far completely. I think i need to run it in its own 3.9 environment. |
Hmmm... Python assignment is simply |
Well okay, Python 3.9.6 installed, credentials are ok -sorry to bother :)
|
Sorry, but |
@PJanisio i m not sure why that error occurs. Im not able to reproduce it |
@PJanisio oh damn, sorry im really sorry, this totally forgot. Its not python 3.9+ you need python 3.10+ for this library. Really very sorry for your troubles |
Don`t worry its not a priority :)
Maybe its a specific device issue. Below my devices list (model):
|
@PJanisio hmm true. I just have sonoff and i thought 'switch' should probably be common to all devices, didnt know it wasnt |
I'd like to thank you for this great tool. I'm currently facing the same issue as "switch" key is not found.
I only have Sonoff Micro installed in my account. |
So after playing around for a bit. I've fixed the issue by replacing the code found in ewelink\models\device.py:50
To:
|
Oh man .. I'd love to contribute to this, seems like the code is written in an advance way that I never tried to type with. All the thanks to you 👍 |
One thing I'm currently facing ..
|
getting this error, any idea how to resolve this? File "test.py", line 30, in |
@Shisir99 make sure you on Python 3.10+ |
Works like a charm ! :)
|
@sputh-the-pigeon yes , I am on python 3.10+ although getting the error. |
@PJanisio the device is |
@Shisir99 I do not get that error. Check if you have multiple python installations or probably any older version of python is running the code. |
Sure, this will work for accessing the state on/off as str, but switches can be turned off and on and current implementation seems to support only |
Exactly, I have done mistype in device id. My bad :) |
@JabLuszko await client.ws.update_device_status(deviceid, switches = ...) This is raw websocket method, all per channel, per device on off methods are built on top of this only, here's the source: ewelink-api-python/ewelink/ws.py Line 71 in 2c6305f
|
Here's the UIID Protocol for each device: You might be able to do something like: await client.ws.update_device_status(deviceid, switches = [dict(switch = "on", outlet = 0), dict(switch = "off", outlet = 1)]) remember that this is only for time being, proper support will be added later |
@JabLuszko added proper support for multichannel device control, check examples at https://github.com/AceExpert/ewelink-api-python/#multi-channel-device-control-first-method |
have you find a solution for this error? I'm facing the same problem |
Not an issue - just some kudos!
I had used https://github.com/skydiver/ewelink-api successfully in node/javascript, but needed a Python version.
Initially I found https://github.com/lucien2k/sonoff-python and spent a day failing to make it work.
But this port just worked!
It could maybe do with a few more instructions in the readme, to indicate how very easy this is to make work, e.g.
Boom! Excellent!
This deserves to be better known.
The text was updated successfully, but these errors were encountered: