Jump to content


Photo

Plug-In Request - Philips Hue controll.

automation hue light scene mb3 plugin philips controll

Best Answer nxenos83 , 11 February 2017 - 05:20 PM

Did you get the lights + brigde? What do you think? :)

 

Not sure if you are still interested, but I have something working:

 

https://emby.media/c...ling-hue-light/

 

When video items start or un-pause, lights turn off. When video pauses or stops, lights are returned to their original state. Only options that are currently configurable is the transition time on the lights.

Go to the full post


  • Please log in to reply
50 replies to this topic

#41 julianb OFFLINE  

julianb

    Advanced Member

  • Members
  • 126 posts
  • Local time: 05:59 PM
  • LocationNorway

Posted 13 October 2016 - 10:29 AM

Yes, but there might be people who don't have a vera controller, so I have been looking into a standalone switch.

The hardest part is deciding what to do with it.

Dim lights a certain color based on media ratings? Red for rated R and green for rated G?? Lol!

Maybe process a backdrop image and choose a revelation color in it and display the light to something close. Not sure...

 

What about an easy plug-in inside Cinema Mode or something like: 

 

When movie play run script:

When movie pause run script:

When movie stops run script: 
When Trailers play run script
 

And then we can use something like this:

 

http://<hue-bridge-ip>/api/<hue-bridge-user>/groups/<hue-light-group>/action
PUT:{"on":true,"sat":255,"bri":80,"hue":10000,"transitiontime":30}
 
This command works great , you just need to generate a user from hue API and find the group number. Everything is well documented in the HUE API docs. But we need a plugin or something that can run these commands.
 
It is also possible to use .bat files to change lightning with hue(https://github.com/Lanjelin/hue-batch) if that would be easier.
 
Emby & Hue would be soo great! :)


#42 chef OFFLINE  

chef

    Advanced Member

  • Developers
  • 3944 posts
  • Local time: 11:59 AM
  • LocationPeterborough, Canada

Posted 13 October 2016 - 02:32 PM

Okay, what is involved with creating a user and locating a group number?

If that http command line can be used, then I can rewrite the vera plugin easily.

But I dont use hue.

If I were to share my Vera code with you, could you rewrite it to use hue?

I would consider this with the only condition that the plugin has to remain free to use.

Edited by chef, 13 October 2016 - 02:33 PM.


#43 julianb OFFLINE  

julianb

    Advanced Member

  • Members
  • 126 posts
  • Local time: 05:59 PM
  • LocationNorway

Posted 13 October 2016 - 03:20 PM

Okay, what is involved with....

 

Well, I don't know if I have the skills to rewrite your plug-in but I could give it a go.

Anyway, for those who own a hue system they need to locate their hue brigde IP address. Then the best way to create a new "user" is by going to: http://<bridge ip address>/debug/clip.html

 

There you got 3 dialog boxes: URL, Message Body and Respond
To make a user for the brigde you need to:
 

1.0 In the URL box write: http://<bridge ip address>/api

2.0 In the body box  write: {"devicetype":"my_hue_app#phone user"}

3.0 Hit the button on the Hue Brigde and click the POST button on the webconsole. 

 

You will now have a user id (a long string)

 

To find the group you want to controll: 

1. In the URL box write: /api/<username>/groups
2. Click the GET button, and it will respond with all your groups and group numbers. 

 

Example for controlling commands:

 

http://<hue-bridge-ip>/api/<hue-bridge-user>/groups/<hue-light-group>/action
 
(sat and bri can be set between 255 and 0)
 
PUT:{"on":true,"sat":255,"bri":80,"hue":10000,"transitiontime":30}
 
Does this help? :P


#44 chef OFFLINE  

chef

    Advanced Member

  • Developers
  • 3944 posts
  • Local time: 11:59 AM
  • LocationPeterborough, Canada

Posted 13 October 2016 - 03:44 PM

Right, so we could leave a text box open from the user ID and allow the user to get that information and cut and paste it into the config.

We already have the playback and session events attached through the Vera plugin, so we just have to swap out the http commandline.

But, I still don't understand groups.

Does that change serveral lights at once?

#45 julianb OFFLINE  

julianb

    Advanced Member

  • Members
  • 126 posts
  • Local time: 05:59 PM
  • LocationNorway

Posted 13 October 2016 - 03:53 PM

Right...

 

Yes, a group can be anything like: Group "1" is "Living room" with 4 bulbs, group "2" is HomeTheater with 2 bulbs etc..

 
When you setup the hue system for the first time trough the Hue App on android or iPhone you name your "groups" and attach light bulbs to it. To control a group like above, you need the define the group number, which you get by running the command i describes above. It will list all you groups by name and number.


#46 chef OFFLINE  

chef

    Advanced Member

  • Developers
  • 3944 posts
  • Local time: 11:59 AM
  • LocationPeterborough, Canada

Posted 13 October 2016 - 05:02 PM

Okay, so groups are like "scenes" with Vera.

We can swap out the scene classes in the Vera plugin and make them groups.

Could you please send me a copy of the JSON string for groups. The response from that http request?

I just gotta build the class system.

Edited by chef, 13 October 2016 - 05:03 PM.


#47 chef OFFLINE  

chef

    Advanced Member

  • Developers
  • 3944 posts
  • Local time: 11:59 AM
  • LocationPeterborough, Canada

Posted 14 October 2016 - 08:02 AM

I'm buying a set of hue lights this afternoon.

#48 julianb OFFLINE  

julianb

    Advanced Member

  • Members
  • 126 posts
  • Local time: 05:59 PM
  • LocationNorway

Posted 14 October 2016 - 09:19 AM

I'm buying a set of hue lights this afternoon.

Sweet! Here you got the basic API documentation: http://www.developer...getting-started

 

You can register for a dev user and find all the info about the lights and groups here: http://www.developer...tion/groups-api it's free and it's a seperate user from the normal Philips Hue user. 


  • chef likes this

#49 julianb OFFLINE  

julianb

    Advanced Member

  • Members
  • 126 posts
  • Local time: 05:59 PM
  • LocationNorway

Posted 27 October 2016 - 09:15 AM

I'm buying a set of hue lights this afternoon.

 

Did you get the lights + brigde? What do you think? :)



#50 nxenos83 OFFLINE  

nxenos83

    Advanced Member

  • Members
  • 86 posts
  • Local time: 10:59 AM

Posted 11 February 2017 - 05:20 PM   Best Answer

Did you get the lights + brigde? What do you think? :)

 

Not sure if you are still interested, but I have something working:

 

https://emby.media/c...ling-hue-light/

 

When video items start or un-pause, lights turn off. When video pauses or stops, lights are returned to their original state. Only options that are currently configurable is the transition time on the lights.


Edited by nxenos83, 11 February 2017 - 05:32 PM.

  • julianb likes this

#51 julianb OFFLINE  

julianb

    Advanced Member

  • Members
  • 126 posts
  • Local time: 05:59 PM
  • LocationNorway

Posted 12 February 2017 - 05:02 PM

Not sure if you are still interested, but I have something working:

 

https://emby.media/c...ling-hue-light/

 

When video items start or un-pause, lights turn off. When video pauses or stops, lights are returned to their original state. Only options that are currently configurable is the transition time on the lights.

Thank you so much! Will be testing right away! :)







Also tagged with one or more of these keywords: automation, hue, light, scene, mb3, plugin, philips, controll

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users