question

slowflyer avatar image
slowflyer asked

How to debug initialize response for smart home Camera?

The discovery of my Skill seems to work.

When I try to show the camera stream on my Echo device, it returns that the cam is not responding.

That's my initialize response:

{ 
  "context": { 
    "properties": [ 
      { 
        "namespace": "Alexa.EndpointHealth", 
        "name": "connectivity", 
        "value": {
          value: "OK"
        } 
        "timeOfSample": "2018-04-12T09:20:15.074Z", 
        "uncertaintyInMilliseconds": 200 
      } 
    ] 
  }, 
  "event": { 
    "header": { 
      "namespace": "Alexa.CameraStreamController", 
      "name": "Alexa.Response", 
      "payloadVersion": "3", 
      "messageId": "82ec2945-1c8e-4c39-bdae-7dd921d872f5", 
      "correlationToken": "AAAAAAAAAQD..." 
    }, 
    "endpoint": { 
      "scope": { 
        "type": "BearerToken", 
        "token": "eyJ0eXAiOiJK..." 
      },
      "endpointId": "my SmartCam", 
      "cookie": {} 
    }, 
    "payload": { 
        "cameraStreams": [ 
          { 
            "protocol": "RTSP", 
            "resolution": { 
              "width": 1280, 
              "height": 720 
            }, 
            "authorizationType": "BASIC", 
            "videoCodec": "H264", 
            "audioCodec": "NONE", 
            "uri": "rtsp://user:pass@cam.server.org:443/", 
            "idleTimeoutSeconds": 30 
          } 
        ], 
        "imageUri": "https://user:pass@image.server.org/stream.jpg" 
    } 
  } 
}


There is no request reaching the Camera, or the server delivering the image.

Are there errors in the response? Anything else I need to take care of?

alexa smart homecamera
10 |5000

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

slowflyer avatar image
slowflyer answered

Changing line 18 to:

"name":"Response",

seems to fix the major problem, that the Skill doesn't even connect to the RTSP stream. Now it tries but still fails.

When is the image specifxed at imageUri used? I still have no request in the logs.

10 |5000

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

Anand@Amazon avatar image
Anand@Amazon answered

Hello slowflyer:

Thanks for posting !!!

Can you check that the "cameraStreamConfigurations" in discovery response should matches with the "cameraStreams" details in InitializeCameraStreams request.

And it looks like your cameraStreams.uri is not in correct format.

{
  "event": {
    "header": {
      "namespace": "Alexa.CameraStreamController",
      "name": "Response",
      "payloadVersion": "3",
      "messageId": "5f8a426e-01e4-4cc9-8b79-65f8bd0fd8a4",
      "correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg=="
    },
    "endpoint": {
       "endpointId": "appliance-001"
    },
    "payload": {
      "cameraStreams": [ {
        "uri": "rtsp://username:password@link.to.video:443/feed1.mp4",
        "expirationTime": "2017-02-03T16:20:50.52Z",
        "idleTimeoutSeconds": 30,
        "protocol": "RTSP",
        "resolution": {
          "width": 1920,
          "height": 1080
        },
        "authorizationType": "BASIC",
        "videoCodec": "H264",
        "audioCodec": "AAC"
      }
     ],
      "imageUri": "https://username:password@link.to.image/image.jpg"
    }
  }
}

Check this link for more details.

10 |5000

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

Will avatar image
Will answered

How do you debug into Echo Show to begin with? When I used the developer site and try to debug into my rtsp smarthome app the developer site just says 'cameras are not supported on this device'. So, I can't even see why Show say's 'Hmmm......camera is not responding'.

1 comment
10 |5000

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

@Will Good luck getting anywhere with that question :-)

https://forums.developer.amazon.com/questions/121917/how-to-diagnose-echo-showspot-or-firetv-when-alexa.html

Basically the answer is you can't. No, nada, zilch, zero, No soup for you!

You will need to treat it like a black box and perform all your troubleshooting without any insight as to why the Echo Show/Spot does not like your skill's responses.

0 Likes 0 ·