Node-Red Flow Samples/Sharing

This is awesome @stephen_nutt, many thanks for posting!!
This means if I remove all devices in Alexa, I no longer need to mess around with any of them in that bloody Alexa app. It doesn't alter my Alexa routines at all, and my NR is still configured, amazing :smiley: Thanks!!

Not only this, I can now open and close the curtains etc in any room :wink:

1 Like

This is a built-in feature with Alexa devices since at least 2017. Assign the lights and the echo device to the same room and when you ask Alexa to turn on the lights it will do it based on the Alexa you are speaking to.

While your flow will work, it still depends on the node having an up to date cookie so I'd estimate that it is only 95% reliable whereas the built-in one would be 100%.

1 Like

I know but you must group all of the lights in that room and can only say "Turn on/off Lights". I don't want to say it that way. My way doesn't require grouping and I can use the same phrase in any room and Alexa knows which room I am in and turns on/off appropriate lights. Also, my way let's me have one phrase "Its hot in here" that will turn on fan in the room of the Alexa that I am speaking.

1 Like

You will still have to create "dummy" Alexa routines for each phrase you want to use that don't do anything but wait for 5 seconds. Otherwise, Alexa will search the internet to try to find out how to process what you said. However, if you don't mind her saying something like "I don't know how to help you with that" or similar every time, you don't.

1 Like

Yeah, but I'll never have to change them again, even if I remove devices :+1:

I never would have thought of that. That's whats great about this forum Someone posts something they are doing different and it inspires others to take it to a whole new level. Good luck!

4 Likes

In fact, this is almost a way to not have your devices in Alexa in the first place :smiley:

2 Likes

You are probably right. And you could say "Turn on ceiling fan" in your bedroom or kids room and it would just turn on instead of having to remember to say "Turn on Master Fan" when in master bedroom and "Turn on Little Johnnie's Ceiling Fan" when in son's room.

EDIT: Keep us updated if you get it working that way reliably.

3 Likes

I have an Open the curtains, and close. This has always been somewhat of a pain in Alexa, well not any more. Tested in the Lounge and Master bed, and works like a charm :smiley: I can see the WAF going up here :joy:

5 Likes

So how late were you up last night creating all of the dummy Alexa routines and Node Red flows so you could get rid of all of your devices in Alexa????

2 Likes

I'm most of the way there :smiley:

1 Like

Something I put together to fetch all battery or temperature values from Hubitat Devices

Advantage to this: if you add or remove a device from your Hubitat install, no changes are required except for making sure the device is allowed to use Maker API app.

So while that flow is just the basics, here is an example around those basics:

I use an Alexa routine or a Telegram bot command to request levels on these items and then in Node-RED build up a message that gets sent to Telegram that looks like this:

You could just as easily build a dashboard tile, send an SMS, whatever!

5 Likes

Link that to Amazon to order more and you're laughing

Nice thought, an affiliate link :joy:

Well I've gone overboard on this one hahaha. I had to zoom right out, so I could get it in one shot :joy:

Whats it do? I swapped the "Lights on/off" from Alexa groups, to this solution, so I don't have to re-link groups if I remove devices.

Opening and closing curtains work in any room I have them :wink:

My Good morning, which turns on the PC switch, gives me a good morning quip, reads my calendar events for the day, and then the weather, then starts playing my Fav radio station on my Samsung speaker, works great!

Also my "Alexa Shut down" routine, sends a command to my PC to hibernate, then turns off the PC socket, and stops the music and kills any lights, all working!

Turning on/off the hot water (via Homebridge and Nest) is now working in NR, this has given me the highest WAF for a long time, but now its more stable, thanks to feeding devices from HE via HA to Homebridge. For me, this has been the smoothest method.

And the pièce de résistance :smiley: "Alexa, can I put the washing out?". This will check my "chance of rain" device (customer driver for Climacell, which I'm just pulling the precipitation_probability %).
Passing this to Node Red, and if you ask Alexa this in any room, she'll respond with some nice, and also some snarky replies and tell you the % chance of rain :smiley:

SSML example

<speak>
 <voice name="Brian"><lang xml:lang="en-GB">There's not much rain around, you'll be fine to put the washing out, there's a {{topic}} percent chance of rain</lang></voice>
</speak>

And I've not even finished as yet!! :smiley: :smiley: But boy do I love these flows! So thanks again :wink:

5 Likes

Oh.. the alignment is just perfect. :smiley: :smiley:

(It's a joke... all this other stuff and I pseudo focus on alignment! :slight_smile: )

1 Like

My OCD just wont allow things to be messy. :joy:
This kind of thing, really pisses me off hahaha

2 Likes

I guess my OCD is not as potent as yours. Oh, and sorry for inducing rage. :stuck_out_tongue_winking_eye:

2 Likes

IMPRESSIVE!!!!!!

Do you use "Contains" in the Switch Nodes like I did? I know little about Regex but i think that would be more powerful in matching but not sure.

1 Like

Yeah, works very nicely. Whilst I was creating the "washing out" one, that drove me bloody crazy!
I could not get it to work for the life of me, yet really couldn't figure out why it wasn't catching my phrase.

What was it? Well the difference between "can I put the washing out" and "can i put the washing out". At that point I nearly launched my Dot out of the window! must have been at that one for around 2 hours :joy:

1 Like