[RELEASE] PlexPlus - Control Lighting with Plex Play Status

Our messages crossed :slight_smile:

Just remove the bulbs, if you don’t want to control bulbs, leave the levels in… they just won’t control anything…

hmm does that mean a specific harmony activity can report as a switch not any activity

hey I figured out how to eliminate the app from controlling light while keeping update device on. however in webcore when I select the device and say if status is equal to a value no preset choices come into the drop down menu of status values. I had to manually type in stopped, paused, and playing which I got from the app itself

so I assume those are the statuses. after trying to run the piston nothing happens with the lights so I’m thinking the problem maybe how the script is written. should I be selecting something else besides status for the if clause? the choices are (level, mute, status, track data, track description, $status)

here is the piston

Yes it does, I see your issue…

I can set it only to work when the switch is off, I can just add another field, will do in a bit

oh that would be great than I could eliminate the need for webcore for this .

hey thank you for your help, Ive solved the problem and used solely your smart app no web core needed if you haven’t already started to amend the app don’t worry about it, but I really appreciate you were willing to make a change just for me.

After you mentioned that I could disable the app running a certain activity I just created a new harmony activity that I will run when I don’t want your app to be in effect.

Now everything works perfectly. Thank you again for your contribution and support

Cool, no worries sorry got a bit side tracked last night, so didn’t put out the update yet, may still do it anyway, someone might find it useful!

Hi!

Thanks for this. I have two issues:

  1. When using a “Generic” player, PLAY and STOP are detected, but not PAUSE. (Note that PAUSE is however detected when I tried using, on the same server, the “Plex Web (Chrome)” player instead)

  2. Neither players will anyway activate lights: “Last Event” does show in the app, but hasn’t triggered the lights to change. I read the suggestion to check the Room config… but what can be wrong there? There’s not much to config, or am I missing something?

Thanks!

Hi,

Need a bit more info…

Are you using webhooks or the exe?

For point 1 you will be dependant on what the device actually reports, webhooks I have found can be a little more vague about status… if you are using the exe then can you let me know the actual device you are playing on?

For point 2 you need to make sure the device name or ip in the logs matches exactly that in the settings page.

Check that and report back!

  1. Using the exe on Win 10, where the Plex server is. Watching on Sony Bravia Android TV, using the Archos app (UPnP Plex Media Server sub-menu).

  2. OK, I fixed this. I was using “", I thought that was allowed. I now changed from "” to my Plex username, and I get light reactions (apart from the PAUSE on the generic player, see above)

Thanks!

No you can’t use “” but you can use *

I’m not going to be able to replicate your issue until some time next week as I’m away, but I expect the problem is that however the Archos app works, I assume via DLNA, that this does not fully report back to the server, if I can replicate via an android tablet then I will confirm, but if you are not seeing pause in the logging plex is not reporting it… using the exe should report everything reliably…

  1. Actually that was a typo in my previous message: with * it does not work in my case (I just tried again). I’ll stick to my username for now.

  2. Ok, let me know if I can help / provide logs or additional info!

Thanks

Ahh OK, then looks like a bug with the *, I’ve never actually tested that as it was from the original code…

If you want to confirm the pause issue, then on your server go to this URL substituting your own token

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

You’ll probably need to login to Plex first, but if the pause update is not shown here then there is very little that can be done I expect…

  1. ok, you may want to add a comment in your troubleshooting about that
  2. yes, the XML shows “playing” when the DLNA / generic player is actually paused. Would you know whether I should raise this with PLEX or ARCHOS? (PLEX, I suppose? Not that I have many hopes anyway…)

(By the way: there’s no way to have the EXE hidden in the tray, right?)

Yeah I’ll just fix the app for the first issue :slight_smile:

It’s difficult to tell if it’s archos or Plex to be honest as there is more than one way to communicate, I suspect actually the arcos continuing the stream and then buffering it locally, it may eventually pause if you leave it long enough… if it’s a Plex issue I wouldn’t even bother raising a ticket as from experience more important issues are not resolved…

You can force the app to the system tray using the below, unfortunaly I don’t have the coding knowledge to do it myself…

http://rbtray.sourceforge.net/

New version added:

v3.7 - Fixed the use of wildcards

Also seems that the first post is now locked for editing… so I can’t update with links to they tray app etc…

So I am a newb to ST and I so appreciate this being made. I am running into an issue… I follow the instructions to get the token from this link “https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token” but I get “Failed to SendGetRequest: The remote server returned an error: (401) Unauthorized.”. getting the XMl and what not as it mentions and coping and pasting it so I know it’s not a type-o.

I am an IT guy so its not lost on me entirely… I just don’t know why this isn’t working for me. Any assistance would be appreciated.

Hi Matt,

Sorry just on holiday in Croatia at the moment.

I take it you have managed to get the token and the error you are seeing is in the Plex2SmartThings exe? If so can you send me the config.config file over private message? (I’ve sent you a message as new users can’t start private messages)

If not can you confirm where you are getting the error message?

Hey there. I managed to get it working. Complete noob mistake. I was using the api key from the smartthings site and not the app itself. Silly noob. Enjoy your vacation!

Haha no worries, glad you got it sorted, any other help you need let me know!

© 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.