[RELEASE] PlexPlus - Control Lighting with Plex Play Status

Yeah, looks like it, would be good to know if you get anything back from them though!

Is there anyway to integrate this with core?

I’ve got an issue where I have my motion sensor in the lounge. When its dark, if it senses motion, it sets the light to X setting.

Then PlexPlus comes on, dims the lights, motion sensor detects movement, lights come on. I end up with a disco.

An ideas?

Lots of ways!

  1. I use host pinger to check if my TV is on and then I use the host pinger device, so my living room automation doesn’t run while on, you can also do the same using a socket that monitors power usage and say don’t run if power is above X amount. This means that if I manually adjust the lights movement doesn’t override what I have set and also if I’m very still the lights dont turn off…
  2. Alternatively create a DTH in PlexPlus and then set the automation to only run when in a stopped state, if you specifically want to stop automation in that state.
  3. Similarly create a virtual switch, add it to the relevant modes in PlexPlus then set the movement sensor to only trigger if the switch is on (Variation on the above)
1 Like

Thanks. Virtual switch was a nice and easy solution :slight_smile:

1 Like

Having issues getting this setup. Getting a 401 error. Im i setting the incorrect API key etc?

I would remove your access token and app ID from the above… you don’t want to share this…

Did you read section 5 of the first post (Errors/Debugging) you need to get the plex token…

Your Plex URL should look like this, with the token found in section 2.F:

1 Like

Thanks working now! :slight_smile:

Great app.

1 Like

ok, I think i’m missing something. My goal is to trigger events in webcore based on what is playing on Plex on my Fire TV and also be able to pause Plex based on other SmartThings events. I installed the smartapp and device handler via github nad enable oauth. I have plex pass, so it sounds like I only need to go the webhooks method. I installed the app on my phone, caught the webhooks url via live logging and pasted it over to my plex account. I think this was all I had to do? I was expecting to see a new device created that shows the plex device that is playing, whats playing, the category (movie, tv, etc) along with some play, stop, etc buttons. Or am I missing the purpose of this app?

nevermind! figured out how to add the device and then assign it to a room to update. There’s a slight delay, but looks like i’m up and running. Thanks!

Sorry yes it’s a little clunky if you want to use a device, this was a later addition as it works without any device…

However this app will not allow control just current status… if you want control then try the app below… however due to the Plex API it can be hit or miss depending on the device you are using… you want to use the ph4r branch for maximum compatibility and this also supports webhooks

2 Likes

It doesn’t seem the device gets updated when watching live TV. I’ll open live logging later and see if the webhook is passing anything.

Cool cheers, let me know how you get on, I don’t have live TV so can’t check myself…

First… fantastic SmartApp. I got this up and running no problem and it works great for lighting… however, are there any thoughts on on how to control additional non lighting devices? I live in an apartment and furnace / central AC fan is quite loud. It’s controlled by Nest / ST NST Manager and I’d like to shut off the fan when a movie starts. I also have a Roomba controlled by Harmony IR which I’d like to have docked as well.

As we see more things become smart, like dish washers / washers / dryers, it be nice to pause them. Just my 2 cents.

Things like AC etc I expect you can just associate to the on off option in the app… should be fairly simple to setup… otherwise just install the device handler and then you can use that to trigger events in webcore etc. So pretty much anything you want to do it should be able to do already :slight_smile:

Ok, tried the ph4r version first with webhook integration. Could never get it to work right.

I have your version up and running just fine. Using both the integrated app functions and device updates to trigger additional actions in webcore.

The only thing I can not do that I was originally hoping for was other devices being able to execute actions in plex. i.e. force plex to pause when xxx happens. (which is why I started with the ph4r version).

As far as using plex as a trigger for actions this is by far the easiest and most simple method with webhooks for plexpass users.

So not really any questions but more of a request if you have any plans to implement bidirectional actions? or is it to try and get the ph4r version working?

Unfortunately I have quite a few projects on the go which is the main reason for not adding two way in to my app…

I do however want to do it and I know how it would work in theory to take the best of both apps… I had also discussed with Ph4r… but to do it justice I’d want to re-write the whole thing… but time is just a limiting factor…

However there should be no reason that Ph4r’s version should not work with webhooks, it’s pretty much copy paste of my code… I think from memory you do need to make sure that the device setting are also updated with the correct subscription method…

Hi!
I have installed PlexPlus and put its webhook address into my Plex account.
On my LG TV, I have two apps. I mostly use the original Plex for LG app , but when i play 4k material, I use the Xplay app.

When I try to setup a room in the PlexPlus SmartApp, I have successfully made the Xplay app change a simulated switch in Smartthings to trigger my light events. But I am not able to do this with the Plex for LG app.

Any suggestions?
I have named them using Player name, Xplay is: LG OLED65B7V-Z
and for the original Plex app it is: Plex for LG. These names I found in PlexPy.
I know it is case sensitive, and I feel like I have tried everything.
Any suggestions? :slight_smile:

My main recommendation is to check live logging in ST or Last Event in the SmartApp, that should report the device name being received in ST…

If you are still not getting anything then let me know what you are seeing in live logging… you can PM if you don’t want to post here… Unfortunately I’m not going to be able to look for about 24 hours now… but let me know how you get on…

Thanks for the reply!
Found the problem. When I play from the LG Plex App, the player name in the last event of PlexPlus is blank.
This does not happen on any of the other apps / devices I have tried.
Is there any way to fix this? :slight_smile:

Edit: I got it trigging by using my public IP as a player name. But this is not a good solution long term…

In terms of getting the name to appear, the issue is that LG don’t appear to be following the API defined by Plex…

If they don’t pass it we can’t use it…

However you could use the UID… this will however require an update to the app and the various other apps interfacing to it… (The exe and the Python script)

However if you update the Python script you are using to pass the UID in the name or IP field then this would bodge this in… Not sure if you know how to do that or not? If not then I could bodge it for you and will add it to my list of changes for the long term… Have a feeling I just need to re-write the app from scratch and release as a new app…

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.