ewelink-api icon indicating copy to clipboard operation
ewelink-api copied to clipboard

Missing colour control?

Open scargill opened this issue 4 years ago • 8 comments

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

scargill avatar Feb 22 '21 13:02 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?

johnsteeleMolinare avatar Apr 04 '22 15:04 johnsteeleMolinare

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?

scargill avatar Apr 05 '22 11:04 scargill

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

AndrazPustotnik avatar Dec 23 '22 14:12 AndrazPustotnik

Some noob questions @AndrazPustotnik

  1. Do I install this directly over the current nod-red-contrib-ewlink package?
  2. Which node does this affect? I assume the eWeLink device node as I see no new node in the list after install.
  3. 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 avatar Jan 25 '23 08:01 spoonwzd

@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 }

AndrazPustotnik avatar Jan 25 '23 10:01 AndrazPustotnik

Thanks @AndrazPustotnik

I'm starting to think I might have better success going the Tasmota route with this Sonoff Zigbee coordinator...

spoonwzd avatar Jan 25 '23 15:01 spoonwzd

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.

johnsteeleMolinare avatar Sep 07 '23 17:09 johnsteeleMolinare

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

AndrazPustotnik avatar Sep 09 '23 12:09 AndrazPustotnik