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
ntzeke

Philips Hue

Recommended Posts

Just wanted to put in a quick vote for inclusion of Philips Hue lights in home automation.  I currently use this plugin:  https://meethue.wordpress.com/ but would much rather have it in my cinemavision.  I really don't care for the ambilight color changing capabilities - just the 3 levels of light for Stop/Play/Pause.  

I hope it can be included at some point.  Thanks!

Share this post


Link to post
Share on other sites

Home Automation support will not be as polished as we want it on release, but it is functional. Actions will be defined in a file. As of this writing, CinemaVision will support the following:

http A URL to pass JSON commands to.
addon Run a script addon by addon ID 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.

You can have any number of these in one file. Blank lines will separate commands. The first line is the URL, and the second line is the data line for post requests. If the data line doesn't exist, it will use the URL for a get request. We'll be compiling documentation, but for now here's a quick and dirty example:

#This opens the optical drive on the computer
http://127.0.0.1:8080/jsonrpc
{"jsonrpc": "2.0", "method": "System.EjectOpticalDrive", "params": {}, "id": 1}

#And again
http://127.0.0.1:8080/jsonrpc
{"jsonrpc": "2.0", "method": "System.EjectOpticalDrive", "params": {}, "id": 1}

Edited by Ragnarok

Share this post


Link to post
Share on other sites

I'm missing something. Is this just any text file? If so, I'm happy to try this out as I've done a lot of applescripting of my hue lights, so I'm fairly familiar with the JSON api.

It's a text file with a fancy extension! Check out an example here.

Share this post


Link to post
Share on other sites

I hacked together a pretty ugly implementation that seems to work pretty well on my Kodibuntu box.  It uses the text file interface -> a python file -> a .sh file that curls out light dimming commands that progressively dim the lights before the trivia, before the trailers, and finally before the feature.  It's compatible with the ambilight plugin if you use that like I do.  It took me pretty much all night to figure this out and I know it's brutally inefficient, but feel free to test it out and hopefully it works for you as well.

cinemavision_hue_scripts.zip

Share this post


Link to post
Share on other sites

Thanks for putting that together! Do me a huge favor... When we release 0.0.37, install it and test using just these 3 CVACTION files. If I did it right, they should do the same thing you were doing with the TXT, PY and SH files, and simplify everything for you.

Test_Hue_Actions.zip

Share this post


Link to post
Share on other sites

Cool! I'm installing it now, and I'll run through with the scripts I already (have and probably give a gander at what nflchampion created as well). Hope to have some info for you tomorrow!

 

Can I mention again how awesome it is that you keep updating this thing so quickly?

Share this post


Link to post
Share on other sites

So far, using your examples, it's working pretty well! I found it easier to set it to prefab scenes than try to send a command to each light (I have six lights in the theater area, with multiple colors).

 

#Set Theater Group to Theater Scene
http://BRIDGEIP/api/MYUSERID/groups/5/action/
PUT:{"scene":"SCENEID”,"transitiontime”:20}

I'm working in dim and off functions now.

Share this post


Link to post
Share on other sites

I would strongly recommend using the instructions at the bottom of this FAQ to make custom groups hardwired into your Hue Bridge, works like a charm:

https://github.com/michaelrcarroll/script.kodi.hue.ambilight/blob/master/FAQ.md

Yeah, I did that. The scene sets the lights/colors, then I use the group controls to do the dimming, shutting off, and turning back on (because you can control the speed of the transition there). I didn't know how to access the scenes when I built my applescripts last week, so I did it in the kludgiest set-each-light-way that was super annoying. I'll go back and clean those things up now. Thanks!

Share this post


Link to post
Share on other sites

New scripts work great, Ragnarok.  I updated to remove color references (so a scene call could be added if wanted immediately following these commands as per Micah's code above), and focused on getting the light levels right.  They're pretty much where I want them right now, but anyone else with a Hue can feel free to test and modify as they see fit.

I also made Pause, Resume, and Failure settings that can be added into the new config menu.

Hue-Actions for CinemaVision-0.0.38.zip

Share this post


Link to post
Share on other sites

do these cvfiles work without any 3rd application? or do i need openhab or other 3rd party application?

can these cvfiles execute command against hue bridge from cinemavision alone?

 

Share this post


Link to post
Share on other sites

They don't need any 3rd party applications like openHAB, but if you have more than one solution in your HA environment, openHAB is a single pane of glass for all of them, which makes it easy. Take a look here for the example Hue Action files. CinemaVision will talk to Hue directly using those files. You'll need to fill in the blanks, of course.

Share this post


Link to post
Share on other sites

I got them all to work. fantastic and amazin.

 

 

Now, this is maby the wrong forum, but i want to have the abmilight hue kodi plugin running on the cinema intro and trivias. then when trailers come, little light (a bit red), then lights out compleatly during feature film.

 

Problem is the hue kodi script from github keeps spamming hue commands, so even if i turn them off via a cvfile they immediatly start doin the screengrab ambilight thing again. Probably something for another forum and ill maby have to forget the idea of ambilight (changing colour depending on the screen) during the first few minutes.

 

awsome anyways :)

Share this post


Link to post
Share on other sites

latest build of cinemavision dont work with hue  actions anymore for me. i get blackscreen and have to exit sequence manyally. anyone else get this prob?

Jup...got the exact same problem. All went fine in 0.4.43. but each newer version doesnt work. So I'm stuck at 0.4.43 and cant update to a newer version.

See my sequence attached if interested.

noip v02.cvseq

Share this post


Link to post
Share on other sites

I posted this in the "support forum" and got a great answer that they found the bug and will hopefully correct this in the next update (47).

So it will work again soon ib et.

Share this post


Link to post
Share on other sites

Wow - I asked the question about the Hue and then you guys really took the ball and ran with it.  

I have tried the action files and I can get the light dimmed before the preview but any other action file I can't seem to get to work.  Where should I place the other cvaction files?  Before the feature?  

Any advice is appreciated.  

 

Thanks!

Share this post


Link to post
Share on other sites

Worked a bit on it and was able to get Hue.Feature Lights working (turns off at feature).  I had to put the action file right before the feature.  

So now I have:

*Hue-TrailerLights dimming the lights before the trailers

*Hue-FeatureLights turning off the lights before the movie

I still want lights to turn on to "dim" upon pausing and turning to full "on" when I press stop

I will play around with what order I put the action files in and report back when I can

Share this post


Link to post
Share on other sites

its just to make an actionfile with what dimvalues you want and set to pause. 

 

what is it you have trouble with? where to put the file or how the file should look?

Share this post


Link to post
Share on other sites
3 minutes ago, Rippmaster said:

its just to make an actionfile with what dimvalues you want and set to pause. 

 

what is it you have trouble with? where to put the file or how the file should look?

For the Hue-SequencePause.cvaction I have the following:

PUT:{"on":true,"sat":6,"bri":100,"hue":16591,"transitiontime":40}

It doesn't seem to work.

As far as where to put the file - I was referring to the order in the cinemavision launcher - before or after the feature or does it matter?

 

 

 

Share this post


Link to post
Share on other sites

Found it!  First off - I don't know what I am doing with any of this - I just figure it out as I go.  

I was putting the pause, abort, and resume actions in the sequence itself.  I finally found that they go under the configuration settings and not as part of the sequence.  

LOVING IT!  Thanks so much for the hard work.  

 

  • Upvote 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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