Plex Webhooks

No problem, did you solve the Roku issue? I use one, but not in a room I need to control lighting.. so understand what you mean but don't suffer the issue myself..

I think I can do something with armand's Roku app in another thread. I just installed it but the wife is gone and I better get the laundry done or home automation will be the least of my worries. :stuck_out_tongue:

has anyone got plex notifying of playing state where a remote server is used? I'm using a server that isn't mine. But would like to turn a virtual switch on if my shield tv is playing plex for example

i don't think this is possible tho where i don't control the server.

You would need to get them to setup webhooks on their server. This will give you visibility of everything they watch too.. so doubt they will do that?

You would need to find a way to get play state directly from the shield, not sure if it will let you run tasker or even if that can capture play state..

1 Like

Ok cool. I'll work it out. Thank you

so i got remote access to webhooks on the plexserver. but Using plex communicator - it seems it will only work it it's on LAN is that right?

Using maker API I'm not sure how I can open app access to an app.

You should just need to use the cloud URL rather than the local URL..

In the code replace getFullLocalApiServerUrl with getFullApiServerUrl

1 Like

ok cool. i updated two instances of that text. But testing that URL I get

{"error":true,"type":"AppException","message":"Method Not Allowed"}

Do I need to do something in maker?

thanks for the help

You need to put that URL in Plex, visiting the URL normally won't give it the information it needs so it will error..

1 Like

ah ha! thank you

Could anyone tell me where I'm going wrong? I copied the 'Plex Communicator' into HE 'Apps Code' section with OAuth enabled. From there I copied 'Plex Communicator Device' to HE's 'Drivers Code'. Lastly, I copied 'MediaScene' and 'MediaSceneChild' (Everything coming from this forum topic page) into 'Apps Code'.
After going through the Plex Communicator setup i.e., adding my Plex device, logging into my PlexPass account, and adding the webhooks URL given by 'Plex Communicatior' app into my Plex server, I am able to see debug events occur in Hubitat whenever I play, pause, or stop my Plex player (Nvidia Shield), but nothing ever changes in the 'Current States' status of my Plex Server device from the HE device list.
Being that there is debug communication going on between my Plex server and Hubitat, could it be the device driver?



You appear to have done everything right! It is likely that the device ID is not being correctly passed by Plex in the JSON likely a different device ID, but the current debug logging doesn't show what's being passed.. I'm away from home, I think there are a couple of commented out logging lines one of which should contain the id being passed.. however when I get home later I'll update the code to make this easier to debug..

1 Like

@jebbett Just wanted to jump in to say Thanks for the great info in this thread. I just got my Plex Communicator hooked up with MediaScene and its working perfectly on the first run.

Quick question - although maybe I should ask it over in a different thread - but is there any way to control multiple lights individually in MediaScene?

For example, I have 3 light switches that I'm trying to control. Front Lights are between the screen and the sofa, Back Lights are behind the sofa, and Stairs Lights are (shock) on the stairs.

I'd like to use both the Front and Back lights with the webhook, but I want to set them to different levels and in different situations. When I play, I want all the lights to go off. When I pause, I only want the Back Lights to dim. But when I stop, I want the front and back lights to come on.

I may be missing it, but it seems like I can only control the dimmers together, like a group, and not individually. Is that right?

Thanks again!

1 Like

No worries!

Just create different "rooms" in media scene, with the same triggering device :wink: they should be called groups really..

Thats what I was thinking, but figured I'd ask. It felt very similar to "Simple Lighting" where it just makes more sense to set up a few small rules rather than over complicating the situation.

Thanks! (Now if I could just shake these Error 500 that keep locking up my hub, I'd be in great shape!)

1 Like