Release - YeeMee - (Control Yeelight Smart Bulb from Kodi)

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #1
http://projects.lanik.org/KodiProject_YeeMee.htm

YeeMee addon

[Image: logo_yeemee.png]


This addon controls Xiaomi Yeelight from Kodi. It is possible to set addon to turn on/off light(s) on video start, stop or pause. Also you can specify whether to turn it on/off immediately or smoothly and specify time in which to perform the transition (is smooth transition specified). You can also specify light color for all operation(s) individually as well as light intensity in percent.

If option is stop (video stopped), you can set to return to previous state (if it was on it will return to on if it was off it will return to off).

Advanced features allow you to specify time-frame i.e. turn lights on/off only between 10pm and 7am, and you can also disable light activation/deactivation for videos shorter than specified time.

You can set up to 4 YeeLights, and each can be set and controlled individually, i.e. different operation, color and intensity.

In order to install it, first install my REPO: Lanik Repo

Then install add-on, and configure it:

First set up how many Yeelights you have (1-4). Then set IP address for each Yeelight. There is an option to automatically search for bulbs but it doesn't work every time. Try it several times if it doesn't work. Eventually it will find the bulbs Smile DO NOT FORGET TO TURN ON THE DEVELOPER MODE ON THE BULBS! Finally, set actions and options (color, transition, effect, brightness) for play, pause and stop.

This should work on all platforms. Any comments welcome.

[Image: kodiplugin_yeemee.jpg]




[Image: donate_button_1.png]
(This post was last modified: 2017-05-01 19:08 by DaLanik.)
find quote
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #2
v0.7
- Option to turn the light(s) on Kodi start
find quote
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #3
Some instructions on how to get this working;

First of all, you need to create an Mi-account on Xiaomi. With this account you will be able to connect to your bulb. It is needed to "activate" only once, after you will control it from your LAN.

Then you need to connect your Yeelight to your phone. With the instruction manual, there came a barcode with link to the app MiHome - don't use this. You will want to uninstall it (if you did install it) and use Yeelight app.

This Yeelight app is identiacal to MiHome, but has couple more options, one of them being to turn the "developer mode", which MiHome lacks. Developer mode means that you can use the Yeelight bulb with other devices and other software than Xiaomi's.

After I installed Yeelight app, I had to reset the bulb. Yeelight wouldn't find it because it was already found by MiHome. Reset the bulb by turning it off and on for 5 times. Wait 2 seconds after each turn off/on. At the 5th on, it should start cycling colors and after the cycle is finished (several seconds) it should light in pure white color. This means the bulb was reset.

Now, try searching for it from Yeelight app from your phone. It goes without saying that your phone should be connected to your WiFi. It will disconnect once, ask for a password to your WiFi, and then it will find the bulb. You will have the bulb in the list of devices.

Do this for all/any bulbs you have.

Now. I suggest giving your bulbs static IP adresses. You can do this on your router. Just make a reservation for the IP the bulb was already given by your DHCP server.

OK, now you need to go to the Yeelight app and turn on the developer mode. This will make the light bulb controllable by other software than Xiaomi's.

After you install the YeeMee addon, enter the bulb IP adress into the settings, and go to testing and test the bulb. Test function should light the bulb for 3 seconds and turn it off.

That's it!
find quote
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #4
v0.8
- Improved settings
find quote
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #5
v0.9
- Fixed bug with short videos less than 1 hr
find quote
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #6
v.91
- Option to blink bulbs at startup
- Option to blink bulbs at startup and turn them on
- Small code and settings cleanup
find quote
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #7
v.92
- Updated translations
- Option to set active time to sunrise-sunset


The new option to set active time - no can be set to manual (you set the hours) or automatic - then it gets your IP adress from the internet and according to your adress it gets position and sunrise and sunset times for your city, and set active hours accordingly. It works automatically, so it sets the times on each run.
(This post was last modified: 2017-04-29 21:50 by DaLanik.)
find quote
nickr Offline
Team-Kodi Member
Posts: 17,702
Joined: May 2009
Reputation: 357
Location: Christchurch NZ
Post: #8
Thanks for this. I don't have a yeelight but I have other xioami products and the beginnings of a home automation system.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
mishmashed Offline
Junior Member
Posts: 4
Joined: Aug 2015
Reputation: 0
Post: #9
Great work, would it be possible to have presets for colours, maybe including flow mode as well as the rgb value option? I really like the "home" preset on the Yeelight app but don't know the rgb value for this setting.
find quote
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #10
Probably possible but I have to take a look at it... Smile You mean to have flow all the time, i.e. when the pause is pressed?
(This post was last modified: 2017-04-30 12:55 by DaLanik.)
find quote
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #11
v.93
- Fixed problem that it executed lights actions on non-video stop
find quote
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #12
v1.0
- Displays test results
- Automatic bulb IP adress discovery
- Display active time even when on automatic
- Differentiate between bulb types (color, mono)

In normal repository (not test repo!)
find quote
mishmashed Offline
Junior Member
Posts: 4
Joined: Aug 2015
Reputation: 0
Post: #13
(2017-04-30 12:46)DaLanik Wrote:  Probably possible but I have to take a look at it... Smile You mean to have flow all the time, i.e. when the pause is pressed?

Yes would be nice to have the option of flow continual when pause pressed.
Is it possible to extract the RGB values from the yeelight app presets myself so that i could manually enter them into Yeemee settings?
find quote
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #14
I thouht of adding option to have flow when music is played.

I could probably attach flow to color 000000 because that one is not used as it is black Smile so when you set 000000 it does flow....
find quote
DaLanik Offline
Posting Freak
Posts: 848
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #15
(2017-05-01 21:48)mishmashed Wrote:  Is it possible to extract the RGB values from the yeelight app presets myself so that i could manually enter them into Yeemee settings?

I don't know how to extract colors - that is all in Yeelight/MiHome app...
find quote
Post Reply