sam9s Raspberry Pi Project! powered by Amazon Echo, A.K.A Alexa.

sam9s

Well-Known Member
Joined
Aug 25, 2009
Messages
5,245
Points
113
Hi Friends,

Sharing with you another Project that I did on Raspberry Pi this weekend, don't worry, this time, I am not going to write a long guide that most of you find intimidating. :D, but would just share what I did this time with Rpi. Ofcourse those who are interested can anytime ask post any query and I can share what all I did or which tutorial I followed.

The seed for this project was sown when I had a discuss with our esteemed FM regeHA and superczaron on Amazon ECHO. (http://www.hifivision.com/home-theater-pc-htpc-media-pc/62385-yet-another-htpc-advice-thread-25.html) and I google it for more info to see what exactly it is. This lead me to an awesome discovery, with Amazon providing the Echo services and APIs, developers have actually ported the entire thing on Rpi.. :) The main developer behind this is a person named Sam Machin. You can read everything about his project here The $10 Echo | sammachin.com

There are loads of forks of his projects with people porting ECHO on their Rpi and loads of you tube tutorials as to how to do it. I followed one and below is the video of what I was able to achieve. :)

Amazon ECHO on Raspberry Pi

https://www.youtube.com/watch?v=95s2fFOkvMI&feature=youtu.be


So you see, pretty cool. This however is limited in functionality as quite a few services and features are dependent on Amazon ECHO app on mobile, specially the music control, which is what I think most of the people might use Alexa for. I was not able to even side load the app, it installs but just does not open. (Will do more RnD on it later). But general questions of GK and other things works, like timer worked perfectly. I tried for 30 sec and surely I was able to hear the audio cue after 30 sec. I was also able set alarm, since the internal clock was US, it wasnt usable (still need to see how and if we can change the internal server clock), but timer, as I said worked. Also adding products to a shopping list also worked, BUT since you can only edit the list via amazon app (not sure if we can do it on amazon portal), once the product is added, you cannot remove it.. :). I was also able to link my Alexa profile to IFTTT and create a recipe as well, wherein whenever I add a product to my shopping list, it would mail it to me.. :) worked perfectly.

I might not use it often, but I see my kid excited and trying different questions in English. Like height of Everest or capital of USA.. :). This might improve his spoken English and also act as a google knowledge base

So this one was my another Rpi weekend project. As I said in my video, I will try the button approach as well, which if successful I will actually pack it in a box, for my kid to use it. I also will see if I am able to find something that also actually makes ALEXA on Rpi auto voice activated. That would really make it an actual project worth keeping :)

Any questions, most welcome .. :)

Regards
Sammy
 
Last edited:
Well ALXEA seems to be amazing, the more in dive in to it, the more intriguing I find it to be. Now the news for my FMs is, Amazon has opened sourced the project and has given the developers to programme snippets or skills as they say to actually make ALEXA interact and behave the way we want. Its all in Python and node.js. But the way amazon have created the entire infrastructure for making it, super easy for coders to have their own interaction skills is just amazing. Its a little confusing at first but really easy, if you know or understand a little about programming.

This will be my another project now. Since ALEXA is already running on my Rpi, and is connected to my AMAZON developer accounts, if I create a skill and execute it, and then then invoke the voice cue, ALEXA should respond.

To give this a little perspective, an example what people have done .

1. This dude (What I Learned Today Atomic Jolt) has created a skill, using open API from NASA, that provides information about any astroid that has passed the earth or will pass the earth in a given time. So the dude just says ALEXA ask....."spaceball"...."are we going to die today" .... and usually ALEXA will say she does not get the question, BUT since this dude has created a skill in node.js (well not from scratch, snippets are available and you just customize it accordingly) that interactes with AWS that inturn runs the code uses the API and returns the information from NASA. So in this example "spaceball" is his keyword, that invokes his project, and then rest is the phrase that sends the request to NASA, which brings back the information about the astroid from NASA using the API..... I thought it was coooll.:) :) I am gonna work on this and see what all I can do and customise ALEXA per my voice cues ....... check out the quick very small video that shows what I just expplained above ...

https://youtu.be/0RB5pedgjEQ
 
You should subscribe for updates from Alexa Skills Kit, https://developer.amazon.com/alexa-skills-kit.

Also, an unofficial repository of all the Alexa Skills, Alexa Skills Store.

They're only getting started, soon you'll be able to speak to your dishwasher, washing machine, coffee maker, etc. and tell them to turn on and do an action like make coffee. General Electric has already started to integrate Amazon Alexa with their devices.
 
^^ Already did also to AWS and EC2 and LAMBDA functions .....created a small skill as well, but still WIP ... will share only when its working as per my expectation .... this is cool :)
 
Last edited:
They're only getting started, soon you'll be able to speak to your dishwasher, washing machine, coffee maker, etc. and tell them to turn on and do an action like make coffee. General Electric has already started to integrate Amazon Alexa with their devices.

Yep they are called GE Wifi Connect appliance, but I wonder how much in India all this would be possible
 
Yep they are called GE Wifi Connect appliance, but I wonder how much in India all this would be possible

