Closed processor286 closed 4 years ago
I should add, I'm using a google account that's on a family plan for music, so that I don't have my main account hanging out there with an app password.
Oh and in the Alexa skills tester, the "Medium Hub" display shows the artwork for the thing I ask gee music for. So that bit works.
Half solved it.
It was a misunderstanding on my part.
I had APP_URL set to localhost:// because that's where the python was bound to, with the nginx server being on the public domain.
I see now that the APP_URL is not used to bind the service at all, but to pass to Amazon/Alexa as the URL to contact for music streaming.
Using a URL in the style of
Still doesn't result in a succesful stream. Is there more debugging I can turn on?
Final note. Turned on DEBUG and I now get audio ... ? Was it the debug flag? Or the restart?
Who knows. For now, I'm leaving the debug on,lol.
I'm using the docker build. I have it behind an nginx reverse proxy with SSL.
I believe the skill can reach my docker container, as I see the logs scrolling by.
For example when testing the skill:
"ask gee music play the song hypersonic missles"
Alexa skill gets an empty JSON response, and says "There was a problem with the requested skill's response"
I can see in my docker log:
16:46:37 web.1 | DEBUG in selection [/geemusic/geemusic/intents/selection.py:119]: 16:46:37 web.1 | Fetching song hypersonic missles by None 16:46:37 web.1 | -------------------------------------------------------------------------------- 16:46:38 web.1 | 10.255.0.2 - - [05/Dec/2019 16:46:38] "POST /alexa HTTP/1.1" 200 - 16:46:39 web.1 | 10.255.0.2 - - [05/Dec/2019 16:46:39] "POST /alexa HTTP/1.1" 200 -
If I try and request a song that doesn't exist:
"ask gee music play the song iueywjnvkjlb"
Gives a JSON response: { "body": { "version": "1.0", "response": { "outputSpeech": { "type": "PlainText", "text": "Sorry, I couldn't find that song." }, "shouldEndSession": true, "type": "_DEFAULT_RESPONSE" }, "sessionAttributes": {} } }
And my log file says:
16:48:17 web.1 | -------------------------------------------------------------------------------- 16:48:17 web.1 | DEBUG in selection [/geemusic/geemusic/intents/selection.py:119]: 16:48:17 web.1 | Fetching song iueywjnvkjlb by None 16:48:17 web.1 | -------------------------------------------------------------------------------- 16:48:17 web.1 | 10.255.0.2 - - [05/Dec/2019 16:48:17] "POST /alexa HTTP/1.1" 200 -
So it seems the Alexa skill is talking to my python server okay. But anything that would result in finding an actual song produces a bad response.
What might be the problem please?
I feel I'm very close to this working!