How do I get HE to return a message to the Alexa device I used to drive the request?

How do i return a message to the Echo device that initiated the request? Maybe I am missing something here. So imagine I wonder around the house asking Alexa to drive a rule on HE(easy bit) but I want HE to send the response to the device i used to drive the request.

1 Like

May be another way but I used to just loop through the devices until I found the one with the attribute

wasLastSpokenToDevice : true

I found that looking at LastSpokenToTime in conjunction with echo speaks was the best way, but that quit working about a month ago. I have a rule that filled a hub variable with the last device and I could use that hub variable to respond back to the device I last spoke to.

I have posted a couple of times on the echo speaks forum asking about it but I never get a response and there hasn't been any updates to echo speaks in awhile.

I have been meaning to look at an alternative but just haven't got around to it. If wasLastSpokenToDevice stills works I can maybe update to that. The problem I had with that attribute was when you spoke to the same device twice. The attribute does not change, and you need to some way to clear it. LastSpokentoTime was much easier to work with.

2 Likes

Yes the same for me.. wasLastSpokenToDevice never changes. Would you mind posting your rule for LastSpokenToTime?

Not at all, for all the good it will do you. I would be interested to know if LastSpokentoTime updates for you.

2 Likes

That timing would suggest that it's part of the Amazon WebSocket changes that @tonesto7 is looking at.

2 Likes

no 'lastSpokenToTime' is not being updated. Seems to me ideally wasLastSpokenToDevice needs to be set for this to work. I wait for a 'Eco Speaks' update unless someone actually has this working!
Thanks for helping guys.

It's been a while.. has anyone managed to get this working?

1 Like

Yeah, having a reliable ID on the last spoken-to Alexa unit is key to some of the functionality I'd like to put together.

It would be possible if you are willing to go down the Node Red rabbit hole. I use a Node Red flow to use same command to turn on/off light in the room of Alexa that heard command.

I can give you more details if that is something you would consider.

You can do this using Node-RED. Even when multiple Alexa devices hear my command, the one which responds is the one where "msg.payload.data.intent" != "Unknown" or "".

I do this using the node-red-contrib-alexa-remote2-applestrudel nodes.

1 Like

You can do this using amazon alone. Just put the lights for a room into a room group. Then when you say lights off /on .. amazon will do the necessary.. same command for each location / room.

My setup with Node Red does more than that. I don't have to say "lights on" or "lights off" to make it work. I actually have custom commands borrowed from the movies "Demolition Man" and Harry Potter. I am also able to say "It's hot in here" to turn on ceiling fan. All of these recognize the room I am in and change appropriate devices. That is not possible with the Alexa grouping.

1 Like