Alexa, which door is open?

I have inovelli red dimmers providing at a glance status of different things in the house. The LED bar turns red for instance when a door is left open. I'd like to be able to ask alexa which door is open when this happens, if its not immediately obvious (door on another floor). What's the best way to do this? I have seen people using NodeRed for custom alexa responses and commands, but I think this may be overkill for what I need. I do have NodeRed setup, but I wouldn't know where to start with alexa "aware" situations. Could echospeaks be used for this? Rule Machine, webcore? Tips on how to get started?

Easy part is capturing the door that is open - you've already done that to set the LED, so store it to a hub variable. So now to make Alexa "smarter", a simple way would be to create a custom rountine in Alexa so you can speak a little more naturally, i.e. if Alexa hears "What door is open?" do something.

In this instance the simplest something would be to turn on a virtual momentary switch that we can use as a trigger, and then use RM, webCoRE, etc. to read the variable and send it in a speak command to Alexa - I use Echo Speaks for this part, but you could also look at using any TTS devices you have attached with their associated integrations.

3 Likes

Once you have implemented @thebearmay’s recommendation, you could use @bertabcd1234’s Device Status Annoncer app to make the announcement:

2 Likes

Great suggestions. Thank you very much. Any hints on how to "speak" from the alexa which was spoken too? Sending the command to any alexa device seems trivial, but I'm missing the part where I can determine which alexa device was qeuried and respond from there.

1 Like

Echo Speaks used to give you a lastSpokenTo attribute, but I think Amazon broke that about a month back ...

2 Likes

Yup they sure did.

Well that's a bummer. That's a critical piece as I don't want to announce over random echos. That's unfortunate as this was going to be so easy! :slight_smile: I'll go further down the NodeRed path and see where we end up.

This would be inelegant but...

What if each echo device triggered a separate virtual switch? A rule could then send the reply back to the correct echo by checking for the condition of the switch. A tad ugly but it would likely work.

How could we accomplish that? I don't think there's a way within alexa routines to specify "turn on this switch only if speaking to this echo", is there? If you have to do it from the habitat side, then you'd have to know which device was spoken to, to choose which switch to activate, which would negate the need for switches.

Ah yeah flaw in my logic... you're right. I keep forgetting you can't do that in Alexa routines.

I have each of my door contact switches to trigger a voice alert any time a door is opened. When my wife opens the door between the laundry room and the garage, the alert says "The garage door has been opened". In order to minimize the number of different alerts, I use the same alert for the main garage doors.

The alert sounds every time a door is opened, but it does not tell you if a door has been left open for an extended time. We have storm doors on the front and back doors, so we often leave the main doors open during the day.

You can use Echo Speaks to make your voice announcements.

I've followed the information here Node Red Room Aware Voice Control and I can get device IDs from the alexa that has just been spoke to, so that's the biggest hurdle. I think I'll probably stay within Node-RED to get this done now, but you could pass it back to hubitat if you wished and use the suggestions above.

Just a follow-up here, I've set this up in Node-RED and it's really great. I have multiple harmony hubs and multiple Roku's in the house, and its really great (huge increase in WAF and much easier for the kids) to use the same commands all over the house and get responses from the devices in the room you're in. Same for ceiling fans and thermostats. I'm likely going to remove routines and devices from Alexa entirely and map everything via NodeRed. Its much easier to track and make changes to and it seems quicker to respond, although the alexa cloud is still involved so it should be relatively the same. I'm using the Alexa Q&A blueprint which is much easier than adding all the voice phrases via routines in the app. I had NodeRed already setup, but its really not difficult once you get the hang of it. It does take a little bit of time, but its largely a one time effort. Well worth it in my opinion.