Plex Media Server Manager Plugin - Beta

Posted on
Tue Mar 31, 2015 10:53 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Plex Media Server Manager Plugin - Beta

Please keep in mind that this plugin is currently in a beta state, but I am interested in any feedback that you... I'm still flushing out what is possible with control of clients and investigating if that can be added to the plugin. Also, I know there is additional art available for TV shows (for the "show" level) and I will be adding that shortly. Finally, I have not tried the plugin with music streaming but shall do that shortly as well to be sure all works.

Let me know any feedback -- be it good, bad or suggestions. I'm still thinking about and experimenting with how to present everything nicely in my control pages and all discussions and suggestions spark ideas that I'm sure I haven't even fathomed!

Adam

Posted on
Tue Mar 31, 2015 1:03 pm
roussell offline
User avatar
Posts: 1108
Joined: Aug 18, 2008
Location: Alabama

Re: Plex Media Server Manager Plugin - Beta

Geez I need a dose of your skills and motivation! Nice job Adam, I'll load it up in the next day or so and give it a try.

Terry

Posted on
Tue Mar 31, 2015 2:22 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plex Media Server Manager Plugin - Beta

Geez I need a dose of your skills and motivation! Nice job Adam, I'll load it up in the next day or so and give it a try.

Really only took a few hours to put together, just that I don't work on these things continuously, just a bit here and there after my son goes to sleep. Connecting existing stuff to the home automation system keeps me from trying new ideas with new hardware that costs money! :-)

The motivation is also often "that would be cool on a control page"...

Adam

Posted on
Wed Apr 01, 2015 7:06 am
gonzalo.dios offline
Posts: 5
Joined: Mar 28, 2015

Re: Plex Media Server Manager Plugin - Beta

Thanks Adam for your plugin!!. Finally I thought that I could control my Plex server, but I´m having the same kind of problems that I got with the other Plex Plugin that I tried some time ago.

I´m always getting the same execution error. This is a copy & paste from my event log window:

Plex Media Server Manager Debug Processing GET operation: /status/sessions
Plex Media Server Manager Debug Found response match: plexMediaResponse
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaContainer Information: {}
Plex Media Server Manager Error Error executing effect for device id 293181167
Plex Media Server Manager Error Error in plugin execution:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Plex Media Server Manager.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkDeviceResponse.py", line 166, in executeEffects
eval("rpDevice." + effect.updateParam + "(responseObj, rpCommand)")
File "<string>", line 1, in <module>
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Plex Media Server Manager.indigoPlugin/Contents/Server Plugin/plexMediaServerDevices.py", line 86, in handlePlexMediaContainerResult
self.indigoDevice.updateStateOnServer(key="activeSessionsCount", value=int(plexContainer.containerAttributes["size"]))
KeyError: 'size'


The Plex server (0.9.11.16.958-80f1748) and the Indigo Server (6.0.20) are in the same machine, a Mac Mini (intel core 2 duo) using OS X Maverick (10.9.5).

Thanks in avance for any help!

Gonzalo D.

Posted on
Wed Apr 01, 2015 11:04 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plex Media Server Manager Plugin - Beta

Your Plex install seems to be answering but not sending back valid values -- try turning the debug on High and let it run through the attempt to read the status once (will want to shut it off after that or will get a LOT in the logs). High should show us the entire return from the Plex server and may give more info.

FYI, your setup is nearly identical to mine, I would think we can get it going... I am at work, but that version number is very similar (mine is v0.9.11 but not sure of the build number) and mine is also on the same machine; I am not on Maverick on there IIRC, but that should be ok as long as you aren't on Yosemite.

Adam

Posted on
Wed Apr 01, 2015 3:26 pm
gonzalo.dios offline
Posts: 5
Joined: Mar 28, 2015

Re: Plex Media Server Manager Plugin - Beta

Thanks Adam.

This is the "high" answer in my event log:

