I’ve just been up to Northern Spain with a friend and our wives looking at some property up there and when we got to our hotel and got the wine open, Aidan showed me his new toy – Amazon Echo.
The Echo Moment
Well, I was so excited I’ve ordered the new Dot which should turn up next week – after all my failed experiments with Google Now and Microsoft’s Cortana trying to fire text at Node-Red so I could control things, this might just do the job – but that is something for next week.
Of course – you could always hang around and wait for the forthcoming fluffy version called FABRIQ – which appears to be rechargeable – but no mention of microphone arrays so you take pot luck on how good the audio capture is. You could even take the kit route with Seeed’s ReSpeaker – but by the time you add up the cost of ReSpeaker and the microphone array… well, I’m wondering if they’ve lost the plot. They sent me a ReSpeaker to play with minus the microphones – I nearly choked when I saw the additional cost. If you have an Amazon account you can play with Alexa here.
I’ve not had a lot of luck with the Raspberry Pi versions, one only works in the USA, others are out of date and require button presses… anyway I’ve ordered a USA mic any my DOT turns up next week so maybe in a couple of weeks this will start to fly at this end.
We came back to the cave on Friday and yesterday my friend Jonathan rang me up full of new stuff he’s been playing with.
Glasswire and Divvy
So first things first – for Windows enthusiasts – check out GLASSWIRE. I have it sitting here making pretty graphs of my network – I’m not saying it is any good – I’m saying it is extremely pretty and possibly deserves a corner of your desktop. Something else you might like to play with is DIVVY from MIZAGE. I’ll leave you to look those up. I found them interesting.
Meanwhile as some of you know I’ve been experimenting with Armbian on my little Nanopi NEO. Lovely operating system and I managed to get my script working on it no problem – but for one thing – WIFI – the NEO doesn’t have WIFI and so you have to stick one of those cheap Chinese WIFI dongles in – and on most of the SBC boards I’ve tried – no problem. However after jumping through some hoops to get the WIFI working on this little Neo board – I was very disappointed – WIFI performance was so poor you could see delays when doing the likes of apt-get update etc. I wrote off to the Armbian forum and the response was along the lines of “you should try an Orange Pi Lite if you want WIFI” – well that’s all very nice but I already have two NEOs.
Well, I was sitting getting depressed about this when my friend Jonathan rang me up with some new things to try.
WinDiskManager and Etcher
So first things first – you know that Win32DiskImager that everyone uses to FLASH Linux SDs – he’s spotted something not only a little faster but a little nicer looking called Etcher – so the first useful takeaway from this blog entry is Etcher. I installed it on my Windows 10 64-bit system no problem – none of your “administrator-only” stuff – and Etcher works – point it to an image file – and it flashes it to SD!! Mind you that’s ALL it does. If you need to READ images onto your PC you still need Win32DiskManager.
The DietPi Moment
He then reminded me that before I was playing with Armbian I’d had a go at DietPi for the Raspberry Pi. It only worked on the Pi itself – it was a nice, lean installation of Debian – but hey – the normal Pi setup was fine – so I put Diet-Pi to one side.
WELL – take a look at DietPi today – it is no longer for the Pi only – and it can install lots of goodies – kind of complimentary to my script (with a nicer interface). And in the process of this conversation I noted it has a setup for the NEO and other FriendlyArm boards.
Well, wouldn’t you know it – there’s a menu driven setup for WIFI – and it WORKS!!! And the funny thing is – the designer credits Armbian – WELL!! Ok, so there’s a LOT more to this and I’m only at the beginning – I noted that this Diet-Pi on the NEO seems to run even faster than the hardwired version on Armbian – and I’m only at the surface of finding out why – but one reason it seems nippy is you have full control over logging – which by default is running in RAM and at a minimal – a very sensible starting point.
In the process of setting things up I discovered some sillies in my script (which takes a basic Debian setup and installs a while raft of useful goodies centred around Node-Red) and I’ve fixed those.
I have now run my updated script on DietPi on the NEO and M2 and up to now everything seems to work – and it’s a small installation for a small board – and nippy… I need to go way more deeply into this – there is SO much in Diet-Pi now but I’ve no idea how much of it actually works – I DO know that not everything works on all boards but as I’ve only installed this on the FriendlyArm M2 and NEO I’ll keep my mouth shut except to say I’m mildly enthusiastic – my little NEOs are now useful wireless devices – which is a great step forward.
Experiments above with Node-Red, MQTT and serial – all working. And below – with a simple mod – a nice colour terminal… all on my NEO soon to be replicated on M2 and T2.
Now there DO seem to be some issues with DietPi – I’ve reported them – on a real Pi the serial port needs permissions altering to work (added to script just for belt and braces) – and on all installations, Mosquitto fails to run at power up – MAYBE starting too early I don’t know but taking a line out of the RESTART bit of the start-up script and putting it in /etc/rc.local does the job.
Up to now everything seems ok and I’m working with MrShark to looking toward the lightweight LIGHTTPD.. we’ve already improved my script – and you know how it goes – once someone triggers you off…
More of that soon – for now – I have my script (as of today) running (with the caveats above) on a Pi2, M2, NEO and BananaPiM2 – and that’s only due to restricted time… DietPi has the advantage of making a MUCH smaller footprint at under 2GB compared to nearly twice that on, say a standard Pi – as there is only in there what’s needed.
Oh while I think on, here’s the link to my original Neo article.
Expect to hear more about this in the coming week – I’m off now travelling with my wife and 3 cats ALL the way up Spain – 24 hour ferry – ALL the way up England… you won’t hear anything from me in here as I’ve not mastered blogging on a phone
.By now Aidan has his Alexa turning his lights on and off via Node-Red and so that will be the next job – integrating this whole lot together.
PiBakery is an easy way to configure a Pi:
http://www.pibakery.org/index.html
Interesting but assumes the normal Raspbian – so not al ot of use for other SBCs of which there are many. I’m endeavouring to make my script work on a lot of these. In particular I’m interested in the little NEO and a new WIFI version of that – these cost well under half of a Pi and hence might be useful in control situations. Still – I’m also a sucker for learning something new – so while we’re having this conversation I’m downloading Pi Bakery. My machine goes off soon however as we start our journey to the UK tomorrow.
How much work is it to adapt it to DietPI?
Have a safe trip back to UK!
on dietpi a lot can be done from the dietpi.txt file, before even starting up a device… take a look at that… 🙂
Ok, so I installed it – and some of the options look good – but installing packages…. would appear to work for simple packages that work with APT-GET etc??? I did not see any pre-defined packages.. if you look at my script – there are several packages, several changes and additions etc…. I might be missing something? Ton of predefined packages and fixes our there I’m not seeing????
More changes to the script incidentally, working with Bob I realised my keywords were just silly (the whole bash script thing has been a massive learning thing for me). A lot better now… soon I’ll have fixes built in for DIETPI variation… but I’m out of time – first thing in the morning we’re off on our travels.
Pete.
Etcher was developed by the guys behind resin.io, a really nice solution based on Docker to ease deployment and management of SBCs like the Pi.
if you have already RPI3 you can use it as alexa
https://github.com/alexa/alexa-avs-sample-app/wiki/Raspberry-Pi
Hi – not quite – I’ve seen this – and though I only looked at it very briefly – this thing about having 3 terminals open and running in sequence etc? I want a solution that installs, asks for Alexa info and then just runs in the background including recovering from power failure – anything less is just experimenting.. Also – though I DO intend to build one of these solutions (I’ve built one but it is currently ignoring everything I say to it) but even then – with one microphone you are looking at sitting at a desk… the microphone array in the likes of the dot let you speak from anywhere in the room – indeed my friend has the full blown unit and you can talk to it via Skype THEN across the room.
snowboy branch of AlexaPi from maso27 is simpler (python instead of java) and more suitable for headless install and auto restart. 😉
https://github.com/maso27/AlexaPi/tree/snowboy
Even better AlexaPi (the new & awesome version) from all the developers united from https://github.com/alexa-pi/AlexaPi coupled with IFTTT (if Alexa then Adafruit)
https://ifttt.com/recipes/459774-alexa-adafruit-light-on
https://ifttt.com/recipes/459773-alexa-adafruit-light-off
https://ifttt.com/recipes/459772-alexa-adafruit-light-blinking
Be aware that at this time IFTTT will only work with US registered Echo devices and no date has been given for that to be changed
Marvelous – seems America has a real problem considering the rest of the world these days. Lovely.
But does this solution really need IFTTT? All I’m interested in is getting the words into Node-Red?
I dont use it because I can get what I need from the Ha-bridge utility.
I live in Turkey and I managed to change a topic in adafruit.io mqtt with my AlexaPi, wasn’t connected to a device like esp8266 but i call this a success for now. :}
I have tested this feature and it worked.
Note I am in South Africa
https://ifttt.com/recipes/480325-alexa-to-adafruit
Excellent – well, this morning I’ve successfully transferred my SSL to a brand spanking new Pi installation – and am about to start the process of moving my other (considerable) house control stuff onto the new machine (already backed up) – the way we have done this makes it so easy to add new commands without any third party software and without messing around on the Amazon site – very exciting times…
Hi Pete,
I’ve been using this …
https://github.com/biddster/node-red-contrib-wemo-emulator
for a while with Alexa, and it has worked really well. Ok it just does on/off but it has transformed the way we turn devices on and off.
I’m looking forward to your progress with this as being able to ask Alexa the status of things will be cool.
It should also be noted that coming soon you will be able to poke Alexa and have her say things.
Regards
Paul
I think Aidan started with that version – simple on-off – but really what’s needed is something that fires the instructions decoded into Node-Red and let that control everything – we’re working on that…. but I’m travelling this week and Aidan is in France so not a lot will happen until next week.
Well well well.
I did integrated ESP base hardware a few weeks before with Amazon Echo. You may watch video. The video is in Urdu but it comes with English subtitle. I hope you will enjoy. https://www.youtube.com/watch?v=9hSr5h_Ly7Y
BTW, Your blog is awesome and your work really inspire me. Happy coding.
Thanks for that – my DOT turns up at this weekend coming – I’m determined to learn enough before then to get it up and running almost immediately. So many things to control.
Pity Amazon Echo is “restricted” to english only and no plans to include shortly other idioms; I would have bought already 2 or 3 of them if I only they would have an “Alexa” type engine about language support…
I have 3 echos at home talking to Node Red on my home server and also to IBM Bluemix servers. I use Node Red to bridge alexa to my home automation – I can say “alexa, ask the heating for a status” and my node red interrogates Hive and replies … The same for hot water etc.
My most used one is “alexa, tell the house that I’m going to bed” – she replies “I will turn off the lights in 5 minutes. Sweet dreams!”.
I have also found a way to take all the speech (text) after the wake words and pass this to node red. You can therefore have a conversation or do a complete translation of the text.
I will document this soon.
I think that would be much appreciated Tony – my DOT turns up in a week – would be great to find instructions to tie it up to Node-Red…..
Pete.
https://github.com/sammachin/AlexaPi
https://www.hackster.io/fileark/alexapi-mqtt-smart-hub-984dcf
😉
Well done!! I’m assuming someone by now has the voice activation going – most of these projects appear before Amazon allowed “Hey Alexa” activation….
Anyone actually built one of these Pi versions of Alexa up?
and maybe this guy, too:
https://www.youtube.com/user/filear/videos
Maybe not the second.
I followed his CORTANA item perfectly – there is no way on EARTH I could get Cortana to redirect to the PLEASE program (I even downloaded Visual Studio to compile the code) – maybe at one time it would but not now, not on Windows 10 64 bit… utterly ignored it and went off to the web looking for “please”
the guy in first video forked the work of the one in my first comment, adding hotword detection, and as you see, it interrogates alexa by simply calling “it”