Xiaomi Yeelight RGBW E27

Any movement on this, @Davec?

Yes. Slow going though. I have a big learning curve. I hope to have an alpha release by Sunday.

Pretty sure it is going to work. I only have one lamp although I have ordered more so won’t be able to test multiple lamps

I do think it is worth it. These bulbs seem very good value and decent quality

3 Likes

This is fantastic news. I currently have four of these. One colour and three white and using IFTTT and I virtual switch is so slow.

Thanks so much for your effort.

So my alpha test exposed a rather nasty mistake. I have adopted the wrong pattern,. I started expecting to discover my bulbs with my node.js services for smartthings and I then set up a device for each bulb. First problem was that the bulbs local control requires socket comms, so I had to make my server receive the commands from smartthings and forward them to the bulbs. This sort of worked for 1 bulb…however due to the need for each bulb (in this pattern) to have its own devicenetworkid,(mac) smarthings was not receiving the responses to the commands (they are routed via devicenetworkid).

So…I think I now need to implement a Hue bridge type pattern, whereby the bridge only expects to communicate with the node server and their are child devices of the bridge…

Short status is that I am having to start again, albeit with the node server and bulb socket stuff working

I guess I am learning lots!!!

4 Likes

That last set of changes has gone much better than expected…might be was an easier approach or just I had gone through the learning curve…I now have one bulb working pretty well…no bells and whistles, but you can power on/off, set color and brightness. My second bulb has also arrived, so will have a play tomorrow…all needs tidying and packaging…slight curve is I am away for a week from tomorrow afternoon…ill see how I go in the morning and post again

4 Likes

Fantastic. Well done and keep up the good work.

Thanks for this, buddy.

Awesome stuff. I just ordered one in hopes you can get it to work. Thanks for the work!

Sorry I was away for a week…back on it now…still looking good…hopefully have something good to report soon

1 Like

I am just wondering are your work based on this or something completely different?

Thanks
Ny

1 Like

Havent seen that one…I used https://npmjs.org/yeelight2 as a basis…then changed it a bit…

Any updates, would love it if the devices work with smartthings.

Grrr…takes longer to actually finish then I thought
Ive created a GitHub with a readme that indicates whats outstanding…Mostly works

I am a newbie at this stuff…and I do intend to sort the credits to the various peoples code that I used

3 Likes

We have to need a node js server running next to smartthings?

It looks like it if you look at the GitHub repo. The previous link also mentions the use of a node.js server and considering Yeelight works with cloud to cloud integration it would need something between Smartthings and Yeelight.

So I’ve installed the Smartapp and DTH. I’ve downloaded the files from Github when I run the server.js and go to the Smartapp to connect the light, it doesnt find them. I assume I have done something wrong or missed out an improtant step?

Thanks for all your work @Davec

mmmmh Ok so does the server find the lights? at the moment the server runs connected to the terminal…will sort it to run as a daemon soon (today if poss) can you provide the output from the server?

1 Like

So I have added a .service file for system to manage the server and also added instructions…if you would like to give it a go the GitHub is updated

Ah…forgot one thing that is very important! Each yeelight bulb must be in ‘developer mode’ which is set (once) using the Yeelight app

1 Like

I am currently using Windows to test. My total output after running ‘node server.js’ is -

Yeelight Bridge - Manage Yeelight devices
Starting Discovery Port=1982 MCAST-ADDR=239.255.255.250 leng=85
Yeelight Brisge - Starting SSDP Announcements for Bridge Device (YeeBridge) IP:PORT-192.168.0.14:8082 MAC=xx-xx-xx-xx-xx-xx
add to multicast group
discSock.on listening Address= 0.0.0.0
no did or loc found!

I’m going to try your instructions on my raspberry pi 2 in an hour or so. I’ll let you know how it goes.

Thanks again

OK. Im getting further with the Pi. The server seems to find my blubs. I have four. When I go into the Yeelight Smartapp it does see all four blubs but once I have checked them and clicked next nothing loads on the next screen. If I click Done I get ‘Error -bad state. unable to complete the configuration.’

Here is the output from the Yeebridge: https://pastebin.com/d5D6Buc8