Turn on a device based on which Alexa requests it

Hello,

I didnt know where to post this. Basically i am trying to run specific scripts in home assistant based on which alexa "turns on" the device.

If i tell my living room alexa to "turn on front door camera", i want it to run a script in home assistant called "FrontDoorCamCast" and utilize the fact that i know (somehow) the living room alexa asked for it and utilize this information in the script to properly choose which endpoint to cast the camera to.

Is this possible? IS their a way in node red to access the requesting alexa devices ID and pass that information to home assistant to use as a variable to an if else statement determining the endpoint device of the camera cast?

Hope this makes sense.

Thanks

Frank

You can see the full message available to an alexa node by attaching a debug node to an alexa node and setting it to display the complete message object.

So i tried what you said, and both of my Echo Dot Gen3s give the same appliance ID. I was hoping for something different to make use of some type of constant from either echo dot and make a determination of its location in the house.

Any ideas?

Thanks for the assist on this.

Frank

please see the following;

msg : Object
object
topic: ""
name: "Living Room Movie"
_messageId: "e1ed3a5c-386c-436e-b764-b78877a4913f"
_applianceId: "56893"
_confId: "2fa69167.590f86"
command: "TurnOnRequest"
extraInfo: object
payload: true
_msgid: "d0ff7992.073e98"

msg : Object
object
topic: ""
name: "Living Room Movie"
_messageId: "705d1165-194c-4fde-a9f3-0ad1f1ecd234"
_applianceId: "56893"
_confId: "2fa69167.590f86"
command: "TurnOnRequest"
extraInfo: object
payload: true
_msgid: "6823e2b3.d439cc"

1 Like

Maybe there is something in msg.extraInfo you could debug log that and look for clues?

Empty :frowning:
Its the only thing i need to feel complete with alexa...

Looking for something like this.

Looks like this is what i am looking for

context.System.device.deviceId

I got the information from here. And this is exactly the issue i am having, i did not want to create a new account for every room and potentially a NodeRed server instance for every room, lol

https://forums.developer.amazon.com/questions/51286/is-there-a-unique-static-identifier-for-each-alexa.html

But if that isn’t the debug message then it isn’t being returned by the node.

You would need to open an issue on the nodes github page to raise it with the nodes author to see if they can add it

@shorage did you ever get to the bottom of this?

I want to identify which device received the spoken command, so I can return the output to the same device.