As I found no clear and easy to follow tutorial in the internet on how to:
- have Alexa (with Echo) understand commands beyond turn on / turn off
- control a raspberry PI with voice using an Echo device and Alexa
- stay not "very insecure" with the entire prototype
I wrote my own one: http://www.jasm.eu/2017/02/22/amazon-al ... -together/
Enjoy and feel free to ask here, in case anything is unclear.
Re: Tutorial for an Alexa Skill to control the PI
This was a very helpful tutorial, and worked for me - thank you.
I'm hoping to use raspberry pi strogonanoff
https://github.com/dmcg/raspberry-strogonanoff
to control some lights from Alexa.. This looks like it could help! I'll let you know if I get stuck...
I'm hoping to use raspberry pi strogonanoff
https://github.com/dmcg/raspberry-strogonanoff
to control some lights from Alexa.. This looks like it could help! I'll let you know if I get stuck...
Re: Tutorial for an Alexa Skill to control the PI
Hi - I got this to work, but I have a few questions? If you could make a tutorial for a more advanced version, it would be really useful!
What's the best way to make it work relatively permanently? If I leave it all up and running overnight, it stops working the next morning (Alexa says skill not found, or something similar -(maybe the test version times out after a while?)
How do I send variables back and forth? At the moment, I've managed to write a single script that turns a light on using Strogonanoff. What's the best way to expand the number of "intents"? (bearing in mind I'm a muddling non-programmer, who doesn't really understand how cgi-bin files work...)
I'd like to be able to issue different commands for different lights "Alexa, tell mylights to switch light 1 on", etc...
Many thanks for any help you can offer
What's the best way to make it work relatively permanently? If I leave it all up and running overnight, it stops working the next morning (Alexa says skill not found, or something similar -(maybe the test version times out after a while?)
How do I send variables back and forth? At the moment, I've managed to write a single script that turns a light on using Strogonanoff. What's the best way to expand the number of "intents"? (bearing in mind I'm a muddling non-programmer, who doesn't really understand how cgi-bin files work...)
I'd like to be able to issue different commands for different lights "Alexa, tell mylights to switch light 1 on", etc...
Many thanks for any help you can offer

-
- Posts: 5
- Joined: Mon Dec 24, 2012 2:38 pm
Re: Tutorial for an Alexa Skill to control the PI
Hi, when I run the Alexa command in the Amazon developer programme, the command is "Alexa, tell Kermit today" the raspberry pi and the amazon service response tell me "501 can only POST to CGI scripts.
Anyone help me resolve this?
Thanks
Peter
Anyone help me resolve this?
Thanks
Peter
Re: Tutorial for an Alexa Skill to control the PI
Peter,
That means Alexa is sending it's POST request to your server (on the PI), and the server is receiving it. The error is that it's sending to the wrong page, or to a page that's not in the cgi-bin folder.
So...
The 'alexa.sh' file in the example has to be in the cgi-bin folder.
Then, in the skill setup on amazon, you have to be pointing to the correct place. For example, when I first did it, I accidentally used cgi_bin rather than cgi-bin..
That means Alexa is sending it's POST request to your server (on the PI), and the server is receiving it. The error is that it's sending to the wrong page, or to a page that's not in the cgi-bin folder.
So...
The 'alexa.sh' file in the example has to be in the cgi-bin folder.
Then, in the skill setup on amazon, you have to be pointing to the correct place. For example, when I first did it, I accidentally used cgi_bin rather than cgi-bin..
-
- Posts: 6
- Joined: Sun Nov 12, 2017 2:23 pm
Re: Tutorial for an Alexa Skill to control the PI
How far did you guys get with this project?
-
- Posts: 1
- Joined: Thu May 31, 2018 10:32 pm
Re: Tutorial for an Alexa Skill to control the PI
Thank you very much, was quite intutive and worked. After installing ngrok, I had to register, get an auth token and run "./ngrok authtoken <> <>" once only after which the public URL started working. Just something I wanted to add...
I could get it to work on the website and verified that the raspberry pi was hit on port 8000. Thanks again for your effort putting this content together!
I could get it to work on the website and verified that the raspberry pi was hit on port 8000. Thanks again for your effort putting this content together!
Re: Tutorial for an Alexa Skill to control the PI
Hello, I've been trying to figure out a way to control my microsoft surface hub using alexa and my raspberry pi. Just wanted to know if it would be possible to use Alexa to open putty on the raspeberry pi, and give commands from there?
Re: Tutorial for an Alexa Skill to control the PI
Thank you for this great job , is there a way to make this work offline?