Phillips Hue Plex Plugin

The Logitech Harmony Remote would work for dimming the lights (among other things) when you start an activity like "Watch a movie" (which would run Plex). They recently rolled out a big update that makes the process even easier.

https://support.myharmony.com/en/harmony-experience-with-philips-hue

I'm not sure about a Plex plugin (which would be great), but Philips TV's with Ambilight from 2011 onwards can connect to Hue using an app.

https://youtu.be/6wVVFHdziBI

https://play.google.com/store/apps/details?id=com.tpvision.ambilightplushue&hl=en_GB

I had been looking for something like Ambilight for a while and found something which as far as I can tell does reasonably well. It works by creating a color grid of what is going on on-screen and generating an average. It is not Ambilight but a hell of a lot better than spending 2k+ on an ambilight tv if you already have hue.

https://github.com/Blodjer/HueImmersive - I did not make this and take no credit what so ever.

It runs fine on both my windows and mac desktops.

On my windows machine I combine it with the Hue ledstrips and get decent color reproduction. On my 'mac' media center I combined it with a couple hue bulbs which also work oke but are less accurate with the color matching. The biggest flaw in this application is that you have to start it manually every time you want to use it and more importantly, for some reason 100% brightness in the app is nowhere near 100% of the lamps.

It took me a bit of jiggering with the settings to get it working better but it's a decent enough solution. For me lowering the resolution of the color matching grid to something under 50 'blocks' worked best.

Please let me know if you guys have decent results with it!

HueImmersive works pretty good on my desktop :) Now I'll have to figure out how to make it respond on the Samsung TV hehe

This would be so amazing, got my Hue Lux starter kit coming in the next few days and I’d love to have my RasPlex setup be able to auto dim/restore the lighting in my cinema room. As it’s not possible install software in RasPlex my other option would be to install on my Plex server but it’s on FreeNAS (FreeBSD) so no init for daemons but rather rc. Downloaded all the prerequisites, plexHue and added entries to rc.d rather than init.d but when trying to start plexHue from the command line I get a startup error because there’s no vars.sh file in the init directory (because init is not used). In short, can anyone advise me how I can get this working on FreeBSD and/or could this script be adapted to work under FreeBSD by default?

