Jump to content

Welcome, Guest!

Be a part of CinemaVision today! Once registered and logged in, you will have access to public chat and your own private messenger, you can view and contribute guides, collaborate on the forums, review downloads, give reputation to your fellow members, contribute content and so much more. Registering is quick and completely free, so what are you waiting for?
   Sign In    Sign Up

Become a RedCarpet Club Member Today!

   Join Now
  • 0
block134

Philips Hue setup

Question

I just got a Philips Hue Lux and and I am having problems getting it to work with CinemaVision.  When ever I try to test the action file I get an error in the log it doesn't do anything with my lights.  I have used the same command that is in the action file in the CLIP API debug tool and the command works with that so I know the address, API key, and command is correct.  

 

This the error in the log, if you need the entire log I can post that as well.

14:25:29 T:6612  NOTICE: Thread LanguageInvoker start, auto delete: false
14:25:29 T:6612  NOTICE: -->Python Interpreter Initialized<--
14:25:29 T:6612  NOTICE: [- CinemaVision -]: Passed args: ['addon.py', 'test.actions', 'PAUSE']
14:25:29 T:6612  NOTICE: [- CinemaVision -] (API): Rating Systems:
14:25:29 T:6612  NOTICE: [- CinemaVision -] (API):   MPAA: [NR, G, PG, PG-13, R, NC-17]
14:25:29 T:6612  NOTICE: [- CinemaVision -] (API):   FSK: [18, 16, 12, 6, 0]
14:25:29 T:6612  NOTICE: [- CinemaVision -] (API):   DEJUS: [18 Anos, 16 Anos, 14 Anos, 12 Anos, 10 Anos, Livre]
14:25:29 T:6612  NOTICE: [- CinemaVision -] (API):   BBFC: [R18, 18, 15, 12, 12A, PG, U, Uc]
14:25:29 T:6612   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.AttributeError'>
                                            Error Contents: 'NoneType' object has no attribute 'decode'
                                            Traceback (most recent call last):
                                              File "C:\Users\Brian\AppData\Roaming\Kodi\addons\script.cinemavision\addon.py", line 52, in <module>
                                                settings.testEventActions(args[0])
                                              File "C:\Users\Brian\AppData\Roaming\Kodi\addons\script.cinemavision\lib\settings.py", line 233, in testEventActions
                                                cvutil.evalActionFile(path)
                                              File "C:\Users\Brian\AppData\Roaming\Kodi\addons\script.cinemavision\lib\cvutil.py", line 233, in evalActionFile
                                                abortPath = kodiutil.getSetting('action.onAbort.file').decode('utf-8')
                                            AttributeError: 'NoneType' object has no attribute 'decode'
                                            -->End of Python script error report<--

 I also cant get the XBMC Philips Hue addon to work so I am not sure what I am doing wrong.  Might be something with the firmware on the hub or my network.  For the Hue addon it will detect the address and API key when I press the link button but fails and wont connect.

Share this post


Link to post
Share on other sites

22 answers to this question

Recommended Posts

  • 0

That's odd. I ran out and bought a Hue bridge to see if I could figure it out. Hah! Glad it's working. We'll try to get some instructions up.

Share this post


Link to post
Share on other sites
  • 0

Also, just a small thing.  There is two diffrent addons (xbmc hue plugin) and (kodi hue plugin) , and how the actionfiles should look to enable/disable these is slightly varied. :) but its maby not relevant in this case.

Share this post


Link to post
Share on other sites
  • 0
On 11/11/2015, 9:23:51, Rippmaster said:

Also, just a small thing.  There is two diffrent addons (xbmc hue plugin) and (kodi hue plugin) , and how the actionfiles should look to enable/disable these is slightly varied. :) but its maby not relevant in this case.

I ended up just uninstalling the xbmc hue plugin and just used the cvaction file for cinemavision with a put command to control the lights.  

Share this post


Link to post
Share on other sites
  • 0

Here is another follow up I have.  Everything is still working for me and I still don't know why it wasn't working the first day.  I have also gotten the plugin to work, but I had to use a different one then I started with.  The first one I was using was specifically for just dimming the lights and not changing the colors, I was never able to get it to connect the hub after had it auto discover the ip address and api key.  The one that works for me is the one does the ambilight and the dimming in the same addon.

 

I was also able to get the cvaction files to work for me in order to disable and re-enabling the hue light addon.  One thing I noticed was that if I stopped the movie early that hue addon never started again.  My fix for this was to add the re-enable script to my fail script so CV will run both when I stop a movie before it ends. 

  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0
On 11/13/2015, 2:54:39, block134 said:

Here is another follow up I have.  Everything is still working for me and I still don't know why it wasn't working the first day.  I have also gotten the plugin to work, but I had to use a different one then I started with.  The first one I was using was specifically for just dimming the lights and not changing the colors, I was never able to get it to connect the hub after had it auto discover the ip address and api key.  The one that works for me is the one does the ambilight and the dimming in the same addon.

I was also able to get the cvaction files to work for me in order to disable and re-enabling the hue light addon.  One thing I noticed was that if I stopped the movie early that hue addon never started again.  My fix for this was to add the re-enable script to my fail script so CV will run both when I stop a movie before it ends.

