furtive

GeeMusic docker

Recommended Posts

Hi

I'm running Docker on my UnRaid server and would like to run a GeeMusic server on it so that I can access Google Play Music on my Amazon Echo. There are instructions here:

 

https://github.com/stevenleeg/geemusic

 

But I don't have the first clue where to start. I can get to the console on my server using PuTTY but don't know what to do next.

 

Would anyone be able to tell me how to create a docker for geemusic (or is anyone already working one something?)

 

Many thanks.

Share this post


Link to post
Share on other sites

Hi Furtive,

 

Creating stuff to work with Alexa is not a simple matter. While it can be simple to install a Docker and have it run what is needed, it get complicated when you get to the Amazon side of things. You need certificates in order to connect to your server to/from Alexa. You need to create the skill in your own Amazon account. I have tried many times to get Sonos, and Kodi Alexa skills to work with very little success. I am not a pro, but also not a newb either.

 

I do hope for more unRAID community interest for Alexa fans. I would love Couchpotato, Sonarr, Raddar, Medusa, Sickrage, Kodi, etc. Alexa connect dockers. Something that perhaps integrates LetsEncrypt certificates...

 

So.... +1 from me.

 

This is part of the Amazon side of the skill setup:

 

qxv7i8r.png

 

 

 

Share this post


Link to post
Share on other sites

Thanks hernandito.

 

The instructions on the link I provided show how to create a development Alexa skill to work with this. Is it not as easy as the instructions suggest?

Share this post


Link to post
Share on other sites

It is there, but there is a big missing issue... creating the SSL certificate in your server/docker/reverse proxy, and tie it to the skill. You may know more about the subject than I do, but just from experience, it has never been as straight forward as the guides suggest.

 

Using the Heroku may be slightly easier, but then there is no docker needed as Heroku is hosting your skill. I believe it costs $$. You can also have Amazon Lambda host the code for you (free for a ton of requests per month). But I saw nothing on the git on how to do that.

 

He talks about ngrock, I have never tried or seen that. Perhaps that is the answer.

 

I'll take a look and see how easy it would be to create a template for their Docker, but after that, I am positive I will not know how to actually make it work w/ Amazon. I dont have Google Music either.

 

 

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

Try this xml... Create a file in /flash/config/plugins/dockerMan/templates-user/ and call it my-geemusic. Paste the below contents into the file and save. Then install it and fill out the info.

 

My docker was able to log into my google account. Beyond this, I cannot help.

 

<?xml version="1.0"?>
<Container version="2">
  <Name>geemusic</Name>
  <Repository>kuroshi/geemusic</Repository>
  <Registry>https://hub.docker.com/r/kuroshi/geemusic/~/dockerfile/</Registry>
  <Network>bridge</Network>
  <Privileged>false</Privileged>
  <Support>https://hub.docker.com/r/kuroshi/geemusic/</Support>
  <Icon>http://i.imgur.com/glans3o.png</Icon>
  <Overview>A bridge between Google Music and Amazon's Alexa

[b]Converted By Community Applications[/b]</Overview>
  <Category/>
  <WebUI>http://[IP]:[PORT:4000]</WebUI>
  <TemplateURL/>
  <Icon/>
  <ExtraParams/>
  <DateInstalled>1497043160</DateInstalled>
  <Description>A bridge between Google Music and Amazon's Alexa

[b]Converted By Community Applications[/b]</Description>
  <Networking>
    <Mode>bridge</Mode>
    <Publish>
      <Port>
        <HostPort>4000</HostPort>
        <ContainerPort>4000</ContainerPort>
        <Protocol>tcp</Protocol>
      </Port>
    </Publish>
  </Networking>
  <Data/>
  <Environment>
    <Variable>
      <Value>place-your-email-here</Value>
      <Name>GOOGLE_EMAIL</Name>
      <Mode/>
    </Variable>
    <Variable>
      <Value>yourpassword-here</Value>
      <Name>GOOGLE_PASSWORD</Name>
      <Mode/>
    </Variable>
    <Variable>
      <Value>address-from-outside</Value>
      <Name>APP_URL</Name>
      <Mode/>
    </Variable>
  </Environment>

</Container>

 

Edited by hernandito

Share this post


Link to post
Share on other sites

Many thanks. I've created the file, added my google username and an application password in the value fields, but when it runs I get this error:

 

10:08:29 web.1 | started with pid 10
10:08:31 web.1 | Traceback (most recent call last):
10:08:31 web.1 | File "server.py", line 1, in <module>
10:08:31 web.1 | from geemusic import app
10:08:31 web.1 | File "/geemusic/geemusic/__init__.py", line 13, in <module>
10:08:31 web.1 | api = GMusicWrapper.generate_api(logger=app.logger)
10:08:31 web.1 | File "/geemusic/geemusic/utils/music.py", line 256, in generate_api
10:08:31 web.1 | return cls(environ['GOOGLE_EMAIL'], environ['GOOGLE_PASSWORD'],
10:08:31 web.1 | File "/usr/lib/python3.6/os.py", line 669, in __getitem__
10:08:31 web.1 | raise KeyError(key) from None
10:08:31 web.1 | KeyError: 'GOOGLE_EMAIL'
10:08:31 web.1 | exited with code 1

Any ideas?

Share this post


Link to post
Share on other sites

sounds like you did not enter your email or password properly... when I added mine, the error went away.

Share this post


Link to post
Share on other sites

Hmm, I've tried both my master google password and an application specific password and neither worked.

Share this post


Link to post
Share on other sites

There is something else stopping this from working, as I created a new Google account just for this to use and am getting the same error. Any thoughts on what else I could try?

Share this post


Link to post
Share on other sites
Posted (edited)

Not sure how to resolve your issue.

 

You could try to run this command from your unRAID CLI. Switch out the username/password with the correct ones.

 

docker run -d -e GOOGLE_EMAIL=steve@stevegattuso.me -e GOOGLE_PASSWORD=[password] -e APP_URL=http://alexa-geemusic.stevegattuso.me -p 4000:4000 geemusic

Remeber that the APP-URL has to be a valid internet URL to your server from outside your network. If you do not have that, there is no chance this will work. Plenty of tutorials out there how to do this.

Edited by hernandito

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks. I tried to run the command from the CLI but get this:

 

Unable to find image 'geemusic:latest' locally
Pulling repository docker.io/library/geemusic
docker: Error: image library/geemusic:latest not found.
See 'docker run --help'.

EDIT: Ran it with kuroshi/geemusic at the end and it's now running fine!

 

But I'm stuck again because the instructions for setting up the Amazon skill aren't working - I'm getting a JSON error. I give up.

 

Thanks for your help though.

Edited by furtive

Share this post


Link to post
Share on other sites

Best bet is to install the node js stufff into amazon lambda account, then create an Alexa skill also on amazon.

 

stuff is not easy for us tinkerers. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Copyright © 2005-2017 Lime Technology, Inc. unRAID® is a registered trademark of Lime Technology, Inc.