Plex Webhooks

Tagging in @josh as he developed one of the Kodi apps on ST, any plans to release a HE port?

1 Like

Would love this for Kodi!

Agreed! any interest @josh?

@jrau272 are you referring to a port of the Kodi SmartApp and Device Handler I wrote for SmartThings? I haven't used Kodi for a few years now, so I don't really have an interest in spinning up Kodi instances just to port over the code.

That being said, the source code is all out there and I believe the modifications to port it would be relatively straightforward. I'm happy to transfer stewardship of the code to anyone who is both willing and capable. :smiley:

That is exactly what Iā€™m talking about. Thatā€™s too bad youā€™ve moved away from Kodi. Iā€™d love it if someone ported it.

Give it a go yourself, porting is mostly just dropping in the old code and seeing what's broken.. this thread contains most of the details of the things that need to be swapped:

Just jumping into this thread now that I have a weeks worth of Hubitat under my belt.

Do these webhooks and automation work on the 'player' level or do they / would they work on the server level as well? Meaning, I tend not to use plex as a front end, but I access my content over DLNA and pull from the plex media server.

I presume its tied to the front-end (because who would want their lights going on when someone else pauses a movie in another room), but I can't figure that out from the code (yet. Reading Code for Dummies is next on my hit list).

Do DLNA sessions show up in the now playing screen in Plex, if it does then it should work but I've not tried it..

Honestly I've never looked before. I was always just watching the movie and never thought to see what Plex was showing. I was just asking in case someone already knew.

Thanks for the quick reply.

1 Like

I've just tested it on my setup, sorry it doesn't show up..

thats OK.
saved me the frustration of looking.
thanks for the help!

Question for you regarding the media scene app. So I have a set of accent lights right now that are setup as a simple rule to turn on at 4:30pm and off at 11:30pm. I have the media scene for my living room to turn off the accent lighting when a movie starts which works. However, if its after 11:30pm and the accent lighting was already off, and the movie starts, and then ends, the accent lighting is turned back on, even though it was already off before the movie began. And yes, I have the option selected to remember the switch state when playback ends. Thoughts on why it's turning on the switch that is set to off even though it was off before playback began? Anyway to get it to evaluate against another rule?

Are you seeing anything in the logs, it's likely that there's a bug, I haven't tested that feature since migrating from ST, so there is likely a difference required in the code between systems, from memory I think current state is called slightly differently, I might not be able to look myself until Monday..

Is there any logs for media scene? If so Iā€™m not seeing any.

Apologies for the NOOB question but I am a total NOOB here. this is my first post EVER! I am a Wink Refugee dipping my toes into Hubitat for the first time. I was looking for Plex integrations and this is the only thread I have come across. I copied the parent and child Code from the Nov '18 post and created the apps for them but I am still trying to figure out the integration of the media player. Is there a step by step or how to on making this work? TIA for any responses.

Welcome to hubitat, everyone has to start somewhere!

Do you have Plex pass or free Plex? If pass then you need to setup your Plex server webhooks, otherwise you will need to poll for updates, how you do this is dependant on your setup.. what are you running Plex server on?

I do have plex pass and I'm running on Windows 10. I am unfamiliar with Webhooks but I have played with Zapier to make them work on Discord.

It should be as simple as copying the webhook URL from Plex communicator and pasting in to the Plex server.. it should then all just work..

Like I said total NOOB!
I didn't know what Plex Communicator was. I tried to copy the github code and create the app and driver but I received error messages.
I got this when I tried to create the Plex Communicator Device: "Metadata Error: Capability 'musicPlayer' not found."
I got this when I tried to create Plex Communicator App:"unable to resolve class physicalgraph.device.HubAction @ line 262, column 22."
I know what neither of these things are nor am I mentally equipped to correct them on my own. Is there a front to back installation guide or should I just leave this alone?

Hi: Another noob here...

I have taken the "parent" and "Child" code from the Nov 18 post. and added them both as apps. After that I am stuck...

I have plex pass so can use webhooks on my server but I cannot work out what the webhook should be from the app.