Trouble getting started with Alexa-remote

Thanks. I'll have to try that at the weekend with my grandkids iPads.

Thanks for having the original error. I had not seen this node before. Now I am deep in an Alexa quagmire. :slight_smile:

Does anyone has an idea how to proceed from here? Ok, so we can receive Voice-to-Text message inside NR and "play" with them. As far as I understood the Alexa concept you can add IoT devices but then all your switches and lamps are configured somewhere in the Amazon-Clouds and no longer in NR?
I guess its possible to configure your very own NR Raspberry to be the destination "device" for Alexa and then configure your Raspberry as actor on voice commands directly (with NR but without any cloud service?)
I assume this requires to develop a real "Alexa skill" on a more professional level?

maybe a skill like this ? node-red-contrib-alexa-home-skill (node) - Node-RED

No, exactly not like this!
This node requires to hook up to yet another cloud service which provides the interface to Alexa. Not what I want.

Could you explain what you are hoping to do with Alexa as that would help with my response.

I've used the Q&A feature of Blueprints to get a response from Alexa that I can trap and use.
Although the Q&A feature was intended for someone to ask a question and get a known answer, you can adapt it so you can make a 'statement' and get a known response. For example, "Alexa, open garage door" or "Alexa, tell me about the garage". You can get Blueprints to return a pre-defined answer that you can use.
Prior to using Blueprints, Alexa would offer me all sorts of information about local garages, where they are located, opening times, etc. All totally irrelevant to the needs for my particular application.

A couple of months ago I dropped the remote control key-fob for my electric garage door. Although it still worked, the plastic casing was damaged. I ordered a new one and ended-up with a perfectly usable remote controller but not very practicable as the casing kept failing apart. That was the starting point for making a Voice Operated Garage Door Controller. It started-off as just a "fun" project.

The only involvement Alexa has is providing a pre-defined text response when I utter the above statements. The responses are trapped and used to trigger different parts of a Node-RED flow. I'm actually using a finite state machine (FSM) to track the state of my garage door. For example... closed, opening, open, closing, closed. Here's part of the front-end of the flow.

I fitted a couple of microswitches, one at the top and bottom of the door's travel so I can detect the position of the door. This information is sent from a Wemos D1 Mini, via MQTT, to Node-RED.

Here's part of the back-end of the flow.
Screen Shot 11-27-21 at 10.40 AM
The flow has two main outputs. One to get Alexa to "speak" a response when the door reaches the fully-open or fully-closed position. The other to send a trigger or event, via MQTT, to an ESP01s microcontroller that operates a relay. Connected to the relay contacts are two wires that I soldered onto the contacts of the button on the damaged remote key-fob. When the relay toggles it simulates someone pressing the key-fob.

As you can see from the above, the only active part that Alexa takes in this system is providing the pre-defined text response to the statements... "Alexa, open/close garage door".

Here's a photo of a printed circuit board I made for the project.

The orange box, situated to the left of the ESP01s, is the relay. The four LEDs indicate the door's status. Red=door is fully open, top yellow=door is closing, bottom yellow=door is opening, green=door is closed.

I recently extended the system so I can say... "Alexa, tell me about the garage" and she responds by telling me if the door is open/closed, locked/unlocked and what the temperature and humidity is in the garage.

Hope this helps.

1 Like

Nice hardware and a good setup which is perfect for simple "binary" decisions: lamp on/off, door open/closed etc.

But maybe its possible to go further?

  • Alexa! Lock the door when nobody is home
  • Alexa! Switch on the light after 17:00

I have no clue how this might work with a system like NR but with more advanced Alexa skills and some fiddeling in NR this might be interesting... but I guess this goes off-topic and might be discussed in another thread...

I would be careful with controlling locks!

Open the Pod Bay doors HAL



Best way to do that would be some sensors outside of Alexa.
For example, just off the top of my head, could have a Node-RED flow that pings my wife's and my mobile phone. If it response is not forthcoming (after so many attempts) then lock the door. At the moment as soon as I park my car on the drive it connects to my home WiFi, so I suppose I could check if its IP address has been 'seen' and then my system would know if I'm home or away.

Likewise, why not switch on certain lights automatically at a certain time (no need for Alexa to get involved).
I have a home lighting system that switches on my external security lights (using BigTimer) at dusk and turns them off at 22:00hrs. BigTimer uses my GPS coordinates to work out when dusk occurs each day.

EDIT: Also agree that it might be sensible to continue this thread under another topic-heading.

1 Like

The basic issue is that Alexa will try and interpret anything you say after the word Alexa is heard.
If you search the forum for "simon says" you'll find my "solution" too avoiding this.

Of course, it helps that I'm called Simon.

But, using this method, you can parse the text to do anything you want

That's why Blueprints works quite well as it matches to what you say after the word.. "Alexa".
If Alexa doesn't find a match then you get all the spurious details she can find.
I've had a good level of success getting a response from a number of statements.
You just need to spend a bit of effort sorting out the right set of words so they don't get confused.

Here are some of the Q&A statements I've created in Blueprints.
"Alexa, tell me about the garage"
"Alexa, tell me about the kitchen"
"Alexa, give me a temperature report"
"Alexa, give me a weather station report"
"Alexa, give me a status report"
"Alexa. give me an energy report"
"Alexa, open/close the garage door"
"Alexa, turn Telegram on/off"

As you can see, some of the responses to these questions query a database and formats a verbal response for Alexa to "speak".



No writing of skills - just a standard NR switch to look for "pause, paws or pores" :slight_smile:

Like I say - it's great if your called Simon :slight_smile:

You do have to do your own parsing of course but it keeps everything within NR.

I did used to use Blueprints but I found that sometimes Alexa would prefer to interpret words like play and pause for it's own purpose even if you had a Blueprint to deal with a phrase.

Recently I've come up with a new method (just playing with it at moment) for those not called Simon :slight_smile:

"Alexa, stop do something useful I want you to do stop"

The first stop means Alexa will not interpret the rest of the phrase but it still gets captured by remote2

Then you can extract text between the 2 stops

Doesn't work if your playing music at the time :frowning:

1 Like

Just for info
You can use other names to replace simon in simon says. Not all work but most common names do.



But in a quick test

"Alexa, John says jump"

then Alexa says "jump"

but if I say
"Alexa, John says what is the weather"

then Alexa gives me the weather

"Alexa, Simon says what is the weather" and it just says "what is the weather"

So still need "Simon says" if you want Alexa to ignore the words

PS The advantage of the "alexa, stop do something stop" approach is that alexa doesn't respond at all so that saves having to listen to it repeating the simon says phrase back

With Simon says, I have to wait till its finished speak the phrase back at me before responding but with the stop stop approach you can give a custom response straight away