Why is my Alexa AddOrUpdate directive not updating my devices?

Viewed 67

I'm trying to get the AddOrUpdate request to work for my Alexa smart devices. Discovery works as intended, and I can confirm that the endpointId matches here. I first questioned my access token, but I can use the same access token to control my devices and it works, so I assume that the token is valid.

Here is an example request made for an AddOrUpdate that I am making.

 {
   "method":"POST",
   "uri":"https://api.amazonalexa.com/v3/events",
   "headers":{
      "Content-Type":"application/json",
      "Authorization":"Bearer my_token_here"
   },
   "json":{
      "event":{
         "header":{
            "messageId":"my_message_id_here",
            "namespace":"Alexa.Discovery",
            "name":"AddOrUpdateReport",
            "payloadVersion":"3"
         },
         "payload":{
            "endpoints":[
               {
                  "endpointId":"2897",
                  "description":"my_desc",
                  "friendlyName":"Dimmer",
                  "manufacturerName":"name_here",
                  "displayCategories":[
                     "LIGHT"
                  ],
                  "capabilities":[
                     {
                        "type":"AlexaInterface",
                        "interface":"Alexa.PowerController",
                        "version":"3",
                        "properties":{
                           "supported":[
                              {
                                 "name":"powerState"
                              }
                           ],
                           "proactivelyReported":true,
                           "retrievable":true
                        }
                     },
                     {
                        "type":"AlexaInterface",
                        "interface":"Alexa.BrightnessController",
                        "version":"3",
                        "properties":{
                           "supported":[
                              {
                                 "name":"brightness"
                              }
                           ],
                           "proactivelyReported":true,
                           "retrievable":true
                        }
                     },
                     {
                        "type":"AlexaInterface",
                        "interface":"Alexa.EndpointHealth",
                        "version":"3",
                        "properties":{
                           "supported":[
                              {
                                 "name":"connectivity"
                              }
                           ],
                           "proactivelyReported":true,
                           "retrievable":true
                        }
                     }
                  ],
                  "cookie":{
                     "modelName":"IotSwitch",
                     "isReachable":true
                  }
               },
               {
                  "endpointId":"832",
                  "description":"Activity Scene",
                  "friendlyName":"Open door",
                  "manufacturerName":"my_name",
                  "version":"Unknown",
                  "displayCategories":[
                     "ACTIVITY_TRIGGER"
                  ],
                  "capabilities":[
                     {
                        "type":"AlexaInterface",
                        "interface":"Alexa.SceneController",
                        "version":"3",
                        "properties":{
                           "proactivelyReported":false,
                           "supportsDeactivation":false
                        }
                     }
                  ],
                  "cookie":{
                     "modelName":"ResidentialActivity",
                     "isReachable":true
                  }
               },
               {
                  "endpointId":"833",
                  "description":"Activity Scene",
                  "friendlyName":"Close door",
                  "manufacturerName":"my_name",
                  "version":"Unknown",
                  "displayCategories":[
                     "ACTIVITY_TRIGGER"
                  ],
                  "capabilities":[
                     {
                        "type":"AlexaInterface",
                        "interface":"Alexa.SceneController",
                        "version":"3",
                        "properties":{
                           "proactivelyReported":false,
                           "supportsDeactivation":false
                        }
                     }
                  ],
                  "cookie":{
                     "modelName":"ResidentialActivity",
                     "isReachable":true
                  }
               },
               {
                  "endpointId":"834",
                  "description":"Activity Scene",
                  "friendlyName":"Movie time",
                  "manufacturerName":"my_name",
                  "version":"Unknown",
                  "displayCategories":[
                     "ACTIVITY_TRIGGER"
                  ],
                  "capabilities":[
                     {
                        "type":"AlexaInterface",
                        "interface":"Alexa.SceneController",
                        "version":"3",
                        "properties":{
                           "proactivelyReported":false,
                           "supportsDeactivation":false
                        }
                     }
                  ],
                  "cookie":{
                     "modelName":"ResidentialActivity",
                     "isReachable":true
                  }
               }
            ],
            "scope":{
               "type":"BearerToken",
               "token":"my_token_here"
            }
         }
      }
   }
}
0 Answers
Related