# NodeRed and Alexa for dialogues

**URL:** <https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363>\
**Category:** General\
**Tags:** node-red-contrib-alexa-remote2-applestrudel, alexa\
**Created:** [20 April 2024 11:20 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363 "2024-04-20T11:20:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gnomi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gnomi/32/67756_2.png) [@Gnomi](https://discourse.nodered.org/u/Gnomi)\
**Post date:** [20 April 2024 11:20 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363/1 "2024-04-20T11:20:39Z")

</div>

Hi,  
I am using node-red-contrib-alexa-remote2-applestrudel to play announcements or prompts for different automatic or via my alexa skill requested information from the home environment, mainly from Homematic.  
I now want to add a dialogue with Alexa. So Alexa should ask me something and depending on the result, I want to start a specific task.  
e.g.: on a special event Alexa should ask me: "should I close the Jalousie on the Terrace?" I want to answer "yes", "no" or if something else was said ask again.  
I found ideas with -Home Assistant-, but I only want to use NodeRed with my given Home automization (Homematic) and Alexa via direct interfaces.

**A) Do somebody knows a solution or give me a link, how to solve this NodeRed/Alexa interworking?**

**B) I also found no good explanation, how node-red-contrib-alexa-remote2-applestrudel "Alexa Events" can work with the correct Alexa developer environment setup?** Any idea?

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [21 April 2024 18:55 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363/2 "2024-04-21T18:55:27Z")

</div>

If you are already using node-red-contrib-alexa-remote2-applestrudel to play announcements then you already know how to trigger the message "should I close the Jalousie on the Terrace?"

What you need to do is add an event node set to "device Activity", this will output a message with a property msg.payload.description.summary containing anything you have said to Alexa.

So after triggering your announcement, use this output to check for the word yes or no.

A switch node can do this, if you have the 3rd option in the switch node set to otherwise, then this output could trigger the announcement to play again.

**NOTE the event node is notoriously unreliable !**

---

<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:** [21 April 2024 20:33 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363/3 "2024-04-21T20:33:20Z")

</div>

I don't think what you've suggested is actually possible  
AFAIK, Alexa will not respond to someone saying yes or no after making it speak a phrase

Even saying "Alexa yes" will illicit a response from Alexa "Sorry I don't know that"

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [21 April 2024 23:37 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363/4 "2024-04-21T23:37:42Z")

</div>

It's possible and the logic will still work, You do need to say "Alexa Yes" but I agree that message could be irritating.

I just did quick test to see if a stop command would work to prevent the "Sorry I don't know that" message, but the event node is too slow I think.

In which case the best bet is to just create routines in the Alexa app for the commands you want to use.

---

<div class="post-metadata">

**Author:** ![Gnomi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gnomi/32/67756_2.png) [@Gnomi](https://discourse.nodered.org/u/Gnomi)\
**Post date:** [22 April 2024 07:21 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363/5 "2024-04-22T07:21:01Z")

</div>

Thank you @Sean-McG and @cymplecy for your feedback.  
I used the event node and NodeRed is showing the status "litening".  
In the Alexa Developer console I used in the skill an "Intend" and used the switch intent confirm. Now Alexa is asking with the entered question in the skill. But I only get "CONFIRMED" or "DENIED" in msg.payload.request.intent.confirmationStatus. With a wrong phrase also "CONFIRMED" and this also via the POST-HTTP message and not an event. So not really helpful.  
I found some information with a home assistant implementation. But I do not want to use a solution without home assistant.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [26 April 2024 13:22 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363/6 "2024-04-26T13:22:44Z")

</div>

I don't use HA so cannot help with that side of things.  
If there is a method in HA then I would suggest to use that, as I mentioned the activity node is very unreliable, and not really suited to creating a two way conversation.

---

<div class="post-metadata">

**Author:** ![Gnomi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gnomi/32/67756_2.png) [@Gnomi](https://discourse.nodered.org/u/Gnomi)\
**Post date:** [26 April 2024 17:20 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363/7 "2024-04-26T17:20:29Z")

</div>

Thank you @Sean-McG ,  
I also do not want to use HA.  
And your hint with the event is understood, but currently I do not receive any events. So I have to analyse this. Maybe a configuration event on the Alexa clouds side.  
I still hope, that anyone can give a hint for NodeRed and Alexa question and answer Dialogs.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [27 April 2024 04:40 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363/8 "2024-04-27T04:40:40Z")

</div>

> [@Gnomi](#):
>
> Alexa Developer console I used in the skill an "Intend" and used the switch intent confirm.

Can you explain what you mean here, e.g. what skill etc ?

---

<div class="post-metadata">

**Author:** ![Gnomi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gnomi/32/67756_2.png) [@Gnomi](https://discourse.nodered.org/u/Gnomi)\
**Post date:** [28 April 2024 08:15 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363/9 "2024-04-28T08:15:08Z")

</div>

> [@Sean-McG](#):
>
> Can you explain what you mean here, e.g. what skill etc ?

In the Alexa Developer Console I created a custom skill to ask the home automatization with different Intents about a lot of different status information. "what is the temperture of....?", "Who is at home?" ... Alexa is delivering the result triggered by an NodeRed TTS.

Then one Intend for a planned question was planned started by e.g. "I want to leave the house"  
Alexa shoud ask: "should I switch off the light in the floor?" I answer "yes" or "no"  
or also othe questions should be possible: "give me the temperature" and Alexa should ask me: "For which room?" and I can answer with a room.

In the graphic you can see my attempt with "Intent Confirmation" switched on and a question, Alexa asks. But here no event comes or an reply with my spoken word.  
As I said, I think I have an configuration issue, because I still have not understood the Alexa Iinterface.

 ![Intend_conf](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/e/ce48e59d68a30b2fb1deaf7850798575698a53eb.jpeg)

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [28 April 2024 12:48 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363/10 "2024-04-28T12:48:01Z")

</div>

Looks interesting but this is not something I have any experience with, so cannot really help I'm afraid.

Have you looked at this ?

> **[Amazon Alexa Custom Skill](https://www.home-assistant.io/integrations/alexa.intent/#create-your-amazon-alexa-custom-skill)**
>
> Instructions on how to build your Alexa/Amazon Echo custom commands to connect with Home Assistant.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 July 2024 12:48 UTC](https://discourse.nodered.org/t/nodered-and-alexa-for-dialogues/87363/11 "2024-07-27T12:48:39Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