You should be able to add the action to enable the Hue addon to your Abort action file. If that's what you meant by fail script, you're doing it right! :)

Share this post


Link to post
Share on other sites
  • 0

This is more of a how to than an answer to the question.

 

How I Got My Hue System To Work With CinemaVision

or... For us who ain't tech savy...

1) Make sure your bridge is connected to your network and functioning properly.

2) In your browser go to www.meethue.com/api/upup this will tell you the internalipaddress of your bridge. It will be in a format similar to 192.168.0.255 or 10.0.0.255

3) Next go to http://<internalipaddress>/debug/clip.html

4) In the URL type /api

5) In the Message Body type {"devicetype":"CinemaVision"}

6) Press the button on your bridge.

7) Click on Post.

8) You will get a long jumbled string of characters after the word username. Copy that string, its your username.

9) Use the username and your internalipaddress in the cvaction files. To change a group of lights, use

http://<internalipaddress>/api/<username>/groups/1/action
PUT:{"on":true,"bri":32,"sat":254,"hue":47000,"transitiontime":30}

Change the /1/ to the group of lights you want to control.
Changing it to /0/ will control all your lights.

10) If you want to control a single light, use

http://<internalipaddress>/api/<username>/lights/1/state
PUT:{"on":true,"bri":32,"sat":254,"hue":47000,"transitiontime":30}

Change the /1/ to what ever number bulb you want to control.


Hue Basic Colors:
0 = Red
12750 = Yellow
25500 = Green
46920 = Blue
56100 = Purple
65280 = Red

 

Edited by Timmiejane
  • Upvote 3

Share this post


Link to post
Share on other sites
  • 0
On 1/18/2016 at 5:28 PM, Timmiejane said:

This is more of a how to than an answer to the question.

 

How I Got My Hue System To Work With CinemaVision

or... For us who ain't tech savy...

1) Make sure your bridge is connected to your network and functioning properly.

2) In your browser go to www.meethue.com/api/upup this will tell you the internalipaddress of your bridge. It will be in a format similar to 192.168.0.255 or 10.0.0.255

3) Next go to http://<internalipaddress>/debug/clip.html

4) In the URL type /api

5) In the Message Body type {"devicetype":"CinemaVision"}

6) Press the button on your bridge.

7) Click on Post.

8) You will get a long jumbled string of characters after the word username. Copy that string, its your username.

9) Use the username and your internalipaddress in the cvaction files. To change a group of lights, use

http://<internalipaddress>/api/<username>/groups/1/action
PUT:{"on":true,"bri":32,"sat":254,"hue":47000,"transitiontime":30}

Change the /1/ to the group of lights you want to control.
Changing it to /0/ will control all your lights.

10) If you want to control a single light, use

http://<internalipaddress>/api/<username>/lights/1/state
PUT:{"on":true,"bri":32,"sat":254,"hue":47000,"transitiontime":30}

Change the /1/ to what ever number bulb you want to control.


Hue Basic Colors:
0 = Red
12750 = Yellow
25500 = Green
46920 = Blue
56100 = Purple
65280 = Red

 

We're definitely going to use this to put a guide together. Interested in helping author that?

Share this post


Link to post
Share on other sites
  • 0

Also to get a list of Group #'s or Light #'s type:

http://<internalipaddress>/api/<username>/groups/ then press GET.

http://<internalipaddress>/api/<username>/lights/ then press GET.

Also may help others to know, on my mac (for some reason) it has trouble with the quotation marks.  I then get errors in the script.  I need to re-open and look at the code and copy and paste the "good" quotes over the "bad" lol

Share this post


Link to post
Share on other sites
  • 0

I have done this and it worked to dim the lights, thank you! 

Do you have a format that will bring the lights back on when Paused or Sequence ended. 

Great Work! 

Edited by philkent
Earlier problem resolved.

Share this post


Link to post
Share on other sites
  • 0
9 hours ago, philkent said:

I have done this and it worked to dim the lights, thank you! 

Do you have a format that will bring the lights back on when Paused or Sequence ended. 

Great Work! 

Hey Phil,

Check out our guide for Philips Hue. It's even got a link to some example Actions, including one for pausing your Sequence.

Share this post


Link to post
Share on other sites
  • 0

Hey @Ragnarok, cheers for that link. 

As it happens though, since using the above method, I have managed to do exactly what needed by changing the Brightness Amounts, and then reversing the sequence in effect so that I can still use the above to Dim Slowly, have the Lights Up quickly when paused, and down again when Resumed, all by playing with level numbers and Transition time etc. 

Only small problem is that when I use the full "dim-down" setting, and set the lights to zero, they go right down to practically nothing, but dont actually turn off. Bit of a strange one that one. 

I am only using standard white Philips Hue Dimmers, but that makes no difference am sure. 

Everything else though is working really well. Had tried various methods before, and this was by far the best and worked first time. 

Cheers. 

Phil. 

 

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, philkent said:

Hey @Ragnarok, cheers for that link. 