There’s work in progress with the HomeAssistant automation platform (https://github.com/balloob/home-assistant) to read from Plex client status’ and result in controlling various tasks like the changing of Hue lights… It’s still in dev, but might be worth keeping an eye on :wink:

Been working on a Hue channel lately. For those who want to try it : https://github.com/ledge74/HelloHue I will post in a separate thread in the coming days !

@ledge74 said:
Been working on a Hue channel lately. For those who want to try it : GitHub - ledge74/HelloHue: Sync your Philips Hue lights with Plex! I will post in a separate thread in the coming days !

That looks awesome. I had a quick look last night, do I need to edit the prefs.json manually for this to work?

@WilhelmStroker No you shouldn’t. Just do it the regular way: on plex web hover your mouse on the channel icon and click on the gear icon to open the channel’s preference pannel

Doh, that makes sense :smiley: I was using a tablet so didn’t get the gear icon, and when I opened the channel I got an error message. Going to have a play with this tonight then, as I’ve been looking forward to using Plex with my Hue lights.

Keep me posted on how it works for you :slight_smile:

@ledge74 said:
Keep me posted on how it works for you :slight_smile:

Thanks for this, I been trying it, but have some strange behavior when I set it to Dim it actually brighten the lights and when set it to Turn Off it acts as Dim and won’t turn of.
Would it be possible to turn on/off a scene instead of the Dim/Turn Off?

@coz2001 here is what’s beneath each function:

  • dim set brightness to 100 (out of 254)
  • turn on set brightness to 254
  • turn off just tells the bulbs to turn off.

Try to restart the plugin (or PMS) and try again. Maybe your preferences have to be reloaded. If you still have the issue you can send me logs so I can know what’s going on.

The library I use (phue) does not support scenes for the moment but I will look into it.

I set this up remotely during lunch and will have a stab at setting it up once I’m home. One thing I noticed was that the options are `nothing, dim, turn off and turn on’. How about an option to restore to the previous setting? For example, I have all my lights turned on and when I start playing a movie, I’d like to dim the lights. When I pause, or stop, I’d like the lights to be restored to the setting they were before I started watching a movie. Is that an option in the library you use?

@WilhelmStroker I am still investigating on how to implement this feature, as I have noticed that not every clients return the stopped state in PMS. I will keep you posted

Happy to test clients for you if you need to (Currently running Windows Phone, Windows tablet, PMP, XBOX and Roku)

I have released a new version that supports the reset action. @WilhelmStroker if you could test it on your clients that would be great, for me it works fine on RasPlex and iOS but it takes a few minutes when triggered from PHT for mac.

I have created a topic for the channel here : https://forums.plex.tv/discussion/193095/rel-hellohue-control-your-philips-hue-lights-via-plex?new=1

I will try tomorrow. Tried the first version tonight and that is working great on all devices I tested with. Very cool :slight_smile:

any news about Ambilight features with philips hue on a plex client?

Hi,

i can switch my lights manually - so bridge to plugin connection works fine - but its not listen to events. It seems that its not connecting, but i can’t find the problem.

this is “tail -f” of the log after i´ve restarted plugin. Any suggestions what i should try? thx in advance.

2015-12-12 16:22:30,563 (7faf97edb700) : INFO (init:451) - Adding room 1 to rooms …
2015-12-12 16:22:30,565 (7faf97edb700) : INFO (init:451) - skipping room 2.
2015-12-12 16:22:30,567 (7faf97edb700) : INFO (init:451) - skipping room 3.
2015-12-12 16:22:30,569 (7faf97edb700) : INFO (init:451) - skipping room 4.
2015-12-12 16:22:30,570 (7faf97edb700) : INFO (init:451) - skipping room 5.
2015-12-12 16:22:30,571 (7faf97edb700) : INFO (init:450) - Room check done
2015-12-12 16:22:30,573 (7faf97edb700) : INFO (init:451) - [{‘transition_resumed’: ‘400 ms’, ‘users’: [‘aTV’, ‘daensch2k’], ‘dark’: False, ‘luxlights’: , ‘transition_paused’: ‘400 ms’, ‘min_duration’: ‘1 minute’, ‘paused’: ‘Turn On’, ‘lights’: [‘Fenster’, ‘Iris’], ‘client’: ‘aTV’, ‘stopped’: ‘Preset 1’, ‘transition_stopped’: ‘400 ms’, ‘dim’: ‘20’, ‘transition_start’: ‘400 ms’, ‘onofflights’: , ‘randomize’: True, ‘playing’: ‘Dim’, ‘room’: 1}]
2015-12-12 16:22:30,575 (7faf97edb700) : INFO (init:287) - -Getting available lights
2015-12-12 16:22:30,602 (7faf97edb700) : INFO (init:289) - Available lights: [<phue.Light object “Iris” at 0x3d24fd0>, <phue.Light object “Fenster” at 0x3d24e90>]
2015-12-12 16:22:30,603 (7faf97edb700) : INFO (init:290) - Configured lights: [‘Fenster’, ‘Iris’]
2015-12-12 16:22:30,603 (7faf97edb700) : INFO (init:291) - Configured color lights: [‘Fenster’, ‘Iris’]
2015-12-12 16:22:30,604 (7faf97edb700) : INFO (init:292) - Configured lux lights:
2015-12-12 16:22:30,605 (7faf97edb700) : INFO (init:293) - Configured on/off lights:
2015-12-12 16:22:30,607 (7faf97edb700) : INFO (init:458) - Initiating current status, lights initial states and durations for active rooms
2015-12-12 16:22:30,608 (7faf97edb700) : INFO (init:468) - {‘aTV1’: ‘’}
2015-12-12 16:22:30,609 (7faf97edb700) : INFO (init:469) - {‘aTV1’: ‘’}
2015-12-12 16:22:30,611 (7faf97edb700) : INFO (init:366) - Initializing Plex class
2015-12-12 16:22:30,612 (7faf97edb700) : INFO (init:367) - -Getting Token
2015-12-12 16:22:30,613 (7faf97edb700) : INFO (init:378) - Token retrieved from Dict
2015-12-12 16:22:30,615 (7faf97edb700) : INFO (init:219) - Classes initiated
2015-12-12 16:22:30,617 (7faf97edb700) : INFO (init:221) - Closing daemon…
2015-12-12 16:22:30,619 (7faf97edb700) : INFO (init:224) - Starting daemon…
2015-12-12 16:22:30,624 (7faf97edb700) : INFO (init:226) - [<_MainThread(MainThread, started 140392346822400)>, <Thread(_start, started 140392228869888)>, <Thread(_start, started 140392212084480)>, <Thread(_start, started 140392220477184)>, <Thread(start, started 140392161728256)>, <Thread(_handle_request, started 140392144942848)>, <Thread(_start, started 140392170120960)>, <Thread(_start, started 140392178513664)>, <Thread(_start, started 140392186906368)>, <Thread(_start, started 140392203691776)>, <Thread(_start, started 140392195299072)>, <Thread(thread_websocket, started 140392153335552)>]
2015-12-12 16:22:30,626 (7faf97edb700) : WARNING (runtime:1065) - Generating a callback path for a function with no route: <function DisableHelloHueCallback at 0x2f86a28>
2015-12-12 16:22:30,630 (7faf986dc700) : INFO (init:599) - Starting websocket listener
2015-12-12 16:22:30,631 (7faf986dc700) : INFO (init:602) - Up and running, listening
2015-12-12 16:22:30,642 (7faf97edb700) : DEBUG (runtime:106) - Sending packed state data (109 bytes)
2015-12-12 16:22:30,650 (7faf97edb700) : DEBUG (runtime:924) - Response: [200] MediaContainer, 1139 bytes
Using Plex Version 0.9.12.19 on a OpenMediaVault Debian Server
BTW: Great work :slight_smile:

going to try it out tonight see how it works