Starting plugin "Plex Media Server Manager 0.5.15" (pid 5002)
Plex Media Server Manager Initializing RPFrameworkPlugin
Plex Media Server Manager Beginning processing of RPFrameworkConfig.xml file
Plex Media Server Manager Found plugin setting: pluginUpdateURL=http://forums.indigodomo.com/viewforum.php?f=163
Plex Media Server Manager Found device mapping; id: plexMediaServer to class: PlexMediaServer
Plex Media Server Manager Found device mapping; id: plexMediaClient to class: PlexMediaClient
Plex Media Server Manager Created device parameter for managed device 'plexMediaServer': httpAddress
Plex Media Server Manager Created device parameter for managed device 'plexMediaServer': httpPort
Plex Media Server Manager Created device parameter for managed device 'plexMediaServer': pollInterval
Plex Media Server Manager Found device setting: deviceAddressFormat=%ap:httpAddress%:%ap:httpPort%
Plex Media Server Manager Found device setting: updateStatusPollerIntervalProperty=pollInterval
Plex Media Server Manager Found device setting: updateStatusPollerActionId=updateServerStatusFull
Plex Media Server Manager Found device setting: childDeviceDictionaryKeyFormat=%dp:plexClientId%
Plex Media Server Manager Found device response: plexMediaResponse
Plex Media Server Manager Found response effect: Type=eventCallback; Param: handlePlexMediaContainerResult; ValueFormat=None; ValueFormatEx=; Eval=False
Plex Media Server Manager Created device parameter for managed device 'plexMediaClient': mediaServer
Plex Media Server Manager Created device parameter for managed device 'plexMediaClient': plexClientId
Plex Media Server Manager Found device setting: deviceAddressFormat=%ap:plexClientId%
Plex Media Server Manager Found device setting: deviceIsChildDevice=True
Plex Media Server Manager Found device setting: deviceParentIdProperty=mediaServer
Plex Media Server Manager Found managed action: updateServerStatusFull
Plex Media Server Manager Found managed action: downloadCurrentlyPlayingArt
Plex Media Server Manager Processing 3 params for action
Plex Media Server Manager Created parameter for managed action 'downloadCurrentlyPlayingArt': artElement
Plex Media Server Manager Created parameter for managed action 'downloadCurrentlyPlayingArt': saveToFilename
Plex Media Server Manager Created parameter for managed action 'downloadCurrentlyPlayingArt': noArtworkFilename
Plex Media Server Manager Successfully completed processing of RPFrameworkConfig.xml file
Plex Media Server Manager Customizing MenuItems.xml
Plex Media Server Manager Returning default GUIConfigValue for plugin:showUPnPDebug
Started plugin "Plex Media Server Manager 0.5.15"
Plex Media Server Manager Debug Returning default GUIConfigValue for plugin:databaseConnectionEnabled
Plex Media Server Manager Debug Database access enabled:
Plex Media Server Manager Debug Database access has been disabled, skipping connection
Plex Media Server Manager Debug Entering deviceStartComm for PLEX Media Server; ID=293181167
Plex Media Server Manager Debug Concurrent Processing Thread started for device 293181167
Plex Media Server Manager Debug Returning default GUIConfigValue for plexMediaServer:emptyQueueReducedWaitCycles
Plex Media Server Manager Debug Returning default GUIConfigValue for plexMediaServer:databaseConnectionEnabled
Plex Media Server Manager Debug Database access enabled:
Plex Media Server Manager Debug Database access has been disabled, skipping connection
Plex Media Server Manager Debug Command queue has 1 command(s) waiting
Plex Media Server Manager Debug Create connection command de-queued
Plex Media Server Manager Debug Returning default GUIConfigValue for plexMediaServer:updateStatusPollerStartupDelay
Plex Media Server Manager Debug Command queue has 2 command(s) waiting
Plex Media Server Manager Debug Initiating sleep of 3.0 seconds from command.
Plex Media Server Manager Debug Returning default GUIConfigValue for plexMediaServer:deviceIsChildDevice
Plex Media Server Manager Debug Returning default GUIConfigValue for plexMediaServer:deviceIsChildDevice
Plex Media Server Manager Debug Exiting deviceStartComm for PLEX Media Server
Plex Media Server Manager Debug Returning default GUIConfigValue for plugin:pluginCommandQueueIdleSleep
Plex Media Server Manager Debug Version check initiated
Plex Media Server Manager Debug Version File Url:http://www.duncanware.com/Downloads/IndigoHomeAutomation/Plugins/PlexMediaServerManager/PlexMediaServerManagerVersionInfo.html
Plex Media Server Manager Your plugin version, v0.5.15, is current.
Plex Media Server Manager Debug Command queue has 1 command(s) waiting
Plex Media Server Manager Debug Executing full status update request...
Plex Media Server Manager Debug Command queue has 2 command(s) waiting
Plex Media Server Manager Debug Processing GET operation: /
Plex Media Server Manager Debug Command Response: [401] <html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>
Plex Media Server Manager Debug RESTFUL_GET command completed.
Plex Media Server Manager Debug Found response match: plexMediaResponse
Plex Media Server Manager Debug Effect execution: Calling function handlePlexMediaContainerResult
Plex Media Server Manager Debug MediaContainer Information: {}
Plex Media Server Manager Error Error executing effect for device id 293181167
Plex Media Server Manager Error Error in plugin execution:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Plex Media Server Manager.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkDeviceResponse.py", line 166, in executeEffects
eval("rpDevice." + effect.updateParam + "(responseObj, rpCommand)")
File "<string>", line 1, in <module>
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Plex Media Server Manager.indigoPlugin/Contents/Server Plugin/plexMediaServerDevices.py", line 81, in handlePlexMediaContainerResult
self.indigoDevice.updateStateOnServer(key="serverVersion", value=plexContainer.containerAttributes["version"])
KeyError: 'version'