Actually quite a bit of the services don't work outside of US, but there's always a work around with whole network VPN (if the router supports it).

For me personally, getting Spotify to work was the most trouble, they seem to be using hardcoded DNS like Google of late. However, Alexa's integration with Spotify is excellent, just have to ask for the song and it will begin to play. In that way, Alexa has managed third-party integration better than Google Now, Cortana, or Siri. Like I shared in another thread, you can order pizza from Domino's as long as your details are on file.
 
Actually quite a bit of the services don't work outside of US, but there's always a work around with whole network VPN (if the router supports it).

For me personally, getting Spotify to work was the most trouble, they seem to be using hardcoded DNS like Google of late. However, Alexa's integration with Spotify is excellent, just have to ask for the song and it will begin to play. In that way, Alexa has managed third-party integration better than Google Now, Cortana, or Siri. Like I shared in another thread, you can order pizza from Domino's as long as your details are on file.

Yes I am exploring all the options and see what all is possible, dominos thing might be possible as it is done via IFTTT recipe as I was able to create a recipe to mail me the shopping list, whenever an item was added and it worked perfectly. (but Dominos India webpage should also support it))

Also I came to know you can change lots of settings for your Alexa account by going to alexa.amazon.com .... the best thing was to edit the shopping list and connect my google calendar, so now ALEXA is becoming more practice on Rpi, since now I can actually use shopping list and also add meetings on my google calendar. I was also able to change the metric measurements for temp. and distance, so I now I get the temp in C and distance in Km.:). Looks like I might actually keep this project permanently, but will have to see if auto voice activation can be done. I have seen couple of tut that have done this (https://www.youtube.com/watch?v=dzzO3a5Rwjs)...so if I am able to achieve that ....its cool, else button approach will also be acceptable..........This java dialogue box is not;..... since I have to log in to Rpi via VNC and then do the stuff, but since I did not have the hardware, this was ok. Now that I now it works and also is a project worth keeping, I will try the voice activated or button approch, and in the mean time, will see how I can also develop skills and create custom app to control and store few of my personal activities, like the dude did with NASA API ... that was really cool if you ask me ......:)
 
Last edited:
Thanks will check out what does it offer ...:)

I feel like saying, I told you so :p

On a side note, you are missing out on the real beauty of Alexa, i.e. the always on nature of it
With the new Echo dot available for pre-order for $50, you might as well order one

I am planning to get a couple of 'em :licklips:
 
Thanks will check out what does it offer ...:)

I would highly recommend it, I got the original Amazon Echo for $179, but Echo Dot is a steal at $50 each. I have ordered 2, but they are also selling a 6-pack and 10-pack, so it makes more sense to go for that and distribute them to individual family members.
 
I feel like saying, I told you so :p

On a side note, you are missing out on the real beauty of Alexa, i.e. the always on nature of it
With the new Echo dot available for pre-order for $50, you might as well order one

I am planning to get a couple of 'em :licklips:

Missing the whole point, it was never meant to be as an actual ECHO replacement, its a project you do to learn and have fun as well. There is nothing to be sarcastic about it. I CAN do it, so I do it, and I love, enjoy doing it ..... and I share my knowledge as well with all, same cannot be said for most of the others out here. Yes if the project works, and is worth ... you keep it. else you scrap it and move on...

I have done numerous Rpi projects, the only one I am using is Moode and I might use this one as well. The voice activation is also achievable as shared by me in a previous post. else button approach is as good as it can be. My kid will use it. Press button and ask anything, his inquisitive nature is helped, I see it in this way ...

In your respect then you dont even have to spend 50 USD for Dot, people have ported ALEXA on browser, google it, you just open the browser, click on a visual aid (a button a circle anything) and query ALEXA and she will response exactly like ECHO does. ... Its no big deal. ECHO is no big deal, specially after its almost all open sourced ....
 
Missing the whole point, it was never meant to be as an actual ECHO replacement, its a project you do to learn and have fun as well. There is nothing to be sarcastic about it. I CAN do it, so I do it, and I love, enjoy doing it ..... and I share my knowledge as well with all, same cannot be said for most of the others out here. Yes if the project works, and is worth ... you keep it. else you scrap it and move on...

I have done numerous Rpi projects, the only one I am using is Moode and I might use this one as well. The voice activation is also achievable as shared by me in a previous post. else button approach is as good as it can be. My kid will use it. Press button and ask anything, his inquisitive nature is helped, I see it in this way ...

In your respect then you dont even have to spend 50 USD for Dot, people have ported ALEXA on browser, google it, you just open the browser, click on a visual aid (a button a circle anything) and query ALEXA and she will response exactly like ECHO does. ... Its no big deal. ECHO is no big deal, specially after its almost all open sourced ....

We are both saying the same thing..
How do you think I managed to get Alexa to talk to my HA server? Through writing a Lambda function

How are all my services routed via Alexa? through a separate RPI running a translation bridge (based on a nice github project called HABridge)

What however is nice about the Dot (or the echo) is for just over the cost of a RPI, it comes with a multi-array microphone to activate the service..
And that is what makes it different from a typical hack-a-day project (that finds limited use beyond the creator ) as against a non intrusive service that everyone at home uses

