1
votes

I would like to control Alexa from Python. I find lots of documentation of the opposite (i.e. sending commands from Alexa to Python), but for my home-automation system, I would like to make Alexa play music in certain situations.

What I did find was: https://github.com/ewenchou/alexa-client Here, I can

alexa.ask(["What is today's date", "Play Station xyz FM"])

But these commands are certainly routed through Alexas speech recognition and thus I fear that the reliability will be lower than if using a direct API bypassing the speech.

I did find https://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html as well. This is directly interacting with Alexa by using http calls just like the Alexa Web-App. This approach has the benefit that no Amazon developer account and complex registration/security token/etc. are needed. It has the drawback that it is not a documented API as far as I know. Furthermore it is written in bash and not in python.

Do you know of any python module that does this job -preferably without complex registration/auth/...

Thanks for your help, Hendrik