Running GMusicProxy on Hassio

Has anyone set up a GMusicProxy on Hassio?

I set one up as a Hassio add-on (https://github.com/miikkajo/hassio_addons/tree/master/gmusicproxy), but I can’t figure out how to set up the oauth credntials.

Does anyone else run a GMusicProxy, and how did you do it? Are there other images or pre-configured setups I can start with?

I’m in the same situation. I can’t find where the addon has installed (also running Hassio). The addon reports it has correctly entered sleep mode for 3600 seconds, waiting for the config - but I can’t work out how/where to execute /GMusicProxy -o

Hi,

I’m running hassio on my linux server,
i suppose you are using some kind of raspberry image?

If it is not possible to get to OS shell to run docker commands
there is Portainer add-on available:

With Portainer you can manage containers and get to exec console with web browser.
Follow instructions when installing add-on, disable protection mode and start Portainer,
then go to Settings and on Hidden containers remove add-on type from filter list.

Then you can see docker containers on Containers section
find addon-gmusicproxy container and click “>_” button on quick actions

Defaults are command /bin/bash as root, keep those and push Connect and you will have exec console, happy days :slight_smile:

There you can type "/GMusicProxy -o " command and make credentials file

you can use ‘cat /data/mobileclient.cred’ after to check that file was generated

hopefully this will help you

br, miikka

miikka, thanks for the reply (again).

I followed your steps, but when I type the /GmusicProxy - o command I get the following:

bash-5.0# /GmusicProxy -o
bash: /GmusicProxy: No such file or directory
bash-5.0#

It does say it’s running, under ‘state’

nm, it should be “/GMusicProxy -o”, capital M

corrected…

Thanks both, working now. Excellent!

everything seems to be working as expected, thanks!!!

I am getting a couple ‘unknown commands’ on startup, do I need to worry about them? (I removed some IDs, and names below)

[15:53:53] INFO: Starting gmusicproxy…
Google Play Music Proxy 1.0.10 (© Mario Di Raimondo)
Pre-fetching list of songs in collection
unable to load queue from file
unable to track_index from file
Listening on 0.0.0.0:9999…
Unknown command ‘/api/hassio_ingress/pzXIr-/get_collection_artists_json’ or missing required parameter!
Unknown command ‘/api/hassio_ingress/pzXIr-/get_collection_albums_json’ or missing required parameter!
Unknown command ‘/api/hassio_ingress/pzXIr-/get_stations_json’ or missing required parameter!
Unknown command ‘/api/hassio_ingress/pzXIr-/get_playlists_json’ or missing required parameter!
Unknown command ‘/favicon.ico’ or missing required parameter!
Unknown command ‘/’ or missing required parameter!
Unknown command ‘/api/hassio_ingress/pzXIr-/get_collection_artists_json’ or missing required parameter!
Unknown command ‘/api/hassio_ingress/pzXIr-/get_stations_json’ or missing required parameter!
Unknown command ‘/api/hassio_ingress/pzXIr-/get_collection_albums_json’ or missing required parameter!
Unknown command ‘/api/hassio_ingress/pzXIr-/get_playlists_json’ or missing required parameter!
Unknown command ‘/favicon.ico’ or missing required parameter!
Unknown command ‘/api/hassio_ingress/pzXIr-/update_cache’ or missing required parameter!
Streaming song with id ‘secretcode’: Band Name - Song
Increment playcount

Great! :sunglasses:

hmm, all seems to be related to “UI”, it should not affect normal usage.

/browser UI and queue handling is only for my gmproxy_player custom_component,
ill try to figure out what the problem is…

ok,
added check for missing queue and trackindex files,
if not found, will create.

as for those:
Unknown command ‘/api/hassio_ingress/pzXIr-/get_collection_artists_json’ or missing required parameter!

i do not have those warnings, dont know why those url’s do not work…
what version of hassio are you running ?

I’m using Hassio 3.7.

I restarted gmusicproxy, and the errors don’t appear anymore. perhaps initial launch issues?

@miikkajo

Did you get the Oauth login working for gmusicproxy in you add-on?

yes, its working.
its pretty annoying as you need to visit docker shell to use it, but its working OK.
and you only need to do it once.

miikka

I just tried betting this Oauth working via Portainer but got the following error:

bash-5.0# /GMusicProxy -o

Visit the following url:
Sign in - Google Accounts
Follow the prompts, then paste the auth code here and hit enter: [redacted]
/usr/lib/python3.8/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access /root/.local/share/gmusicapi/mobileclient.cred: No such file or directory
warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
2020-03-17 07:35:29,617 - gmusicapi.Mobileclient1 (shared:183) [WARNING]: could not retrieve oauth credentials from ‘’/root/.local/share/gmusicapi/mobileclient.cred’’
Done.

Any ideas?

well, i see that path for credentials is wrong…
i have to check why

I just noticed you have a new version up so I updated and tried the Oauth again, this time it seems to have worked. (came up with ‘Done’)

update: this is working perfectly now. Thank you for your awesome efforts!

Hi,

I’m running 5.1.0 having the same issue

UserWarning: Cannot access /root/.local/share/gmusicapi/mobileclient.cred: No such file or directory
  warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
2020-04-06 13:07:14,388 - gmusicapi.Mobileclient1 (shared:176) [WARNING]: could not retrieve oauth credentials from ''/root/.local/share/gmusicapi/mobileclient.cred''
Done.

running Home Assistant Core 0.105.5

Hi,
does /data/mobileclient.cred file get generated, dispite those warnings ?
I think it’s just looking cred file from default location,
after restarting addon gmusicproxy should find credentials file from /data.

I’ll try to get rid of those warnings anyway.