# Alexa Voice Command to start the flow?

**URL:** <https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606>\
**Category:** General\
**Created:** [17 September 2019 04:23 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606 "2019-09-17T04:23:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![burn](https://avatars.discourse-cdn.com/v4/letter/b/f0a364/32.png) [@burn](https://discourse.nodered.org/u/burn)\
**Post date:** [17 September 2019 04:23 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/1 "2019-09-17T04:23:35Z")

</div>

Hello,

I found ways to get stuff to turn on lights or turn them off based on door sensor state.

I finally integrated my harmony and Alexa into the node - red. However, I do not know how to take advantage of it. For example, currently in my harmony hub, I have created an activity for movie watching. I also want the lights to turn off, and very specific commands sent to my AVR receiver (turn off dynamic volume and turn on dynamic EQ). So, I want all of this to start with a simple command like "Alexa, start movie night". How do I do this?

 ![explorer_2019-09-16_21-18-36](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/442c793d0399931e481fc689e8b0abe39603c02b.png)

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [17 September 2019 05:56 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/2 "2019-09-17T05:56:16Z")

</div>

I don't think Alexa would understand that command.

I think you could use... "Alexa, turn ON movie night" or "Alexa, turn movie night ON" - then use one of the Alexa nodes to process the received command-string.

---

<div class="post-metadata">

**Author:** ![burn](https://avatars.discourse-cdn.com/v4/letter/b/f0a364/32.png) [@burn](https://discourse.nodered.org/u/burn)\
**Post date:** [17 September 2019 09:27 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/3 "2019-09-17T09:27:49Z")

</div>

Would you by any chance know which Alexa node I can use to process the received command string?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [17 September 2019 09:44 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/4 "2019-09-17T09:44:39Z")

</div>

I use node-red-contrib-alexa-home-skill as that's the only one I've found that works for my particular Echo version

Its convoluted to setup (as all the alexa stuff is in different ways) but it works for me

Requires setting up account on 3rd party site

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [17 September 2019 10:21 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/5 "2019-09-17T10:21:05Z")

</div>

I've used nearly all of them include the offering Simon mentioned.

I'm currently using this node...

> **[node-red-contrib-amazon-echo](https://flows.nodered.org/node/node-red-contrib-amazon-echo)**
>
> Alexa controlled Node-Red nodes supporting latest Amazon Echo devices

On my Echo Dot I had to run the following as I didn't want to start Node-RED as root.  
It routes port 8980 to port 80.  
You need to enter 8980 as the port number in the amazon-alexa-hub

You need to run these commands on your Pi if your using a WiFi connection.

sudo apt-get install iptables-persistent  
sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT  
sudo iptables -A PREROUTING -t nat -i wlan0 -p tcp --dport 80 -j REDIRECT --to-port 8980  
sudo netfilter-persistent save  
sudo netfilter-persistent reload

Or these commands if you're using Ethernet CAT cable

sudo apt-get install iptables-persistent  
sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT  
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8980  
sudo netfilter-persistent save  
sudo netfilter-persistent reload

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [17 September 2019 13:04 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/6 "2019-09-17T13:04:54Z")

</div>

I've just given this a go on my Win 10 machine  
Equivalent command to port forward (running in cmd Admin window) is

```auto
netsh interface portproxy add v4tov4 listenport=80 listenaddress=192.168.0.23 connectport=8980 connectaddress=192.168.0.23

```

where ....23 is IP of your machine

It "works" but the issue I'm having is that no messages are coming out from the device nodes - just the master Amazon Echo Hub one

These messages don't identify which device is receiving them so its not of practical use ☹

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [17 September 2019 13:14 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/7 "2019-09-17T13:14:59Z")

</div>

Hi Simon,  
On my set-up the msg.topic holds the name of the node that produced the message.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [17 September 2019 13:22 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/8 "2019-09-17T13:22:11Z")

</div>

Not on mine ☹

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/7c1a5ff3a2b46e7651eb8ca32ff61df58e7e59e1.png)

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [17 September 2019 13:27 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/9 "2019-09-17T13:27:35Z")

</div>

Sorted - PEBKAC - I hadn't connected the Hub to the device nodes  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/235c46441025c070b816e5e5fab594bc028d6c99.png)

The other one I've been using does it a different way!

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [17 September 2019 16:22 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/10 "2019-09-17T16:22:12Z")

</div>

Glad you got it working.

PS:  
I think there is a problem with some of the other Node-RED Alexa nodes since Amazon did an update!!!

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [17 September 2019 16:53 UTC](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/11 "2019-09-17T16:53:02Z")

</div>

Are your lights paired directly to your echo, or is the echo controlling something like a hue hub?
