To give this set of nodes their full title, the offering is known as node-red-contrib-alexa-remote2 and has VERY recently been updated. For those of us who’ve been struggling controlling our home devices with various custom packages recently, the best option over the past few weeks seems to be node-red-contrib-amazon-echo - it works well – I’ve blogged about it and so have others, but it always helps to check out alternatives.
And along comes THIS – read the link I just gave you. I’m still struggling figuring out what exactly to do with is – here’s where I’m up to – everything seems to work – as in – I’m not getting errors. Read this blog to avoid the timewasting I did this morning. If you;’re ahead of me, please DO comment or email and let’s make this blog entry an informative took instead of a puzzle.
Ok, so, prerequisites, you should have a device/gadget running a recent Node-Red, let’s say a Raspberry Pi 2 or 3 or 4. You should have an Amazon Alexa device – I have a DOT version 3.
You might want to turn things on and off as a starter… I do that all the time but I’ve not gotten that far with node-red-contrib-amazon-remote2.
Using the Node-Red”Manage Palette” command (top right) install node-red-contrib-alexa-remote2.
Done. Now you have to configure it. That info is here: https://flows.nodered.org/node/node-red-contrib-alexa-remote2.
As the gave me trouble for a few minutes – I’ll give you an EXACT example. Drag an “Alexa Routine” onto a nice new test flow (page) in Node-Red. In the right side of the “Alexa Routine” node’s “account” field, create a new account… that is a brand new setup, the only thing that will be real here is your Amazon account – more on that soon. I’m assuming you have an Amazon account for your Echo and have already played with devices. maybe real ones?
So, in this “account” dialog box, is a field for an optional name – I didn’t give it a name. Next is a dropdown box called “Account”. I created a new “account” called “test2”. In there is an “auth method” and I left that at the default “proxy”. Then there is a field for “This IP”. It defaults to localhost which would be fine if your PI had a browser, mine doesn’t. I changed that to “192.168.1.19” – the local address of my PI. Next is “Port” – which defaults to port 3456. I chose (at random) 3457. I left the “file path” blank as it is optional. “Auto init” and “Events” I left alone.
“Service host” I set to the UK-recommendation “alexa.amazon.co.uk” and “Page” to the UK recommendation “amazon.co.uk”. I set the “language” field to the UK-recommendation “en-UK”. I left the optional “User agent” blank.
I closed that lot and I noted something about putting the IP number and port into a browser – it didn’t say WHERE (i.e. on the Pi or a PC etc) so this is where I save you time maybe? My PI has no screen attached. Above, I put in the internal IP address of the PI was working on… so now, in my PC, in my CHROME Browser I could enter “192.168.1.19:3457” – Bingo.
On my PC in the browser, using the above link, I entered my real Amazon account and password and this dialog closed leaving a page in the browser saying this:
I went back to Node-Red and back in “Edit Alexa Routine Node” dialog with my “test2” account, I entered the recommended text “Hello world”… and in devices, I selected my existing real DOT called “office dot”.
And that is where I am up to – totally LOST. No errors – the nodes say “ready” as you can see.
I picked the “echo forward node for no good reason – as I was looking for a “devices” node to create a new dummy device who’s output I could connect to a REAL device to turn it on – i.e. one of my ESP8266 boards I control by MQTT protocol. No such luck.
I was expecting some kind of node so I could create a “virtual” device called, say “fred” and turn it on and off, the output of which I could feed via, say, MQTT to some real device. I’m sure you must be able to do this – but I’m not at that point yet. Over to readers. I’m sure it is obvious?