As with most hobbies, Plex users want to show off their collection to friends and family! Understandably Plex is a very security-conscious application. That means if a user wants to share statistics about their library, they need to provide the user with credentials. That makes sharing a little tricky when you “only” want to share the statistics, not the actual content. Even more of a challenge, the native Plex dashboard uses a REST API that is not publicly documented.
I decided to build a Plex insights dashboard in SquaredUp that I could share with anyone.
To display anything, we first needed to identify where our data resides. After a bit of investigation, it was determined that the Plex Media Server stores data in two locations. The first location is in the cloud, and the second is a local SQLite database.
We won’t go into the details, but the Plex Media Server creates a unique HTTPS URL for every Plex Media Server installation (in a rather genius way, actually). Since we know the username and password, our requests should piggyback on the same URL once we know what to send. Once we identified our unique URL (using the browsers debugging tools), we also captured the necessary API calls to replicate the default status dashboards.
While using the debugging tools, we also discovered our second data source with some data that originated from a local SQLite database.
Now that we’ve identified our two data sources and with a bit of creativity, we can now share our Plex statistics dashboard via SquaredUp’s Open Access feature!
The Plex insights dashboard is a mix of REST API calls using SquaredUp’s Web API and PowerShell tiles. For example, the CPU Utilization tile is a Web API tile that calls the Plex endpoint “statistics/resources,” which returns a JSON payload that is then graphed.
Using a donut graph, we can see how many TV episodes versus movies have been watched. The Most Viewed bar graph shows me what the favourite films are in this household and the right-hand donut shows which of the Plex libraries are the most popular.
Line graphs help monitor CPU Utilization and Bandwidth Usage so we can spot if there are any issues.
Also, a grid list of friends is a great reminder of who has access and what their usernames are.
We can also keep an eye on what’s being watched currently with the grid list of Last Watched.
Start now with hundreds of customizable dashboards.