Homey Community Forum

Yeelights App

yeelights

Control Yeelights using Homey

App Store Page: https://homey.app/a/com.yeelight

IMPORTANT

Currently Yeelights are supported within the Xiaomi Mi Home app. When the Xiaomi Mi Home App was first developed communication with Yeelights followed the same protocol as the Xiaomi Mi/MiJia WiFi devices. This is a reversed engineered protocol and is not very user friendly and stable. At some point a better method to control the Yeelights became available and I implemented support for that. Now the Yeelights and the Xiaomi devices have nothing in common anymore and I have decided to split off the Yeelights into their own Yeelight app.

This means the Yeelight functionality within the Xiaomi Mi Home app will not be developed and supported anymore. I’m aware of the hassle it will be but you are asked to un-pair your Yeelights from the Xiaomi Mi Home app and re-pair them again in the new Yeelight app.

Description

This app allows you to control your Yeelights using Homey. All type of Yeelights should be supported.

Adding Yeelights

Before being able to add your Yeelights as devices in Homey you will need to enable the “Developer Mode” or “LAN control” in the official Yeelight app. You can find this under the settings of your light within the Yeelight smartphone app.

Donations

I enjoy creating apps for Homey and try to support them as best as I can. If you enjoy using my apps a donation in return for the time I put into this is much appreciated.

3 Likes

Changelog

v1.0.3 - 2019-12-01

Small fixes to improve pairing process and avoid crashes when removing Yeelight devices.

v1.0.2 - 2019-11-24

Fix for Yeelights that have been online and come online again.

v1.0.1 - 2019-11-23

Initial version of a standalone app for Yeelights. Please migrate your devices from the Xiaomi Mi Home app to this dedicated Yeelights app.

1 Like

Hi, just a question - “migration” means here - remove from Xiaomi App, add to Yeelight and recreate all related flows, right ? :slight_smile:

Unfortunately yes, you can also add them first to the Yeelights app next to the Xiaomi app. And then remove them from the Xiaomi app. This might make it easier to update your flows with the new device.

1 Like

Actually it says “No new devices” … are you sure it can be added along to Xiaomi app? I don’t want to remove them, as you know I faced this issue with Yeelights even in previous Xiaomi app upon removal…
Anyone else can confirm they can add lights in parallel to Xiaomi?

I managed to add 4 of my 5 yeelights to the new yeelight app (alongside the Xiaomi app). The app does not recognise the 5th yeelight. It’s working in the xiaomi app, but in the yeelight app it also says “No new devices…” So for me the answer is yes and no. Some can be added parallel to Xiaomi, but not all.

1 Like

I have 2 LED strips and 2 led color bulbs.

All of them are added but at one LED bulb color homey say device not Available.

What must I do to add that light to

I’m also getting this error when trying to add my Yeelight LED Bulb (Color) with the new app. The Yeelight is currently working fine with the “old” app (Xiaomi Mi Home).

About 60 users seem to have made the switch already but it seems a couple of you guys are experiencing the issue where the lights can not be found. I cant explain this and in my own tests it always discovers my lights which makes it hard to troubleshoot. Best advice I can give is to restart the app and try again.

If any of you guys know how to run the app from the command line you could try and run this debug version which should show the raw discovery result. That would at least tell me if the devices are not discovered or that they are not shown in the pairing wizard because they get filtered out (due to some incorrect filtering).

Reminder!
Check your flow cards before removing the Xiao Mi Home lights.
I experienced a lot of work when you don’t :see_no_evil:

So when running debug, it list ALL devices (the list is quite huge) but it says anyway, no new devices found…