I´m starting to think that my problem is related to my Plex Server configuration. If I put "MyPlexserver_IP:32400 "in a web browser, I get the same "401 Unauthorized" that the plugin is getting according to the log.


Gonzalo D.

Posted on
Wed Apr 01, 2015 4:31 pm
gonzalo.dios offline
Posts: 5
Joined: Mar 28, 2015

Re: Plex Media Server Manager Plugin - Beta

Finally, I have been able to fix it!!. At the end it was my Plex Server not the plugin. I found a solution in the Plex forums.

So, now I´m enjoying the new possibilities that plex and Indigo give me.

Thank you Adam for this wonderful plugin and sorry for any inconvenience.


Gonzalo D.

Posted on
Wed Apr 01, 2015 4:52 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plex Media Server Manager Plugin - Beta

Thank you Adam for this wonderful plugin and sorry for any inconvenience.

No bother at all, let me know how it goes for you once you begin further integration! You may want to download the latest version again - I didn't post about it but updated it slightly as I found a few media types from the Plex API that were not included in the original release. It won't cause a problem not having them, just will get a warning message in the log that the media type is invalid each time it hits certain updates.

Adam

Posted on
Wed Apr 01, 2015 6:00 pm
achterberg offline
Posts: 93
Joined: Feb 22, 2005
Location: Texas

Re: Plex Media Server Manager Plugin - Beta

Using Plex Media Server version 0.9.11.16 on a Mac mini also running Indigo; the Plex iOS app states update correctly when playing media, but a web app client doesn't show up in the Clients Found: list when configuring a client while playing media from a remote laptop. Can this be enabled? And a minor issue I noticed while updating the Plex media server a "Connection refused" error message is written twice to the log every minute until the update is complete.


Sent using Tapatalk

Posted on
Wed Apr 01, 2015 10:09 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plex Media Server Manager Plugin - Beta

a web app client doesn't show up in the Clients Found: list when configuring a client while playing media from a remote laptop. Can this be enabled?

I'm not doing any filtering on it -- and I just tried connecting via a remote computer and it does show up in my client list. By default that list only updates at the rate of the Plex Server (Indigo device), so by default it may take up to 20 seconds for it to show up.

If you start it playing and don't see it after 20 seconds, try enabling High debugging and let it attempt to update its status and post those results...

Adam

Posted on
Sat Apr 04, 2015 8:02 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Plex Media Server Manager Plugin - Beta

This looks like a great plugin! Please pardon this noob question... I have always wanted to integrate Plex, but my Indigo server is on a mac mini in a closet remote from my TV etc. While I could run an HDMI cable to the TV or receiver, if I don't hook the mini to a video device, is it worth the effort? How do you all use Plex?

Posted on
Sat Apr 04, 2015 9:43 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Plex Media Server Manager Plugin - Beta

The best way to think about Plex is that it's kind of like Indigo--there's a server component and a client component. The server will provide the source (transcoding when necessary), managing meta data and so on. Then there is a client component which is used to watch video, listen to music, browse photos, etc.

I run the Plex server on the same computer that I use as the Indigo server, and I use Roku devices as clients. I prefer Rokus that have Ethernet capability, but that's not a necessity. In general, the Plex system runs flawlessly. There's a little maintenance from time to time, but it's truly not that bad.

There is a new beta version of the Plex client for Roku that's really slick and the whole thing provides for a very nice experience (plus you can control the Rokus with Indigo too!)
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Apr 04, 2015 11:04 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plex Media Server Manager Plugin - Beta

This looks like a great plugin! Please pardon this noob question... I have always wanted to integrate Plex, but my Indigo server is on a mac mini in a closet remote from my TV etc. While I could run an HDMI cable to the TV or receiver, if I don't hook the mini to a video device, is it worth the effort? How do you all use Plex?

Pretty much what Dave said - but to expand a bit... my Plex Media Server is installed on a headless Mac Mini (the same one running Indigo). I do not play any video directly, and as Dave said I suspect few try to play the video directly on their server.