Yep they are called GE Wifi Connect appliance, but I wonder how much in India all this would be possible
Pretty much all of it is - Direct connectivity to power switches can be realized via Wemo switches
If you are feeling more adventurous, via cheap wifi switches that sell as Sonoff on ebay India (and flashing a firmware called EasyESP on the chip inside)
If you are feeling even more adventurous, via creating your own for super-cheap with a ESP8266 board (<300 INR), a 5V relay board (150 odd) and a 5V power supply

PS: Not sure if you saw the video I posted in the automation thread - the garden lamp that comes on in the end via an Alexa command was built from scratch with BOM of <500 Rs
 
Last edited:
What however is nice about the Dot (or the echo) is for just over the cost of a RPI, it comes with a multi-array microphone to activate the service..
And that is what makes it different from a typical hack-a-day project (that finds limited use beyond the creator ) as against a non intrusive service that everyone at home uses

You still not getting the point, usability is not the only aspect of all this, learning new things is also what counts, this ECHO on Rpi has taught me something new and has opened a whole new world of skill and enhancement and programming that I can get my head scratched on for next couple of weekends, (which is what I love doing), and thats how I look at it, and yes if I can (and will) use it for (whatever all Alxea is user for ) then its even more worth than one could hoped for.

Using a device you yourself programmed and create gives a far more satisfaction and self-pride than just go out purchase a device and start using it,(ofcourse with the fact, if there at all is a way to create and program that particular device) and I am proud of my Rpi doing almost 80% of what actual Alexa does. Not to forget the awsome learning I did with this, and it applies same for EVERY project I do, be it on Rpi, on HA, on HT, on HTPC on or on anything .and I make sure I, share the knowledge ....... .

Let see if codes and developers out that have been able to make it 100% if they have and there is a tut out there, I should also be able to do it.

Finaly That multi array mic you talking about, Denon mic, that comes with it , it sits in the open drawer inside with Rpi and I was still able to push a command in my normal voice from across the "other" room and Rpi was able to pick it.
 
Last edited:
Hands free Alexa voice control now possible...

https://www.raspberrypi.org/blog/hands-free-alexa-voice-service/

Definitely going to be trying a couple of projects on the Pi now.

Have already pre-ordered Google Home in Walmart.

Guess even better things for home automation now... but with hands free voice control its going to be even better for the Pi.
 
^^ Good news, it was just a matter of time waise ... :)

Google Home competition more like it... but I'm not complaining.

I actually ordered 2 new Echo's and a Google Home in addition to the Echo and Echo Dot (1st Gen) that I already have... now I'm not so sure especially with my penchant for playing with the Pi, Pi projects look more interesting.

PS: Check out Wit.ai, I've been playing with a couple of projects on it too... its FB's version of AI.
 
Used this tutorial, How to Build Your Own Amazon Echo with a Raspberry Pi, works perfect. Now I have Alexa running on the Raspberry Pi and responding to the catchphrase Alexa.

If you are running your Raspberry Pi headless, then use a Windows PC and connect via VNC server and set it up. For Alexa to be running 24x7 3 services need to be running via the terminal. I initially set this up with my Windows PC on the network and this meant when I shut down the terminal windows, the service would stop.

The simplest solution is to have them running on the Raspberry Pi so you can turn off your other network devices like PC or laptop.

Content is limited right now, not much like play music or order something online, but voice recognition is spot on (even with my crappy microphone) and Alexa has an answer for pretty much everything.
 
Hi..I got an echo for the cheap during the prime day sale in US. As of now havent tinkered much of the settings and hence when I ask it where I am ..it says I dont know - may be i need to do some changes on my fire tablet..will do so over the weekend.

(a) tried asking it questions like google now/assistant and most GK questions it does answer

(b) Yesterday my kid tried some IFTTT stuff like send me an email or sending a notification to my mobile when we say the key words and it works

(c) Yesterday I saw a video on how to control Kodi on desktop using Alexa and nothing else - its a 25 min video - hence might take couple of hours in real life - if it works will post the video over the weekend.

The question I have now is about Anymote. I have seen a guy use the IR blaster on his phone via anymote and alexa to control his settop box. He is not from India - I did install anymote and as expected tata sky doesnt appear in the list.

I have a Mi Max - given I got a phone with IR blaster, the anymote app and an echodot - any idea if we can get this to work in India as well?

Sammy has been using Sonoff to control his TV and lights - I lost the link to the video - but saw various other videos on sonoff and got confused - but I did order three sonoffs from banggood as they were just 300 rupees each and also the Yeelight Smart LED bulb - this might take a month to get delivered - hence till then trying to do things for free using echo dot + things we normally find at home.

Apart from the anymote question above - do let me know if i can do any other smart thing with echo dot for free?

Have seen lots of IFTTT videos also - just that after watching some 30 videos on sonoff, alexa, ifttt...etc my brains totally lost it:mad:

My minimum goal right now is to switch TV on and off and change channels on tata sky for free
 
Last edited:
Get the Wharfedale EVO 4.2 3-Way Standmount Speakers at a Special Offer Price.
Back
Top