As it happens though, since using the above method, I have managed to do exactly what needed by changing the Brightness Amounts, and then reversing the sequence in effect so that I can still use the above to Dim Slowly, have the Lights Up quickly when paused, and down again when Resumed, all by playing with level numbers and Transition time etc. 

Only small problem is that when I use the full "dim-down" setting, and set the lights to zero, they go right down to practically nothing, but dont actually turn off. Bit of a strange one that one. 

I am only using standard white Philips Hue Dimmers, but that makes no difference am sure. 

Everything else though is working really well. Had tried various methods before, and this was by far the best and worked first time. 

Cheers. 

Phil. 

 

That's my fault. I had the Feature Action set to turn the light down and not off. I've updated the Hue-FeatureLights.cvaction file in our download section. If you'd like to change it manually on your system, here's the code:

http://<hue-bridge-ip>/api/<hue-bridge-user>/groups/<hue-light-group>/action
PUT:{"on":false,"transitiontime":30}

Let me know how it goes!

Share this post


Link to post
Share on other sites
  • 0
46 minutes ago, philkent said:

Thats perfect!! 

Works fab now, fully integrated into my system, great work. 

Cheers. 

Excellent! I'll leave it like that in the Hue Action Files download so folks don't run into the same issue you did. Anything you can think of that we can do to improve the guide and Action Files? I'm starting to put together an Advanced guide for Hue, and trying to fill it as well.

Share this post


Link to post
Share on other sites
  • 0
14 hours ago, Ragnarok said:

Excellent! I'll leave it like that in the Hue Action Files download so folks don't run into the same issue you did. Anything you can think of that we can do to improve the guide and Action Files? I'm starting to put together an Advanced guide for Hue, and trying to fill it as well.

Sounds good! I think more info could be shared regarding the Trivia Slides and Trailer Intros, things like that. I did a lot of searching along with the Trivia stuff on this site to fill my needs, but its not very clear at all from the start that you need to be finding these things yourself and where indeed to get them from. 

I managed to find a stack of free trivia downloads which helped, and found some good intro videos to add in there too, but again, I think for the less-experienced and newer person, it would help to maybe have some direct links and maybe some "Default Trailers / Slides" to use so that people can get off the ground and running quickly. 

I will try and video my sequence or something soon so that you can see it in action etc. 

Will let you know if I think of more ideas. This is a grea program though for sure. I struggled for quiite some time to get CE to work with  no joy, and then came across this. The only probelm I was having was with the lights / Actions, but once I found this method of doing the lights, it all changed. 

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, philkent said:

Sounds good! I think more info could be shared regarding the Trivia Slides and Trailer Intros, things like that. I did a lot of searching along with the Trivia stuff on this site to fill my needs, but its not very clear at all from the start that you need to be finding these things yourself and where indeed to get them from. 

I managed to find a stack of free trivia downloads which helped, and found some good intro videos to add in there too, but again, I think for the less-experienced and newer person, it would help to maybe have some direct links and maybe some "Default Trailers / Slides" to use so that people can get off the ground and running quickly. 

I will try and video my sequence or something soon so that you can see it in action etc. 

Will let you know if I think of more ideas. This is a grea program though for sure. I struggled for quiite some time to get CE to work with  no joy, and then came across this. The only probelm I was having was with the lights / Actions, but once I found this method of doing the lights, it all changed. 

I'm actually working on a guide for each module. I created the Action Files/Home Automation/Sequence guides first because frankly, they're the most complicated. We actually built CinemaVision to work out of the box with absolutely zero configuration. When you install, if you haven't set your Content path, the add-on is in Demo Mode. It downloads a small number of trivia slides in the background, and streams all of the video bumpers and trailers from our YouTube channel. You can actually do nothing and have a working setup. If you want to customize things, you have to put in some work, though. We're also planning to take advantage of our website API to integrate the add-on with the website and make all of our content downloadable directly from the add-on.

I'm looking forward to seeing your video!

Share this post


Link to post
Share on other sites
  • 0

Will do my best to record it for you to show - Its only our front room set-up, but its now working really well, with slow-dimming stages, lights part-up on pauses etc. Really pleased with how its turned out. 

Your system is very good, and very user-friendly too I found. 

Share this post


Link to post
Share on other sites
  • 0
27 minutes ago, philkent said:

Will do my best to record it for you to show - Its only our front room set-up, but its now working really well, with slow-dimming stages, lights part-up on pauses etc. Really pleased with how its turned out. 

Your system is very good, and very user-friendly too I found. 

That's great to hear! Exactly what we were going for, honestly. Let us know if you need any help with anything else, or have any ideas to put in the pot. We've got some time before our next round of development starts. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

About Us

CinemaVision began in 2014 as a collaboration to create content for use with your home theater, offering movie trivia slides and video bumpers. It has since grown to be THE PREMIER WAY to create and customize your preshow experience. Download the CinemaVision add-on for Kodi today from the official Kodi repository, and easily create a sequence of trivia, videos, trailers, home automation triggers and more that will bring the experience of a movie theater straight to your screen!

×

Important Information

By using this site, you agree to our Guidelines and Terms of Use.