Alexa to respond back to the device spoken to

At the moment Iā€™ve got rule machine speaking to various Alexas around the house when certain rules are triggered. It works but itā€™s annoying for other people in those rooms when they go off. Is there a way when a rules run for it to speak back from the device it was spoken to?

If using echo speaks you can monitor the lastSpokenToTime. When the attribute changes that means it was just spoken to, and it updates pretty fast. I have a rule that sets a global to the device spoken to anytime that changes. You could then direct text to that device.

I use it mainly to determine which device is spoken to so I can activate a device in the room the command was given.

3 Likes

That sounds exactly what Iā€™m looking for!

Would you mind sharing your rule machine code?

1 Like

Same here. But I use wasLastSpokenToDevice to trigger pistons for all kinds of things in my world...

+1

Note this is still RM4.0.

3 Likes

Iā€™ll try copy what youā€™ve got and see where I can get to! Thanks for sharing your rule

Thank you for the share! worked like a charm - I did not know there was a value stored LastSpokenToTime.
I am struggling with merging your SpokenTo with motion detector triggers - I use the great "Follow Me" app from @BPTWorld and since I have no presence detectors, I'm triggering on Motion as to what room messages are played. The problem I have is that movement ceases when I'm sitting still or watching TV etc. So the FollowMe thinks Elvis has left the building. I was hoping to write a rule that would shore up this current issue (@bptworld said he added my feature request to his future pile - that being to 'keep' last active - active). So - by using a rule like you have created and merging it with motion last active I was hoping I could make that work well enough - I need to learn more about rules.
Anyways. Thanks for sharing. it was highly useful.