[RELEASE] PlexPlus - Control Lighting with Plex Play Status

java.lang.RuntimeException: Unexpected status code 400 from global /clients/null with status text Bad Request @ line 117

Did you enable OAuth? If you go back in to the app in the IDE then press App Settings…

well crap sorry for my blunder was thinking i had to put in the token there before updating the app with OAuth

No worries, I’ve just updated the github code to handle the error… v3.6 updated

wow man this is so awesome!! i’m not home but i use google desktop and had my HT lights on 100% via app opened plex and watched as the lights dimmed up and down when watching a trailer then when i started a a movie it dimmed at the trialer then when the movie started it dimmed off this is soo awesome!!! thanks!

one issue i have may be how i have the settings setup is when the movie is playing if i pause it doesn’t dim up (30%) and also when i stop the movie it doesn’t dim up (50%)
but this problem isnt a priority to me as long as the going down before works
thanks again.

Check the “with these settings” section… there are delays set here… also make sure “dim only if lights are on” is switched off

1 Like

“dim only if lights are on”

was the problem thanks again!! cant wait to get home and be immersed :slight_smile:

1 Like

@Entityxenon is there a way when skipping forward/back to not let the “trailer” light level be triggered?

Unfortunately Plex sees these as pause/play events…

This is why I added the customisable delays, so you can configure them to ignore commands for a set time…

If you don’t care about pauses I could potentially split the code so trailers and pause commands are seperate… but have a go with the delays and see how you get on?

i’ll try the delays and see how it works…

splitting the code may be handy.

@Entityxenon I ended up using Routines in triggers cause I used CORE to setup a specific Cyan color at 10% when paused/trailer playing and another for a Gold color at 50% for Stop for my Sylvania Osram Lightify RGBW bulbs. I didn’t have much success when attempting to use the Adjust the level and color of these bulbs. Routines is working well though!

The issue that bugs me a bit is that the 4 lights don’t all turn off at the same exact time. It’s completely random… sometimes 2 and 2, or 1, 1 and 2. Any suggestions on how to improve this…

Hi @johnesc,

When you say you didn’t have much success with attempting to use the “Adjust the level and color of these bulbs” what issues were you seeing? If it’s an issue I can fix it…

Also have you used the standard core colours, or did you use custom colours? I could port in the full colour list from core…

For your random bulb issue, unfortunately this is an ST issue, I have reported an issue previously specific to hue (below) but depending on what you are using there are limitations either with how smartthings sends messages and also how zigbee passes messages between bulbs… but largely SmartThings is the issue here…

It’s one line of standard code to trigger all of the bulbs in this instance, the issue is how ST processes it and has got worse at about the time I posted the below:

I just installed your SmarterHome app and noticed that you used the CORE colors there, that list is fantastic and it definitely worked better for my Routine situation. When I was using the Adjust the level and color of these bulbs, I would start with daylight white lights and then expect PlexPlus to change during trailers to Cyan @ 10% and if I stopped a movie Gold @ 50%. The colors and levels weren’t changing using the Adjust the level and color of these bulbs, however with Routines and the CORE pistons it works… My issue is that sometimes the bulbs turn off during movie play in a weird order 2, 2 or 1, 1, 2 as opposed to all at the same time!

Thanks for the info on the ST processing of the bulbs. Ugh!

Ok cheers for the feedback! I’ve got a few changes to make, so will include in the next change… but can’t provide an ETA on that at the moment as life is chaos at the moment, in and out of work!

I assume you are not using a hue bridge? If you are you can setup scenes in hue then trigger them from ST using a different hue connect app…this should then work as you are expecting…

1 Like

Love this!

quick question… I use Chromecasts to get plex content onto our TVs in different rooms. In the logs, the player title comes across as Chromecast regardless of the chromecast device I’m casting to. Obviously, this makes setting up PlexPlus rooms/automation tricky. Any way to differentiate so PlexPlus will know I’m using Chromecast1 vs Chromecast2??

Logs:

11:06:32 AM: debug PlexPlus [PARENT] >> Account JSON: media.pause
11:06:32 AM: debug PlexPlus [PARENT] >> Account JSON: [id:5509126, title:Ben, thumb:https://plex.tv/users/XXXXX09eYYYYY/avatar?c=2015-11-12+09%3A41%3A09+UTC]
11:06:32 AM: debug PlexPlus [PARENT] >> Player JSON: [publicAddress:xxx.xxx.xxx.xxx, title:Chromecast, uuid:XXXXear110k9x2nxktskYYYY, local:true]
11:06:29 AM: debug PlexPlus [PARENT] >> Account JSON: media.play
11:06:29 AM: debug PlexPlus [PARENT] >> Account JSON: [id:5509126, title:Ben, thumb:https://plex.tv/users/xxxxxxx09yyyyy/avatar?c=2015-11-12+09%3A41%3A09+UTC]
11:06:29 AM: debug PlexPlus [PARENT] >> Player JSON: [publicAddress:xxx.xxx.xxx.xxx, title:Chromecast, uuid:XXXXear110k9x2nxktskYYYY, local:true] 

Thanks!

1 Like

Are you using the Plex Webhook? If not, I believe you could just enter the different IP addresses for each of the devices instead of their names. @Entityxenon will be of more help. Try using the IP address under When Event Comes From…

As @johnesc says, using IP is the easiest way… I think webhooks only gives the public IP… which I expect is the same across all the devices… if you are not using webhooks then this should be fine… there is another potential way which will be a complete rewrite of the app which I plan to do, but there are issues with Plex server I need to know if I can fix or if it’s a fundamental issue with Plex server…

I could bodge in something potentially so let me know how you get on…

I am using webhook. Sorry, should have mentioned that. So it only shows the
public IP.

I don’t want to put anything more on your plate, so I can just try and use
the device type. But let me know if there’s anything you want me to test
during your rewrite. Cheers.

No worries, if you find the below line in the code

def playerIP = plexJSON.Player.publicAddress

And replace it with

def playerIP = plexJSON.Player.uuid

This will then give you the unique player ID which you can grab from live logging and then paste in to the app instead of an IP address… that will give you a workaround until I rewrite

1 Like

Awesome. Thanks!

1 Like