Alexa deviceid from emulated hue

Does anyone know of a way to fetch the deviceid from an alexa command that hass receives via emulated hue?

My dream is it would be really cool to trigger a command via alexa, “Alexa turn on XXX”, which fires a hass script, get the device id of the alexa device and then do some tts to that particular alexa device.

I think we are close to having all the pieces:

Just wondering if anyone has ventured far with this yet?
Thanks!
ut.

Using the Amazon smart home api, which is what the “alexa turn on XXX” uses, that information is not available in the request.

https://developer.amazon.com/docs/device-apis/alexa-powercontroller.html

This is something I have wanted forever and even posted ages ago back on the Amazon developers forum but got no responses.

Thanks for the info. What a shame its still not straight forward!!

Any other ways via a custom skill or other people can think of?
Made alexa skills before, so not opposed to a bit of code…

it is possible.
with the script from loetzimmer.de you can send a command to find out which device has send the last command.

so in the emulated hue code should be something added that when a command is recieved there is send that command to know where it came from.

i havent had the time to look into it, but it should be possible.

other option would be to add that command as a sensor to HA and then use automations when an emulated hue command comes in.