Pure fun with Alexa and Alexa Skills

Now the authentication problem with various Alexa nodes has been sorted I thought I'd try something new.
I used BluePrints to create a Q&A skill called 'Give me a status report' then linked that in the flow below.
I've arranged for various devices around my home to report their status to a database that is accessed from the flow and sent to the appropriate Alexa device. Here's an example of capturing feedback from Sonoff-S20 switches and writing the status to a dB.

Screen Shot 06-08-21 at 04.29 PM

The whole thing turned out easier than I thought it would - and works really well.
So now I can say... "Alexa... give me a status report" and guess what she says???

3 Likes

"playing Status Quo"

1 Like

A "6 Echo" houshold. Respect! :slight_smile:

OMG - this is so much fun.
I've expanded my flow so I can hear a report for my home, my infrared sensors or my weather stations.
When I have some spare time I'll write a tutorial on this for my IoT students.
Also made the flow more modular - so hopefully it's easier to understand.

6 Likes

If you preserve the msg.name parameter for device activity then it will automatically respond to the requesting device. In my case I have multiple node-red controllers in my motorhome, so I use MQTT and let the appropriate node-red controller act on the request.

I would really like to see a chat skill where node-red could prompt via Alex for information.

Another quick update and an idea...
I've added a function node to check the core temperature of my Raspberry Pi and if it above a certain value send an alarm message to my Alexa-Speak flow. Works really well.


As I have a cluster of four RPi-4Bs and four RPi-3Bs running 24 * 7, my next idea is for each Pi-server to send a MQTT message to my main server if their CPU temp goes above 'x' degrees.

Like... MQTT topic is... alexaspeak/xxxx/yyyy
Where xxxx is the RPi reference number of the device that is getting "hot".
And yyyy is the name of the alexa device to broadcast the alarm, or the word ALL (for all alexa devices).
Payload is the CPU temperature.

This means I could just have a MQTT-In node on my Alexa-Speak flow that collects any alarms and sends them to my Alexa devices.

1 Like

A further update on the idea I posted this morning.
I've simplified the MQTT topic to just... "alexaspeak" and put all the details in a json string in the payload.

Here's a screen-shot of the flow that goes in each RPi server to monitor the core's temperature.

Here's what the contents of the function node 'Format JSON string' looks like.
Screen Shot 06-17-21 at 05.56 PM

Here's the tiny flow that goes in my Alexa-Speak flow.
Screen Shot 06-17-21 at 04.53 PM

Here's what the contents of the function node 'System Alarm' looks like.

1 Like

Hi @dynamicdave,
You mentioned auth problem has been sorted, I am still having problems with the routine speak node as most of the time I have to reinitialise. The funny thing is that it works evey time for the alexa smarthome node with no problems apart from the speak node.
I am using node-red-contrib-alexa-remote2-v2. As you know there are so many forks and variants of alexa-remotes out there now that is getting confusing as which is the best one to use and works with the speak routine. It would be good if someone can definitively clarify this.
btw, what alexa node are you using?
Thanks,
Ken