ewelink-api
ewelink-api copied to clipboard
Missing colour control?
Hi
I just grabbed the node-red-contrib-ewelink node set for Node-Red to try out my new Itead Sonoff B05 RGB Smartlamp. Everything works perfectly, but neeither in the NODE set, nor in the API methods can I find any reference to the colour controls, or scenes, schedules or timers. All I seem to be able to do is turn the light on or off - or check it's state etc. HELP...
Regards
Peter Scargill
Just wanted to check if there is any way to use the colour controls/ brightness for this? On/Off is great but I would need those controls for it to be really useful. Unless anyone knows another node that can do this with the Zigbee Bridge?
I've been busy house-moving and lots of other things like a busy time with my blog- but I'd really like to see colour controls in here... any chance?
I've been busy house-moving and lots of other things like a busy time with my blog- but I'd really like to see colour controls in here... any chance?
I just forked the repo where I converted from CJS to ES6 and added function setDeviceParams(<deviceId>, <paramsObject>)
. With that function you can change any parameter a light include (r, g, b, brightness, mode...). Try it: npm install AndrazPustotnik/ewelink-api
Some noob questions @AndrazPustotnik
- Do I install this directly over the current nod-red-contrib-ewlink package?
- Which node does this affect? I assume the eWeLink device node as I see no new node in the list after install.
- Can you provide an example flow on how I send the setDeviceParams to an eWeLink device?
I've tried, but I don't seem to be able to figure this out on my own... :(
Thanks in advance.
@spoonwzd You will have to use my forked repo. It is personalized so I can't guarantee anything. It also may not be public in the future.
Here is example:
1.) npm install AndrazPustotnik/ewelink-api
2.) import eWeLink from 'ewelink-api'
3.) const eWeLinkConnection = new eWeLink({ email: your_email, password: your_password });
4.) in async function: let response = await eWeLinkConnection.setDeviceParams(deviceId, params);
note that if you don't know device params you can get it by: const devices = await eWeLinkConnection.getDevices()
also here is example of params for lights: const params = { colorR: 255, colorG: 25, colorB: 125 }
Thanks @AndrazPustotnik
I'm starting to think I might have better success going the Tasmota route with this Sonoff Zigbee coordinator...
Just wanted to check if anyone is able to build Andraz’s additional Colour options into the node-red app? I don’t have enough knowledge to follow the method described of using it in this post. It would be great if it was added in a user friendly way to the nodes.
For everybody trying to use skydiver's ewelink-api, it is not working anymore. This is the new api: https://github.com/coolkit-carl/ewelink-api-next