For the most part, clients will connect to the Plex server to browse your media -- movies, TV shows, photos, home videos, music, etc. Once you browse and select what you want to play (complete with titles, descriptions, ratings, tags, etc.) then your client will stream it from the server. If your client does not support the type of media (say, MKV versus MP4) then the Plex Server transcodes it on the fly to the supported format.

There are a TON of clients, but I personally use a Roku, Chromecast, Xbox 360, web browser and cell phones as the main players (depending on the situation). The Roku and the Chromecast make the two best players IMHO, though the Xbox 360 and Playstation clients are fairly similar (just harder to navigate w/ the game controller). You can access the media from anywhere on the web if you so desire and can share media (with username/password and permissions) to friends/family.

I wrote this plugin because I want to be able to see who is connected and what they are playing. For instance, on a control page I ultimately want a nice looking GUI with the artwork in the background, the thumbnail and play information on top for each of my players. That way I can see at a glance if I want to join in watching what my wife is or will use the other player; or even if it is safe to reboot the server without interrupting others' watching.

It would be nice to have some limited control as well, at least to pause and resume so that triggers might could do that for devices that normally don't script. If you choose your client correctly, such as the Roku, as Dave mentioned you can control it -- others have posted on here about dimming/ramping up lights depending upon play state for instance.

Adam

Posted on
Sun Apr 05, 2015 9:11 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Plex Media Server Manager Plugin - Beta

Thanks for the comprehensive replays! I spent a good deal of time trying to understand the Plex/Roku setup and am pretty impressed. May I ask you all if I'm on the right track?

I have a 2010 mac mini with 10.8.5, and soon to be 8gb ram, a gigabit wired network and a Synology DS214+ NAS. The 214+ is not the intel DSPlay, but the Armada powered unit, which is apparently not very capable of running Plex and streaming to the Roku on its own.

So, if I understand things, I should be able to store my video on the DS214+, run Plex on the mac mini, which will index the DS214+, and then stream to the Roku, which will provide the user interface on the TV and iOS devices, and overall control. Correct?

a couple of more questions...

I am looking at the Roku3 -- good choice?

Is the mac mini going to be underpowered too? Time to upgrade?

Any advantage to a "server" setup?

Should I keep my pics/music on my main iMac or move them to the Synology? I ask b/c I didn't know if the Plex can find media all over the network... Most of my music and pics are on my main office iMac, not the mac mini. Since the iMac is locked down (yeah right) with password protection etc, if I open up the music/photo files, am I compromising security?

Posted on
Sun Apr 05, 2015 10:16 am
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Re: Plex Media Server Manager Plugin - Beta

I can tell you what I have experienced as I have a similar setup….

Currently I run a Mac Mini 2012 with 8megs of ram. On that I run Indigo as well as my Plex server, Plex Home Theater and OSX Server. For storage of my movie collection I run a Seagate Blackarmor 8TB raid array striped Raid 5.

In various rooms I use a Roku Stream Stick, Amazon Fire Stick and Roku 3.
For the client side in a dedicated family room nothing beats Plex Home Theater when it comes to options and sorting your collection. It does have a few bugs currently like the resume bug.

• The Amazon fire Stick is really snappy for $39.00 and has a nice interface.
• The Roku Stream stick is a bit laggy but its really only a Roku 1 cut down.
• The Roku 3 is fast and responds well but I honestly see no great advantage over the Amazon Fire stick and it is twice the money.

If you’re a Plex Pass member Plex is currently allowing us to test the Beta of the new Roku interface. I think it is a big improvement over the old version but it still lacks many of the features PHT has.

My Mac Mini seems to be doing fine with the load I put on it with a few exceptions. I also allow my two sisters remote access to my Plex library on Roku’s they have at their homes as well. If we all happen to be using Plex at the same time and I am streaming in our movie room while my wife is streaming upstairs the Mini struggles with queue times.

From what I have read thus far it really comes down to how many connections need to be transcoded at the same time. I attached some screen shots from OSX Server of my processor, network and memory usage over the past two days. I typically watch movies from 6:00 PM until 11:00 PM so it shows spikes during those times but nothing that is screaming need for upgrade currently.

My long term goal is to move Plex Server and PHT to it’s own Mini. Currently I am reluctant to do this mainly because I began this Home Automation Project to control power consumption and reduce electrical cost. So far that aspect doesn’t seem to be working for me.

Image

Image

Image

Who is online

Users browsing this forum: No registered users and 2 guests

cron