Release LIFX for v2 API Plugin - Home Theater - NATEKODILIFX
#31
I re-arranged my bulbs to put each room in a separate group. But as long as the lifx api is returning a different structure for groups vs labels the plugin will need to account for that.
Reply
#32
So happy to find this. It's what I backed the original Lifx Kickstarter for in the first place.

Had some issues which I fixed, and wanted to share with anyone having the same issues.

1) Firstly, I downloaded the zip from the OP GitHub link. This gave me a zip NateKodiLifx-master.zip

Inside that was folder 'NateKodilifx-master'
Inside that was folder service.NateKodi.LIFX and a zip called service.nateKodiLIFX.zip

2) That was my first confusion. After trial and error, I decided to copy the folder service.NateKodi.LIFX to my desktop.

Inside that folder was the three files 'addon.xml' 'lifx.cfg' and 'service.py'

3) I opened lifx.cfg (used Notepad++ instead of Notepad as it is easier to read), and entered my apiKey obtained from https://cloud.lifx.com/settings (you have to create a new apikey using the 'generate new token' link). I left the rest as my Kodi box is already in the same room as my Lifx group 'Living Room'. I then saved the file (when using Notepad++ you have to save it instead of just closing it).

4) I then created a zip containing the folder 'service.NateKodi.LIFX' that I copied to my desktop in step 1. I made sure that in the root of the zip was just this folder, and not the cfg, xml and py files which should be inside the folder itself.

5) I then copied it to a USB, and installed the addon via the usual Kodi method.

This is where the second problem was encountered, as when I played a movie to test it, nothing happened. I therefore checked the logs of Kodi and saw that it was getting an error when trying to connect to the address "https://api.lifx.co" This jumped out at me as I know the address for the api should be .com not .co

6) Despite having zero python experience, I then went back to step 3, but this time edited 'service.py' using notepad++. I found only one reference to the problematic address, which if using notepad++ was on line 82:

lifxCloud = 'https://api.lifx.co/v1beta1/lights/'

So I simply changed this to:

lifxCloud = 'https://api.lifx.com/v1beta1/lights/'

I then rezipped the file as in step 4, copied the new file to my KodiBox, uninstalled the addon, rebooted my KodiBox, and reinstalled it.

Voila. Happy as Larry. Lights did exactly what they should be doing, and my girlfriend was impressed Smile


Sorry if this was a long winded post, but I thought I should share my own steps to get it working as noobs like me can easily get lost in this post. A request to the OP would be to fix the type-o in the GitHub zip's 'service.py' and also remove the unnecessary zip file from the root of the master github zip.

Cheers again for the great work.
Reply
#33
sounds great! unfortunately it does not work for me. What am I doing wrong?
I have the API key and I did it as described ... where do I register my lamps online?
rebuilding ....
Reply
#34
just checked the whole thread again - just to see if I missed something ...
I have installed
script.module.requests but in version 2.4.3 not the version 1.2.7 and
script.module.simplejson in version 3.3.0 not in version 2.0.10

I am running KODI 15.0 on Ubuntu 14.04.1 LTS

I followed the guide which was Posted by theCheek - with the changes done in the .cfg and .py file ... still no success.
rebuilding ....
Reply
#35
EDIT: Nevermind. I did what theCheek did and it works great now. Thanks!
Reply
#36
(2016-05-22, 03:44)TwoClipz Wrote: EDIT: Nevermind. I did what theCheek did and it works great now. Thanks!

Excellent! Glad I could finally provide some help, instead of constantly asking for it!
Reply
#37
Why is it so difficult to install this service? Couldn't it be easier to offer a package without all those zip files?
HTPC homemade - BOX SilverStone Lascala LC17 - CPU Intel Core i3-3220T (2.8 GHz) - CM ASRock B75 Pro3 - HD Crucial M4 64 Go - CG ASUS GeForce GT 610 Low Profile 1 GB - RAM Corsair Vengeance Low Profile Blue Series 4 Go (2x2 Go) DDR3 1600 MHz CL9 - POWER Be Quiet! Power 7 400 W 80PLUS - REMOTE Harmony 650 - Frodo 12.2 XBMCbuntu Aeon-Nox 4.1.9 - MacPro 2010 - SMB
Reply
#38
Lightbulb 
Question:

Where do a change the brightness of the light in 'Play Mode'
Reply
#39
thanks guys, got this working fine on LibreELEC
Reply
#40
actually, its not supposed to adjust the lights when they're off right? mine keep coming on (dimmed) when i am playing tv shows this morning.
Reply
#41
Hi, just got some lifx bulbs and i'm loving this addon . thanks to phoniclynx for providing it and also thanks to TheCheek for the instructions on getting it going.

Ive had a play around in the service.py file and managed to change the TV show playing light to white at %20 which i find more suitable. is there a way to change the setting for what the lights go to while paused? I did manage to get it to change but then when playback ended it returns to the paused setting instead of the pre playback setting. also, would it be possible to have a keyboard shortcut to set the lights to the paused setting without pausing for when im eating while watching tv instead of opening up the lifx app on my phone.
Reply
#42
so i followed all the directions and i got it working. but when i watch a tv show. my lights dim to blue then stay on. when i watch a movie. they dim white and turn off just like they should. any way to fix that? i have zero experience with any programing languages.. but im good with puzzles
Reply
#43
Anyone still using this? I noticed the lights won't turn back on after dimming anymore.

EDIT: I ended up creating my own plug-in but it's not very well written.
Reply

Logout Mark Read Team Forum Stats Members Help
LIFX for v2 API Plugin - Home Theater - NATEKODILIFX1