Which event endpoint should each device send a StateReport/ChangeReport to?

302 views Asked by At

I built an Alexa skill and it worked on multiple regions with our light devices.

As we know, while the state of a device changes, our server should send a ChangeReport event to Alexa, and there are 3 endpoints for each region:

I'm confused cause I don't know each device bought by which region's user.

1

There are 1 answers

0
troy On BEST ANSWER

We can fix it by recording customers's region when they're discovering devices.

As we know, each region linked to a lambda function, do as these two steps:

  • Add an environment parameter which can define its region to lambda function, such as locale = eu
  • Write the locale parameter to DB whenever customers discovery their devices in your lambda function, it happens when they're refreshing their Alexa APP
  • According to this, we know which endpoint we need to send a ChangeReport event to