— Profile your app’s performance at https://go.athom.com/app-profiling?homey=
─────────────── Logging stdout & stderr ───────────────
2019-11-29 10:17:02 [log] [YeelightApp] Initializing Yeelight app …
broadcast returned no devices
broadcast advertisement result
{ message_type: ‘discover’,
device:
{ id: ‘0x0000000007cd7235’,
address: ‘10.0.0.142’,
port: 55443,
model: ‘ceiling1’,
onoff: false,
dim: 1,
mode: 2,
temperature: 5200,
rgb: 0,
hue: 0,
saturation: 0,
connected: false } }
broadcast advertisement result
{ message_type: ‘discover’,
device:
{ id: ‘0x0000000007cd7235’,
address: ‘10.0.0.142’,
port: 55443,
model: ‘ceiling1’,
onoff: false,
dim: 1,
mode: 2,
temperature: 5200,
rgb: 0,
hue: 0,
saturation: 0,
connected: false } }
broadcast advertisement result
{ message_type: ‘discover’,
device:
{ id: ‘0x0000000007c87af2’,
address: ‘10.0.0.120’,
port: 55443,
model: ‘ceiling1’,
onoff: false,
dim: 1,
mode: 2,
temperature: 4000,
rgb: 0,
hue: 0,
saturation: 0,
connected: false } }
broadcast advertisement result
{ message_type: ‘discover’,
device:
{ id: ‘0x0000000007c87af2’,
address: ‘10.0.0.120’,
port: 55443,
model: ‘ceiling1’,
onoff: false,
dim: 1,
mode: 2,
temperature: 4000,
rgb: 0,
hue: 0,
saturation: 0,
connected: false } }

And btw it says Connected:false yet I can control them over Yeelight app and even previous Xiaomi app…

Same result after restarting the app. Below is the output from the debug version when trying to add a device.

─────────────── Logging stdout & stderr ───────────────
2019-11-29 15:51:48 [log] [YeelightApp] Initializing Yeelight app …
broadcast returned no devices
broadcast advertisement result
{ message_type: ‘discover’,
device:
{ id: ‘0x0000000007d13b3e’,
address: ‘192.168.2.167’,
port: 55443,
model: ‘color’,
onoff: true,
dim: 70,
mode: 1,
temperature: 5750,
rgb: 16777215,
hue: 0,
saturation: 0,
connected: false } }
broadcast advertisement result
{ message_type: ‘discover’,
device:
{ id: ‘0x0000000007d13b3e’,
address: ‘192.168.2.167’,
port: 55443,
model: ‘color’,
onoff: true,
dim: 70,
mode: 1,
temperature: 5750,
rgb: 16777215,
hue: 0,
saturation: 0,
connected: false } }
broadcast returned no devices
broadcast advertisement result
{ message_type: ‘discover’,
device:
{ id: ‘0x0000000007d13b3e’,
address: ‘192.168.2.167’,
port: 55443,
model: ‘color’,
onoff: true,
dim: 70,
mode: 1,
temperature: 5750,
rgb: 16777215,
hue: 0,
saturation: 0,
connected: false } }
broadcast advertisement result
{ message_type: ‘discover’,
device:
{ id: ‘0x0000000007d13b3e’,
address: ‘192.168.2.167’,
port: 55443,
model: ‘color’,
onoff: true,
dim: 70,
mode: 1,
temperature: 5750,
rgb: 16777215,
hue: 0,
saturation: 0,
connected: false } }
Raw results after discovery
{ ‘0x0000000007d13b3e’:
{ id: ‘0x0000000007d13b3e’,
address: ‘192.168.2.167’,
port: 55443,
model: ‘color’,
onoff: true,
dim: 70,
mode: 1,
temperature: 5750,
rgb: 16777215,
hue: 0,
saturation: 0,
connected: false } }

You can ignore that, it’s not relevant.

Could you both try again, I pushed some changes to the debug branch on Github that will spit out some different debug logging.

1 Like

Are you sure Debug branch has been updated recently ? I see updates 21 hours ago…

Whoops, forgot to push the changes. It’s updated now.

I think there might be an error in the updated debug version. Please see the output below when running the app.

─────────────── Logging stdout & stderr ───────────────
/lib/util.js:74
console.log('Already in added devices: 'added_devices.hasOwnProperty(result.device.id));
SyntaxError: missing ) after argument list
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions…js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at Module.require (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/index.js:1:253)
at require (internal/module.js:11:18)
— INFO: com.yeelight has been killed —

Ugh, I need more sleep. I fixed that now.

Haha… Well, the app didn’t crash this time, but I guess the new logging was not as expected. Please see the log lines below.

─────────────── Logging stdout & stderr ───────────────
2019-11-29 19:26:02 [log] [YeelightApp] Initializing Yeelight app …
discovered and saved new devices
{}
Raw results after discovery
{}

Ok, that’s a little step closer. Could you run the updated version on Github again.

1 Like