[OBSOLETE] 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