[OBSOLETE] PlexPlus - Control Lighting with Plex Play Status

The webhooks works out great! I’m loving this… Thank you!

I noticed on your colors you are using hue color and saturation, even for ones Soft White and Daylight. I’m using the Sylvania Lightify bulbs that use the tunable white. Is there any way to incorporate the color temps to the 4 main white color choices? Or even add them as additional options for the tunable side? I noticed the Soft White using hue color and saturation doesn’t produce the same tone as the tunable temps.

Once again great job! I’m digging the movie theater experience. :slight_smile:

Thanks,
Tom

Hi Tom,

Yes this would be really easy to add, I’m actually doing all of my lighting control using using my SmarterHome app, and now just using this app to send details to the virtual device, this allows me to trigger the same scenes used for other actions, but this includes colour temperature… I’ll port the code over to this app as well, feel free to check out SmarterHome too…

Hi @tomd16,

I have updated the app to be able to set color temperature

v3.3 - Added bulb temperature for color bulbs

1 Like

You rock @Entityxenon!! Thank you so much! This works awesomely (if that’s a word :smile:)

Kudos!

Thanks,
Tom

1 Like

No worries :wink:

Hi,

first of all thanks to @Entityxenon for this great SmartApp. I just installed it and it’s doing exactly what I want - almost :slight_smile:

My config looks like this

and it does correctly turn off the lights as soon as Plex starts playing something. However, all of these lights will turn on as soon as I pause or stop playback. Is this the intended behaviour? If yes, it there a way to change this, so they will just remain turned off?

Also, it would be great if it we could trigger routines from PlexPlus. This can probably be done as well using a virtual switch that triggers a routine, but maybe you will consider it anyway :slight_smile:

Hi @janw,

So yes this is expected behavior… you can currently set “Switches use Play config when Paused” and this will mean they will remain off when paused…

However that doesn’t achieve exactly what you are looking for… Should be fairly simple to add an additional switch to handle it though… might not be able to do it today, but will try to add this week…

Same for routines… I’m sure there was a reason for not including them… but I can add that at the same time!

@janw

v3.4 - Added control for switches to only react to ‘Play’ and added Routine triggers…

:slight_smile:

1 Like

Awesome, thanks a lot! :smiley:

1 Like

No worries, I only briefly tested, so any issues let me know!

@Entityxenon
This is absolutely outstanding, huge thanks for this! This was just the upgrade my theater needed right now. I decided to go with the Sylvania OSRAM Lightify bulbs BR30 RGBW bulbs so that I could tune the bulbs to match my rope lighting. Plex Webhook made this a really easy setup for my Apple environment. My current PlexPlus setup uses Level on Stop to 50%, Level on Pause to 10% (also using Pause config for movie trailers), and Level on Play to 0%.

My first question is what setting do I need to adjust so that my lights remain at 10% in between trailers and pre-roll clips before a film begins? Currently during the 1-2 sec break between each trailer, the bulbs revert to 50% very quickly and back to 10% once the next trailer plays.

Thanks again, really looking forward to seeing what more I can do/control with PlexPlus!

Question -

I have 5 AppleTVs around the house. I set up the first AppleTv -

Made a Virtual Switch and it shows as playing with no metadata. Is that normal?

Hi thanks for the feedback :slight_smile:

For the below question, under “with these settings” set delay stop action, this will be the number of seconds that will be ignored for a stop action… 5 seconds for this is usually good…

Sorry not quite sure what you are asking :slight_smile:

I assume it is playing? What meta data are you expecting and where are you expecting this to be presented? The Device handler currently only shows play state and media type… I haven’t updated it to display anything else yet, as to do so I’ll need to update the exe also to pass the additional info.

Sorry - I shouldn’t post when I am too tired to reply or… much of anything.

I noticed the dashed line at the bottom of my window so assumed there was supposed to be metadata.

I notice ALL my virtual switches show as something playing even though, currently none have anything playing.

Other question -

Here is the scenario I am trying to invoke:
During Day - Plex plays TV show/Movie - Lamps Turn on
During Night - Plex Plays TV Show - Cans turn off/Lamps On
During Night - Plex Plays Movie - Cans dim to 15%/Lamps Off

During Pause - Day - no change
During Pause - Night TV - lamps on/Cans On
During Night - Night Movie - Cans/50%

Should I be creating routines for this in Plex and relying on those as it seems my desires may be too granular.

AWESOME work by the way - this has been really fun to play with.

Thanks @Entityxenon Jake. The 5 seconds worked perfectly for the 2 movie trailers that I have setup but the lights brightened to 50% during the cinema trailer pre-roll video before the film. I could change the seconds to be longer but some pre-roll videos I have are over a minute long and then that would effect how long I have to wait for lights to come on at a general pause.

What do you mean by a pre-roll video? There is the option to set X trailers before a film, I assume what you are talking about is different? Although I’m not sure it should make any difference, all it essentially does is ignore delay “stop” for 5 seconds and cancel if another command is recieved? If you could try adding a couple of extra seconds to the stop delay, perhaps it’s not quite long enough??

If that still doesn’t sort it, could you add the below in to the script, the first line is already there the second line needs to be added, this should post a “warn” message in live logging with the playback type details if you can check what you are getting?.. I can only assume that the playback type being sent is not correct?

def AppCommandRecieved(command, userName, playerName, playerIP, mediaType) {
     log.warn "THIS IS THE MEDIA TYPE: $mediaType COMMAND: $command"

Hi @rgreenpc Richard,

No worries, it all makes sense when you are typing it :slight_smile:

So for the virtual device… the default setting when created is “playing” with “–”, I will change this as it is slightly confusing and not really best practice!

However assuming you assign this to a room in PlexPlus to be updated it will sort itself out when you play and stop your first movie and then reflect the correct status going forwards and the – will change to the playback type…

So for your second scenario, PlexPlus does not do time based lighting… however there are options…

You could create a virtual switch or routine to trigger each play pause and stop action, and then use something like CoRE to then to control the lighting based on the time of day…

Or something slightly less official, but potentially easier… I have written a full home automation app, it’s unofficially released, but you can set “time modes” in the settings, then add a multimedia module to handle the device type from PlexPlus, then add 3 scenes, one for each play pause and stop which can have different actions based on the time of day… it’s not even as complicated as it sounds above…

I’m referring to the Plex Server Setting under Extras shown in this image:

whereby you can use short clips before a film as seen in this one that I have created:

Nice I’ve not seen that before! Love your clip too! Unfortunately I’m not getting anything strange in the logging that should mean that it wont work? Although I’m not getting any stop events between clips either? If you can drop in the above code and then see what live logging throws out?