Limit voice command by specific echo device

I managed to configure alexa in openhab to trigger a virtual switch command to disable the internet connection by executing a shell script.
Now i want to limit the source of the command → I have several alexas in the house which can be used to execute the switch command but i wan’t that this switch does only trigger if the voice command is processed by a specific echo device

Can this archived with “but only if” condition or in the script itself?

Thx in advance!

Hi and welcome to the community!

For that you need the amazon echo control binding.
Each echo device has a channel called “lastVoiceCommand”.
So you need to check (best within your script) if the lastVoiceCommand of EchoXYZ corresponds to the echo device you are looking for.

Since you might need to do string comparison, you also would need a script in the “but only if” section, but then i’d keep everything in one script.

I am only concerned a bit about timing issues, since you have two asynchronous items.
You might get into troubles if the echo’s “lastVoiceCommand” gets updated slower than the alexa skill triggering the item.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.