Create Alexa groups via openHAB configuration

Hi there!

I want to turn on the lights in the room I’m currently in saying “Alexa, turn on the lights” to that room’s Echo device. It works fine, if I manually create a room / group inside the Alexa app and tell Amazon that the light group for this room from openHAB as well as the resp. Echo device is located in that room.

But it has the downside that I don’t have a single source of truth anymore. When I clean my Alexa account I cannot restore it to it’s previous state.

Question: Can I use an openHAB configuration so that the Alexa device scan will automatically create groups and assign the devices to these groups?

Best regards,

There have been other requests like yours, please search the forum first.
You cannot create Amazon server-side groups from openHAB nor reference them.

From memory, what people did to make it work was to make (any) Alexa trigger a generic openHAB rule then there’s a lastVoiceCommand channel (or the like) on every Echo device and comparing those across all Echos helps you find out which device the command was received on hence which room it was spoken in.