Xiaomi Yeelight RGBW E27

Just found a good article for updating node.js in pi good to share here as a pre task just have to rebuild raspbian due to corrupted SD card
https://www.raspberrypi.org/forums/viewtopic.php?f=34&t=140747

1 Like

Anyone been able to edit the smartapp for use with the Yeelight strip lights instead of just bulbs?

Hi, if anyone has any trouble setting the server up on a 64bit system, I’ve posted the solution in the github issues:
https://github.com/davidcreager/smartthings-smartbulbs/issues/3
Basically the pre-requisits need to be recompiuled for your OS+Architecture combo. It’s quite easy and mainly automated. Maybe an idea for the maintainer to nuke the node_modules directory and use npm to install to make sure this isn’t an issue (although the dev packages for bluetooth may still need to be installed via apt first). Hope this helps


Hi @Davec, I got an interesting problem related to Alexa which I mentioned previously but I have been playing with webcore and xiaomi button to control the dimming level of yeelight, the problem is when I use Alexa to turn off the yeelight the status is not reflected in smartthings and when my piston runs I cannot turn the lights on in webcore as the DTH thinks the light is on and won’t let me turn it on again in webcore, if I just use the xiaomi button to control the dimming the world is perfect but when I put the Alexa to the mix it messed up the status of the yeelight, pressing the configure button in DTH not helping either otherwise I can do it in webcore

Update: I also tried refresh/configure in webcore and it doesn’t make any difference, the only thing that seems to work is turn the bulb off in core and it seems to force it to normal state again

Hi @finalbillybong would you be able to let me know how you create a simulated switch in Smartthings ?

Thanks

I am also interested in this - I have one on order.

Is it possible to make it work (I am willing to tinker) or is it incompatible?

@Davec, I used a mqtt bridge in ST and mqtt running home assistant to sync back the on/off state from yeelight back to ST using homeassistant’s automation, yes! :laughing:

Basically what has to be done in mqtt and hass

2 Likes

Does anyone have this bulbs working with the LightwaveRF dimmers? they work on any lamp except the ones I have setup with lightwave RF dimmers. As soon as I screwit, it blinks but then doesn’t power up at all

Also when trying to setup the server I get this error when I start it

Newbie alert!
Would love to get this going so grabbing a raspberry pie today. Any recommendation on which one to get . I’m guessing I wouldn’t need a top end one with all the hdmi outputs etc any help’d be appreciated , cheers

I am using Pi 3 but I think this program is not resource intensive at all never uses more than 10% of cpu, RAM usage is minimal

Am I missing something here - grateful for your thoughts.

I have a raspberry pi and cannot seem to install this - for some reason not all the commands in the readme are recognised. For example - adduser. According to a google search, I should be using useradd.

Does this mean anything to anyone? My pi is using Debian if that makes a difference - i.e. Perhaps I need to change the command syntax?

If I need a different terminal or something else, please let me know as I am a complete pi / Linux novice.

Thank you

having some problems starting the service on my Pi. here’s the error message i’m getting. Does anyone have any advice?
I notices that the path was pointing to /yeelight-smarththings/servce.jb - that doesn’t exist when following the instructions

root@raspberrypi:/var/opt/node/yeelight-smartthings# systemctl status smartbulbserver
● smartbulbserver.service - node.js server to manage yeelight bulbs
Loaded: loaded (/etc/systemd/system/smartbulbserver.service; enabled)
Active: failed (Result: start-limit) since Fri 2017-09-22 05:33:05 UTC; 2s ago
Process: 3141 ExecStart=/var/opt/node/yeelight-smartthings/server.js (code=exited, status=217/USER)
Main PID: 3141 (code=exited, status=217/USER)

Sep 22 05:33:05 raspberrypi systemd[1]: Unit smartbulbserver.service entered failed state.
Sep 22 05:33:05 raspberrypi systemd[1]: smartbulbserver.service holdoff time over, scheduling restart.
Sep 22 05:33:05 raspberrypi systemd[1]: Stopping node.js server to manage yeelight bulbs

Sep 22 05:33:05 raspberrypi systemd[1]: Starting node.js server to manage yeelight bulbs

Sep 22 05:33:05 raspberrypi systemd[1]: smartbulbserver.service start request repeated too quickly, refusing to start.
Sep 22 05:33:05 raspberrypi systemd[1]: Failed to start node.js server to manage yeelight bulbs.
Sep 22 05:33:05 raspberrypi systemd[1]: Unit smartbulbserver.service entered failed state.

That might be the error I am getting- will check and revert.

In the meantime, take a look at this link and see if this helps (it didn’t work for me
):

Thanks for this! I’ll give it a shot and report back.

Hi,

Can I use this server code on a router instead of a RPi or NAS?
The Asus AC-68U has an ARM Cortex A9 CPU which is 32-bit like the RPi.

If you can install node, yes you can run it.

Looks like it’s been done: http://gulivert.ch/nodejs-on-tomato/

Generally when someone says “Raspberry Pi” they mean “always-on PC capable of running Node.js” although sometimes they also mean “running Linux” and sometimes (in the case of the RPi3) “with Bluetooth”

So you can install the code but if that code is relying on certain hardware or software which your router doesn’t have, it won’t work.

Thanks for the reply.

Just found out that the router is using the SoC without hardware floating point unit and won’t be compatible with newer node.js releases anyway.

I’ll have to order a new RPi 3 instead.

Thanks , got it going in the end. My problem was that I was i downloaded the v2.0 and not the Master Branch.

Got that installed and then ran in to the error from @WBM I went through those steps and now have it up and running! My only problem is the setting for smooth doesn’t want to kick in - even when changed it still turns on sudden but can live with that :smiley:

Great work @Davec

Finally got the bulbs delivered but currently I cannot get the devices to be discovered.

My setup are:

  • Raspberry Pi 1B with raspbian stretch
  • Node.js v 6.x
  • Smartbulb server (master branch) installed according to instruction on github
  • Yeelight RGB bulb with developer mode turned on

I install the Smartapp and device handler via IDE and then go to

Smartthings app > Automation > Add a Smartapp > My App > add “Smartbridge Connect” > Discover Devices

no devices discovered even after 10 minutes.

Live logging seems to suggest that Smartthings hub can’t connect to RPi bridge as ip is not set.

Am I missing any step here?

8:43:09 PM: debug ssdpDiscover: Discovering SmartBridge current Bridge address = null:null
8:42:59 PM: debug verifyDevices: bridge ip not set
8:42:52 PM: debug ssdpDiscover: Discovering SmartBridge current Bridge address = null:null
8:42:49 PM: debug verifyDevices: bridge ip not set
8:42:39 PM: debug verifyDevices: bridge ip not set
8:42:35 PM: debug ssdpDiscover: Discovering SmartBridge current Bridge address = null:null
8:42:28 PM: debug verifyDevices: bridge ip not set
8:42:18 PM: debug ssdpDiscover: Discovering SmartBridge current Bridge address = null:null
8:42:14 PM: debug getChildDevices(false), children=0
8:42:08 PM: trace getPhrases(), state.welcomeIssue = null
8:42:04 PM: trace getPhrases(), state.welcomeIssue = null
8:42:01 PM: debug getChildDevices(false), children=0
8:42:01 PM: debug getChildDevices(false), children=0