Well I just started today exploiting this Alexa node (so I gues 5.0.7 is the latest Apfelstrudel ) but I cannot get any spoke Alexa command in NR (using the example flow above from @dynamicdave ).
I am using my iPad with the Alexa App as input device. I dont have any Echo devices yet, still in the testing phase.
My amazon.de accout is fine and "ready to use" as indicated in the node "Alexa Routine"
Actually a real guide or documentation would be really helpful.. I only find examples here and there and mostly about Text to Speech but not Speech-to-NodeRed-Actions ...
What have you tried so far??
Can you post your NR flow??
Here's part of my front-end flow that listens for 'device activity'.
The upper blue node is alexa-remote-init, the lower one is alexa-remote-event.
The top function node captures the 'Alexa device name' so I can send the response back to the source.
So far I setup the connection to my Alexa Account and tried your example flow from start of the thread. I am running on my local network on a Raspberry 3.
I wonder whether I need to open any ports on my firewall??
Actually I just added the init-node which I forgot in my 1.attempt. Its state is "success" returning loginCookie and other session info. However it does not improve anything.
So if network and firewall is not an issue it might be due to my iPad which might not accepted as voice input device? The iPad shows up in the device list though...
I do not have an iPad so cannot comment on that - I use various Alexa devices that work fine.
My grandchildren will be visiting me at the weekend, I'll ask them to bring their iPads so I can check it out.
You may get a response from someone on the forum who has this sort of setup.
JFI I've asked for this thread to be split into its own one as its about setting up Alexa listening from scratch and not the ongoing issues we have from time to time with the remote2 node(s)
The piece of Javascript I listed above was an example of what is in the 'Capture question' function node.
If you want to use it, you'll need to copy-n-paste it in to a function node. It is NOT in json format and was NOT intended to be imported like you are trying to do.
Here's the contents of the function node in jason format, which you should be able to import.
Ok, I think misread the operating of the function and I try to explain my problem .....
I have one light and with the node alexa event (listening) and a function in node-red if I say "alexa, turn-on the room light", the function in NR turn-on the light .......
But "alexa" don't have a device "room light", so, the light is on but alexa say "sorry, I don't have one device called room light".
Well, I trying to find a way to remove the alexa's answer ....
Thanks a lot for your hints. Meanwhile I tested the node using my Amazon Firestick instead of the iPad - and now it works!
Apparently Amazon does not forward all voice devices to NodeRed...
Ok after this sorted out the fun begins...
Yep, the "Blueprint" macros are a good start to define a few easy commands. Of course you need to define all possible command variations:
switch on kitchen light - swich on the kitchen light - switch light in kitchen.....
Maybe I forward the text output to some Python script with some more clever text decoding and feed that back into NR...
Thanks again! Have fun!
Just to complete: after re-installing my iPad "device" on the Amazon user page NR now accepts voice commands. Apparently I had the wrong device "class" defined for the iPad.