question

Robbo avatar image
Robbo asked

Smart Home devices respond to old name and deploying multiple devices.

I'm developing a device and have renamed it in the Alexa App, but it still responds to the original name it found during discovery, and also it remembers more recent names it was given.
Surely it should Forget the old name completely?
How else could you deploy several new devices each using the same name as defined in the lambda when the device was initially discovered.
In this case, if you renamed each device using the Alexa app after deployment would they not all still respond to their default name simultaneously.
Where are the new names stored when the app is used to rename?

Do we need to make a new 'Thing' for every identical product made or can they all use the same Thing and credentials?

Assuming the one Lambda function has to control and publish messages to the appropriate device, what is the suggested method to route MQTT messages to do this and what part of the lambda trigger would be used to achieve the correct routing since all devices begin with the same name, and the lambda cannot know what new names are given to each device.

lambdasmart home
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Amazon_Bernardo Bezerra avatar image
Amazon_Bernardo Bezerra answered

Hello @Robbo and thank you for your message.

When users modify the friendly name via the Alexa app, it actually creates an alias in the service, which means that the original name can still be used to trigger that device.

If identical devices are discovered (for instance, multiple smart light bulbs), your code should have logic in place to present them to the user with unique names (light bulb 1, light bulb 2, etc.).

In the request sent to your backend you will see a property named endpointId. This value is not accessible to the user and should be unique for each device in that user's account. This value is the one that you need to pass in your response to the request, so that Alexa can identify the device that the response refers to.

Regards,
Barry

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.