furtive Posted June 9, 2017 Share Posted June 9, 2017 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. Quote Link to comment
hernandito Posted June 9, 2017 Share Posted June 9, 2017 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: Quote Link to comment
furtive Posted June 9, 2017 Author Share Posted June 9, 2017 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? Quote Link to comment
hernandito Posted June 9, 2017 Share Posted June 9, 2017 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. Quote Link to comment
hernandito Posted June 9, 2017 Share Posted June 9, 2017 (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 June 9, 2017 by hernandito Quote Link to comment
furtive Posted June 12, 2017 Author Share Posted June 12, 2017 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? Quote Link to comment
hernandito Posted June 12, 2017 Share Posted June 12, 2017 sounds like you did not enter your email or password properly... when I added mine, the error went away. Quote Link to comment
furtive Posted June 12, 2017 Author Share Posted June 12, 2017 Hmm, I've tried both my master google password and an application specific password and neither worked. Quote Link to comment
furtive Posted June 13, 2017 Author Share Posted June 13, 2017 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? Quote Link to comment
hernandito Posted June 14, 2017 Share Posted June 14, 2017 (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 [email protected] -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 June 14, 2017 by hernandito Quote Link to comment
furtive Posted June 19, 2017 Author Share Posted June 19, 2017 (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 June 19, 2017 by furtive Quote Link to comment
hernandito Posted June 20, 2017 Share Posted June 20, 2017 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. Quote Link to comment
w5lee Posted April 10, 2018 Share Posted April 10, 2018 Anyone get this working yet? I think I am close. I have my SSL certificate created but don't know how/where to put it the docker container. Quote Link to comment
dmarts Posted April 5, 2019 Share Posted April 5, 2019 This post was a long, long time ago... but I managed to get this working and I can try and answer some questions if anyone wants. Can't tell you best practice or anything like that. I've got the geemusic docker running, and the API it exposes (local only) is exposed to the internet by nginx as https://mydomainname.com/alexa - this then goes in the Alexa Dev Console with the certificate option as "My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority". The SSL / certificates part was all managed by the letsencrypt docker, which is pretty well documented online... it requests the certificate itself and applies it so geemusic doesn't need to know about SSL, it just exposes the API locally and nginx (in the letsencrypt docker) handles the encryption. The letsencrypt docker is awesome and I would recommend it - it 8/10 easy to get everything working but 25/10 for the security I needed. So the overall process for a request on my setup is: Alexa device sends request to Alexa servers (and a whole bunch of other stuff) Alexa things happen using the custom skill that I copy/pasted in there according to the instructions, then it calls the endpoint https://mydomainname.com/alexa nginx is exposing that endpoint to the internet (in my case nginx is in the letsencrypt docker) nginx passes that request to an endpoint on the geemusic docker, i.e. 'for the /alexa path on https://mydomainname.com, send the requests on to localhost:5000', which happens to be where the geemusic docker is exposing an endpoint geemusic docker gets the request and does geemusic stuff and returns a response back to Alexa (a URL for the track / whatever) Sweet sweet music Quote Link to comment
w5lee Posted April 5, 2019 Share Posted April 5, 2019 Wow has been a long time. Thanks so much for the reply. Glad you got it going. I may give it a go in a couple of weeks. I have some travel coming up and can't get to it right away but still would like to have it working. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.