Plex and PlexAmp plugin

I should be able to get back to making the plugin much more resilient in the next few weeks, so I will see if there is an easy solution to ignoring older servers that are invalid and only use ones that are active

1 Like

Cool, thanks a lot for all your help. Is the blank configuracion/Settings page is due to this issue? If we could select the server somewhere, the actual user could just ignore the servers and conncet to the one they want to and maybe most of the problems would be resolved.

Great Job & thanks for the work!

I think its due to an exception I get when looking at the response from one of the Plex servers ( basically I need better error detection and better handling of ā€œunknownā€ responses) - basically my home setup has a fairly clean Plex setup e.g. if you go here:

https://app.plex.tv/desktop/#!/settings/devices/pms

And pick servers on the drop down - you should hopefully only see your current servers - my guess is there are other older servers in that list which donā€™t exist

1 Like

Hi, just if it can help (maybe best thorugh DM) but I only have one server inside (nor active nor no-active).

Great but not this week - I DM you next week and maybe I can give you a pre-release with extra debug information which will hopefully get to the bottom of the issue

Thanks for the plugin!
I finally found the right instructions for installing it.

but, the audio isnā€™t working for me. I connected my headphones to my RPi 4 for testing it, but itā€™s some kind of rhythmic noise I hear.

Do I need to change some settings for making the audio work in PlexAmp?
Audio in volumio does work.

Hi @Jerome_O_Flaherty ! Apologies if this was solved before, is there any link to try you awesome plugin? Iā€™d love to try it. Thank you so much for your effort!

similarly would love to test this. iā€™ve found it on github, but iā€™m not too clear on how you install beta/test plugins.

Hi meltapple,

Type http:// /dev
There - enable plugin test mode
Then you will find it under ā€œmusic pluginsā€

2 Likes

Hi I removed my old PlexMediaServer, removed the plugin, installed the plugin again and it still refers to the old Plex Server. What more can I do to make it work?

Hi,
check this location:

/data/configuration/music_service/plexamp$

There will be a config.json in this location on your box and it might have the details of your old plexmedia server.

Appologise for not getting back to this plugin - I am thinking of rewriting a significant part of it as I know allot more about volumio development now than I did when I started the plugin and I believe the problems are related to poor error handling by me if something doesnā€™t exactly match what I am expending Plex to return.

Anyway, hopefully I will get time in the next few weeks to fix these issues - I believe once it has a good ā€œconfigurationā€ it works reasonable well.

2 Likes

Hi, thanks for replying.
I looked in the file and changed the value of server to my new server, restarted the plugin, but it still wasnā€™t accessible. I then changed the name of my old plex server tot something else, reinstalled volumio and the add-on but it stayed with the old name and didnā€™t connect.

Blockquote
info: plexamp/newest
info: PlexAmp::connect ECONNREFUSED 127.0.0.1:32696
info: CoreCommandRouter::executeOnPlugin: plexamp , handleBrowseUri
info: plexamp/artistsnewest
info: PlexAmp: In ListNewestArtists
info: PlexAmp::connect ECONNREFUSED 127.0.0.1:32696
Blockquote

With what command did you ask for the first Server Name?

Does value has to have a real value?
"server":{"type":"string","value":"undefined"****}

Another question about the config what is this port used for?
"port":{"type":"string","value":"20792"****}

Blockquote
info: PLUGIN START: plexamp
info: Loading i18n strings for locale en
Updating browse sources language
Cannot find translation for sourceMedia Servers
Cannot find translation for sourcePlex
info: CoreCommandRouter::executeOnPlugin: my_music , getDisabledSources
Cannot find translation for sourceMedia Servers
Cannot find translation for sourcePlex
info: PlexAmp::Plex initialised[object Object]
info: CoreCommandRouter::volumioAddToBrowseSources[object Object]
info: [1684675554079] CoreMusicLibrary::Adding element Plex
info: CoreCommandRouter::executeOnPlugin: my_music , getDisabledSources
Cannot find translation for sourceMedia Servers
Cannot find translation for sourcePlex
info: Done.
Blockquote

Is it a problem that it canā€™t find translation?
I already changed my locale from nl to en in the hope it would work.

Thanks for the effort!

Sorry for the problems - when I do update the plugin I am going to include an extra debug logging option to hopefully iron out these issues.

Plex has various options both a local, cloud and potentially a remote plugin. I need to check but I think I basically do the follows:

  1. Query using the Plex Token the PlexCloud for a list of registered servers
  2. Loop around those trying to determine which are on the same network (though I was originally thinking it would be cool to remotely play music from a different plex server location)
  3. For a given server I connect to it locally (on the local network rather than the cloud) and use the ā€˜unofficialā€™ plex API to query the list of ā€˜audio librariesā€™ and make a list of these for the UI. I have 2 separate plex servers in my house and one of those has 1 music but the other one has 2 separate audio libraries (one being just for audiobooks), so I presumed I covered most of the combinations.
  4. What server / library combination is picked is then saved into this config.json - I noticed that the local port can be changed in plex so I separately save the port in this json.
    So I have in my configuration the IP address of the local server:
  "server": {
	"type": "string",
	"value": "192.168.31.201"
  },
  "serverName": {
	"type": "string",
	"value": "garagevolumio"
  },
  "port": {
	"type": "string",
	"value": "32400"
  },
  "library": {
	"type": "string",
	"value": "Music"
  },
1 Like

thanks for the info, it works now! But I think it sees all my libraries, if you click on recently added albums, it also shows movies and shows. But it doesnā€™t bother me.
But could you tell me what feature exactly makes it a plexamp? Because itā€™s almost the same as Plex DLNA with Media Servers.

I also tried to use it remote and using my public IP and public plex port, but it failed. Too bad, because I wanted to use it remote. Hopefully, in the future it will work.

Well it uses Plexamp ā€œapiā€ and not dlna but obviously should see the same library!

A couple of things you might notice is I can pull sonically similar albums and I think I pull back album reviews from Plex!

When I get back to the code I will also enable a Plex cast like functionality so it should appear in the Plexamp app as a destination

1 Like

Also, a very early version of this I optionally installed the headless plexamp binary (which like Volumio is written in Node) - but PlexAmp have moved to only support a newer linux kernel so it stopped working, but I believe I can get it to work again in a future Volumio and have that casting capability enable again.

1 Like

Yes, I think I tried that one also. The installation only works with an older version, 4.4, I think, but I couldnā€™t get music playing with it.
Too bad.

what is the minimum required version?

(Iā€™m breaking this into multiple messages because the interface will not let me post more
than two http links per message as a new user.)

Hi @Jerome_O_Flaherty, thank you for writing this plugin!

It did not work for me out of the box, but I have been trying for years to get a number of
devices in my home to access my local Plex media server using the DLNA interface.
Doing that was always less than ideal because detection of the server by the client took
several minutes, or sometimes didnā€™t seem to work reliably at all (for devices that have
DLNA support in firmware.)

I cloned your GitHub repo and tried your plexamp plugin on my Raspberry Pi 3b running Volumio 3.449. My Plex media server was not detected and got the ā€œserver 127.0.0.1 not foundā€ that others
reported.

Since Iā€™m a DevOps engineer and software developer that supported a nodejs interface service for
a Silicon Valley startup for 3+ years, and Iā€™m currently between gigs, I decided to fork your repo and
have a look at what was going on for the last 3 weeks.