[OBSOLETE] PlexPlus - Control Lighting with Plex Play Status

So, I updated the webhook to graph.api… and it still didn’t work. I then changed it back to the shard url… and it started working. I don’t know why or how but I will take it :). Thanks for your help in supporting the project even after leaving SmartThings!!!

1 Like

No worries glad to have been able to help!

I’m starting to make use of the Plex status in WebCore. The status field works beautifully (playing, paused, stopped) but I don’t seem to get any additional info that seems to be visible in the device page (clip, movie, episode). Is there a way to expose that info to WebCore? Is there another DTH I can use to make that easier?

I believe you need to call a custom variable from webcore, I think it’s playbacktype but if you check what I called it in the Device handler

Yep - in the handler, it’s playbackType. Webcore says it not a valid attribute of the Device but I’ll keep playing with it.

Let me know how you get on… If you don’t have any luck then I’ll try and take a look tomorrow… I don’t think I need the hub to check that…

Webcore isn’t letting me enter anything that doesn’t appear in drop downs so playbackType is not available. Anything you come up with would be greatly appreciated!

On a side note, I seem to stop getting status updtaes when I change the object name from the original to a more friendly name (from “TCL 65” Roku TV - Plex for Roku" to “Den TV”). Is that expected? I’ve tried changing the name back and even resetting the device list to no effect. Oddly enough, the playbackType does update when I change from movie to episode but the status doesn’t change. Very strange!

I dug in some more and saw that the musicPlayer capability does not have a playbackType attribute. I added attribute "playbackType", "string" to the DTH definition and Webcore now sees the attribute and the eval console actually has the correct value in there. I’ll have to wait until I get home to see if it works properly in real life but it’s looking promising!

Ahh great, I only had a couple of minutes to look at the code earlier, so only gave it a glance but changing the name should have no impact on state changes, it’s using the devicenetworkid which won’t change…

@Entityxenon This is a long shot here, but I see back in Nov. 2016 you were looking at possibly expanding this to Emby if someone in the Emby community can code getting the playstates. There’s an unofficial plugin for Emby that does this now.

I haven’t tested this plugin myself yet, but it does say it uses the same format webhooks that plex uses so I wonder how easy it would be to make this work with Emby?

If it uses exactly the same format then it should just work with the same webhook… PlexPlus should then in theory work using the IP, Plex Communicator however won’t be able to find the devices, however may find devices when playing… but can’t remember if I coded this from the webhook or from the Plex Now Playing XML, if you have a Plex device you can however change the device ID to the enby device…

However three issues… I’ve retired my smartthings kit, I don’t use enby and I’m currently on holiday… if you want to give it a try and see if they will even try to talk to each other… Then please give it a go… If that works then I can probably sort the other issues in a few weeks when I get back

Trying to install this… Smartthings hub v3, webhooks via plex plus, plex server on windows, and plex client on an amazon firecube tv. Everything is wired ethernet, no wifi. I’ve got what should be a valid token and the webhook set up. Debugging enabled in the smartthings app via my phone. plexplus installed on the smartthings via web portal. I’m not getting ANY events in live logger whatsoever. I’m really not sure what I’ve got wrong.

Welcome to SmartThings! I will PM you as you won’t likely be able to PM me, if you can send me exactly what you have in webhooks in Plex, your country and confirm you have the Plex Pass subscription…

Also recheck that your webhooks URL has not changed… if you reinstall the app it will be different!

If you are not getting anything in logging then the issue will likely be your Plex setup…

Hey thank you for taking a look. This is my current webhook:

http://localhost:32400/status/sessions?X-Plex-Token=sg3KujnNAqfszvb7qQ11

I doublechecked the token last night and updated it. I guess what I’m unclear of is whether I need to be looking, at any given moment, at the plex client, the server, the smartthings dashboard IDE, or the smartthings android app for various steps of the install process. Oh, also as asked, I’m in the USA, southeast, not sure if there’s a specific region or not for that. Any other information you might need? I can include screenshots as well if that would help, just let me know what of.

That’s not the correct URL, you webhooks URL needs to be a smartthings URL… not sure where you got that URL from…

Edit: live logging will say “URL FOR USE IN PLEX WEBHOOK:” and will have a URL which says graph somewhere in it…

I was not getting anything at all in live logging, so I wouldn’t be able to use that to discover the url anyway…however…I also don’t recall where I got that URL offhand.

Open live logging open the app press Done in the app out to the list of apps and live logging will show the URL

I did turn on debug logging, but live logging shows nothing from plex, and last event in the app itself says no event received.

It won’t show anything from Plex with the wrong URL configured in Plex… it’s not sending the information anywhere… you need to read what I’m telling you and follow the instructions I have given you…

Your instructions were contradictory though. You said I had to get the url FROM live logging, but needed the URL to get anything in live logging…Where can I get the URL?