Yeelight service / add on

  Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
DaLanik Offline
Posting Freak
Posts: 847
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #16
After a bit of playing and googling, managed to get it to work from Kodi... Yey! Now only to perfect the addon, but important thing is that it communicates and works... Smile
find quote
peppe_sr Offline
Posting Freak
Posts: 1,319
Joined: Mar 2006
Reputation: 22
Location: Italia, Sicilia, Siracusa
Post: #17
we want a video as soon as possible Big Grin
find quote
DaLanik Offline
Posting Freak
Posts: 847
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #18
Just making it Smile





plus unboxing: (my kids love making these videos as cameraman) Smile Smile



find quote
DaLanik Offline
Posting Freak
Posts: 847
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #19
OK, the early beta test version is available if somebody wants to test, just install test repo from my repository and install YeeMee addon v0.6 ... it works with 1 bulb for play/pause/stop... probably buggy as hell but it works Smile

I'll have to write the instructions on how to enable the bulb to work with Kodi... in case somebody didn't figure it out, it works by default only with Xiaomi software and you have to enable developer mode on the bulb.
(This post was last modified: 2017-04-25 23:32 by DaLanik.)
find quote
smitchell6879 Online
Fan
Posts: 715
Joined: Jan 2016
Reputation: 15
Post: #20
that is awesome ... makes me want to go and buy a bulb just to try out.... do it have to have a internet connection or can it run purely off of a LAN network. without any internet access?

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX: A Blurred Vision
Madnox Holiday Mod
find quote
DaLanik Offline
Posting Freak
Posts: 847
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #21
It needs to have internet connection to set it up the first time, but then it doesn't. It works off the LAN. Hmm, I dunno how I would test this, to block the net to the lightbulb on firewall? Smile
find quote
DaLanik Offline
Posting Freak
Posts: 847
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #22
OK, here's the "official" support thread:

http://forum.kodi.tv/showthread.php?tid=313197

and page:

http://projects.lanik.org/KodiProject_YeeMee.htm
find quote
smitchell6879 Online
Fan
Posts: 715
Joined: Jan 2016
Reputation: 15
Post: #23
So to set it up I have to login to some remote server basically to verify everything and get username and password set?

That seem to always be the problem for me with limited internet I have tried different little devices in the past but always end up carring the back because something has to login into a remote server every time before using...

As far as you addon with 4 light I can see real potential with the ambience... It would be so cool to have them turn off and on depending on what is being done in kodi

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX: A Blurred Vision
Madnox Holiday Mod
find quote
DaLanik Offline
Posting Freak
Posts: 847
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #24
Yes, 1st initialization, you have to make xiaomi username/password, then logon from app on phone with that username/password and it will find the bulb. Then you turn on DEVELOPER mode in the app, assing STATIC IP adress on your router to the bulb, and that's it.

It is not EVERY TIME. Only 1st time.

Any ideas on features for this adon are welcome! Smile
(This post was last modified: 2017-04-27 08:48 by DaLanik.)
find quote
peppe_sr Offline
Posting Freak
Posts: 1,319
Joined: Mar 2006
Reputation: 22
Location: Italia, Sicilia, Siracusa
Post: #25
(2017-04-25 22:15)DaLanik Wrote:  Just making it Smile
Rofl

in the end the bulb from kodi could only be turned on & off?
turn on the light on kodi startup or, maybe not possible, contextualize lights to the movie or music visualization played..... like ambilight tv
Peppe
(This post was last modified: 2017-04-27 09:22 by peppe_sr.)
find quote
DaLanik Offline
Posting Freak
Posts: 847
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #26
That is about the only thing that is NOT possible because it would requre the level of access which we don't have from Python in Kodi and I suppose platform-specific, i.e. analyze audio or video.

You can do other things with bulb beside turn on & off - set brightness, color, set color cycling... flash for notice etc.
find quote
mohican9 Offline
Junior Member
Posts: 3
Joined: Apr 2017
Reputation: 0
Post: #27
Thank you for the addon. It works like a charm.

I think it would be great to create the same actions for Cinemavision ( https://cinemavision.tv/guides/home-automation/ )
There are actions for the Philips Hue Bulb already...
find quote
DaLanik Offline
Posting Freak
Posts: 847
Joined: Apr 2016
Reputation: 31
Location: Prague, CZ
Post: #28
Quickly skimming throught the documentation for Cinemavision, it seems Cinemavision is capable of running python scripts:

Quote:As of this writing, CinemaVision will support the following protocols:

http:// A URL to pass JSON commands to.
addon:// Run a script addon by addon ID and pass in arguments.
command:// Run a command or application at the OS level and pass in arguments.
module:// A Python script that has a main() method that is imported and main() is called
python:// Call any normal Python script via the OS.
sleep://<milliseconds> Sleep for the time specified in milliseconds

So you could run (even now!) the test bulb function from my script, I suppose in similar manner I am running it from settings i.e.

RunScript(special://home/addons/service.yeemee/standalone.py,testyee1)

I am not familiar with the CinemaVision syntax but if you can run a script and pass it a parameter, it should work. to test, the script is "special://home/addons/service.yeemee/standalone.p" and param is "testyee1" (lights the bulb nr. 1 for 3 seconds - not much but enough for test.

If this works, we can make more events....
find quote
smitchell6879 Online
Fan
Posts: 715
Joined: Jan 2016
Reputation: 15
Post: #29
Well that sucks I can only fine it in 220 volts.... I need 120

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX: A Blurred Vision
Madnox Holiday Mod
find quote
mohican9 Offline
Junior Member
Posts: 3
Joined: Apr 2017
Reputation: 0
Post: #30
The following action:

addon://home/addons/service.yeemee/standalone.py,testyee1

is working as action of Cinemavision.

So can you help me what other arguments can I use in place of ""testyee1"?

Thanx again Smile


(2017-04-27 12:57)DaLanik Wrote:  Quickly skimming throught the documentation for Cinemavision, it seems Cinemavision is capable of running python scripts:

Quote:As of this writing, CinemaVision will support the following protocols:

http:// A URL to pass JSON commands to.
addon:// Run a script addon by addon ID and pass in arguments.
command:// Run a command or application at the OS level and pass in arguments.
module:// A Python script that has a main() method that is imported and main() is called
python:// Call any normal Python script via the OS.
sleep://<milliseconds> Sleep for the time specified in milliseconds

So you could run (even now!) the test bulb function from my script, I suppose in similar manner I am running it from settings i.e.

RunScript(special://home/addons/service.yeemee/standalone.py,testyee1)

I am not familiar with the CinemaVision syntax but if you can run a script and pass it a parameter, it should work. to test, the script is "special://home/addons/service.yeemee/standalone.p" and param is "testyee1" (lights the bulb nr. 1 for 3 seconds - not much but enough for test.

If this works, we can make more events....
find quote