Jump to content

Plug-In Request - Philips Hue controll.


julianb
Go to solution Solved by nxenos83,

Recommended Posts

Well, unfortunately I am not Ina financial position to invest at the moment.

 

Perhaps in the upcoming months it could very well be a possiblity.

 

And yes, it is possible to code the lights to only set scenes at night. ;)

Link to comment
Share on other sites

bondfreak

I am not really into programming for .NET unfortunately. Don't even own a Windows PC :(

Will nevertheless look into it and try to integrate the lights by my own. For a first step, just connecting to the bridge and trying to set a color. Thanks for the github link btw :)

 

 

EDIT: Ok, the first step is getting the IDE running with Ubuntu :D

Edited by bondfreak
Link to comment
Share on other sites

bondfreak

Okay, first update ;)

 

The IDE is running perfectly fine and I already managed to create a simple configuration page, so that you can enter the Hue Bridge IP (or click the "Find" buttton). Now I'm going for the hard part: HueAPI requests :D

  • Like 1
Link to comment
Share on other sites

  • 4 months later...
julianb

Okay, first update ;)

 

The IDE is running perfectly fine and I already managed to create a simple configuration page, so that you can enter the Hue Bridge IP (or click the "Find" buttton). Now I'm going for the hard part: HueAPI requests :D

So, did you manage to get it working? :)

Link to comment
Share on other sites

  • 4 weeks later...
chef

Is there a NuGet to help setup a plugin environment for emby theatre available on git?

Link to comment
Share on other sites

chef

I suppose s plugin which controls Phillip hue lighting. I bought some hue lighting.

 

But, I think I might try a server side plugin first to try out the hue API.

 

Then maybe try something else if it is successful.

  • Like 1
Link to comment
Share on other sites

Koleckai Silvestri

Can't you control your Hue lighting with the already existing Vera system?

  • Like 1
Link to comment
Share on other sites

chef

Can't you control your Hue lighting with the already existing Vera system?

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...

Link to comment
Share on other sites

julianb

Can't you control your Hue lighting with the already existing Vera system?

Well, then you have to own a Vera system. I do not. I think there are alot of people that own a Philips hue system, that do not own a Vera system. 

 

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...

Yup :) 

 

There is alot of cool things that could be done. But maybe the most useful functions I could think of now is:  Lights off when movie starts, lights on when movie stops, lights dimmed when movie paused etc :)

Link to comment
Share on other sites

Well, then you have to own a Vera system. I do not. I think there are alot of people that own a Philips hue system, that do not own a Vera system. 

 

Yup :)

 

There is alot of cool things that could be done. But maybe the most useful functions I could think of now is:  Lights off when movie starts, lights on when movie stops, lights dimmed when movie paused etc :)

 

That's what I'm doing with my vera already, but it would be nice to skip the vera and directly control the lights with hue since it would eliminate some lag. That and content aware colors would be cool too.

  • Like 2
Link to comment
Share on other sites

  • 2 months later...
julianb

So, if this would be a reality in the future, would it be a Emby Theater plug-in or a server plug-in?

 

If I had the skills I would love to make a simple plug-in :)

 

Sent fra min LG-H815 via Tapatalk

Link to comment
Share on other sites

  • 4 months later...
julianb

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! :)
Link to comment
Share on other sites

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
Link to comment
Share on other sites

julianb

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

julianb

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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

julianb

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

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

 

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

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
julianb

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

 

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

Link to comment
Share on other sites

  • 3 months later...
  • Solution
nxenos83

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/community/index.php?/topic/44781-plugin-for-controlling-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
  • Like 1
Link to comment
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
×
×
  • Create New...