Closed kaotix closed 5 years ago
Hi,
thanks for your question and interest in this project. Here are some troubleshooting tips.
Double check that your skill is enabled. Go to the Alexa companion app and select Skills under the main menu which is the icon on the upper left. Search for the name of the Skill and select it. It should show up as a Smart Home Skill with Account Linking.
Check the CloudWatch logs. Log into the AWS console and go to CloudWatch > Log Groups > /aws/lambda/ShowCameras. You should see the result of a device discovery, first a request from the Alexa Smart Home service to your lambda code and then a response. I've placed the request and response from my log below, yours should look similar.
You should see something in the ColudWatch log that can help debug the problem. Let me know what you see and we'll take it from there.
Lindo
2018-05-06T11:30:04.811Z d25e2a97-5120-11e8-9b2a-5182fe0e8acf [DEBUG] Discovery Request:
{
"directive": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover",
"payloadVersion": "3",
"messageId": "298850c1-b802-4cea-846d-1d4e4d05eb1e"
},
"payload": {
"scope": {
"type": "BearerToken",
"token": "Atza|IwEBIA4C8lRnz0bEDUQcdXOzuhfftAGuQi5kKWRR3VgFqoNkE7YktlpxggoX28QmnIHFF5ULKOFJNSv3-c7OHg1GQqd9qK8cbb3IVLAEnfcoFAMVgoxIQNyUv2isZkgxeywwpiQl_d9b9Uiyfxn3NGonavC3MDRKlz6tXgv0_B4FewUu3CMRS-SZa8GA55t5XFLb76-URW8zejtNHzO26sLM-Pa-0Zd6RbKxSda0wRBJrQAhS4yVJBv9h0gMi1AhfMQR3hkgwR_JfF0kch7bPArZEBPSoYgNtncjZV9Dd2uIQmG1wcDN7SpJMYqFJcK-PJloKueW9VghqxdaJ-0SA-stQCBKRjpo0Is6W1Y0TCrnKNYPLls00-Bu5apvrZVYCBr9HYfKf8wa7SDaa2t-IVUE0AGpfOEJ1F6YbI5BEU9X3VRdkLna3UZi3qLJicC8wSnscdZBSuJCPLpFvcCqeiV-OS-bfu4877m0giXkspqv5orQjQi6siQ4if-IzivanrjSAX1KyQjlrSQnVSKqA2hneAqPXQb08Z7D4WY1okSGvUEmARgk_YPGOc--SipU29pNet4MIzFN1Yq7Z_7-oQ4Ukksv"
}
}
}
}
2018-05-06T11:30:04.912Z d25e2a97-5120-11e8-9b2a-5182fe0e8acf [DEBUG] Discovery Response:
{
"event": {
"header": {
"messageId": "e7f00a80-0737-444d-99de-d9ee355ee958",
"name": "Discover.Response",
"namespace": "Alexa.Discovery",
"payloadVersion": "3"
},
"payload": {
"endpoints": [
{
"endpointId": "1",
"manufacturerName": "Axis",
"modelName": "P1425-LE",
"friendlyName": "Front Porch Camera",
"description": "Front Porch Camera",
"displayCategories": [
"CAMERA"
],
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.CameraStreamController",
"version": "3",
"cameraStreamConfigurations": [
{
"protocols": [
"RTSP"
],
"resolutions": [
{
"width": 1920,
"height": 1080
}
],
"authorizationTypes": [
"BASIC"
],
"videoCodecs": [
"H264"
],
"audioCodecs": [
"G711"
]
}
]
}
]
},
{
"endpointId": "2",
"manufacturerName": "Axis",
"modelName": "P1425-LE",
"friendlyName": "East Side Camera",
"description": "East Side Camera",
"displayCategories": [
"CAMERA"
],
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.CameraStreamController",
"version": "3",
"cameraStreamConfigurations": [
{
"protocols": [
"RTSP"
],
"resolutions": [
{
"width": 1080,
"height": 1920
}
],
"authorizationTypes": [
"BASIC"
],
"videoCodecs": [
"H264"
],
"audioCodecs": [
"G711"
]
}
]
}
]
},
{
"endpointId": "3",
"manufacturerName": "Axis",
"modelName": "P1435-LE",
"friendlyName": "Back Yard Camera",
"description": "Back Yard Camera",
"displayCategories": [
"CAMERA"
],
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.CameraStreamController",
"version": "3",
"cameraStreamConfigurations": [
{
"protocols": [
"RTSP"
],
"resolutions": [
{
"width": 1920,
"height": 1080
}
],
"authorizationTypes": [
"BASIC"
],
"videoCodecs": [
"H264"
],
"audioCodecs": [
"G711"
]
}
]
}
]
},
{
"endpointId": "4",
"manufacturerName": "Axis",
"modelName": "P1425-LE",
"friendlyName": "Back Garage Camera",
"description": "Back Garage Camera",
"displayCategories": [
"CAMERA"
],
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.CameraStreamController",
"version": "3",
"cameraStreamConfigurations": [
{
"protocols": [
"RTSP"
],
"resolutions": [
{
"width": 1920,
"height": 1080
}
],
"authorizationTypes": [
"BASIC"
],
"videoCodecs": [
"H264"
],
"audioCodecs": [
"G711"
]
}
]
}
]
},
{
"endpointId": "5",
"manufacturerName": "Axis",
"modelName": "P1425-LE",
"friendlyName": "Playroom Door Camera",
"description": "Playroom Door Camera",
"displayCategories": [
"CAMERA"
],
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.CameraStreamController",
"version": "3",
"cameraStreamConfigurations": [
{
"protocols": [
"RTSP"
],
"resolutions": [
{
"width": 1920,
"height": 1080
}
],
"authorizationTypes": [
"BASIC"
],
"videoCodecs": [
"H264"
],
"audioCodecs": [
"G711"
]
}
]
}
]
},
{
"endpointId": "6",
"manufacturerName": "Axis",
"modelName": "P1425-LE",
"friendlyName": "Front Gate Camera",
"description": "Front Gate Camera",
"displayCategories": [
"CAMERA"
],
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.CameraStreamController",
"version": "3",
"cameraStreamConfigurations": [
{
"protocols": [
"RTSP"
],
"resolutions": [
{
"width": 1080,
"height": 1920
}
],
"authorizationTypes": [
"BASIC"
],
"videoCodecs": [
"H264"
],
"audioCodecs": [
"G711"
]
}
]
}
]
},
{
"endpointId": "7",
"manufacturerName": "Axis",
"modelName": "P1435-LE",
"friendlyName": "Back Porch Camera",
"description": "Back Porch Camera",
"displayCategories": [
"CAMERA"
],
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.CameraStreamController",
"version": "3",
"cameraStreamConfigurations": [
{
"protocols": [
"RTSP"
],
"resolutions": [
{
"width": 666,
"height": 375
}
],
"authorizationTypes": [
"BASIC"
],
"videoCodecs": [
"H264"
],
"audioCodecs": [
"G711"
]
}
]
}
]
}
]
}
}
}
Thanks for your reply.
I've got the skill enabled in the companion app and I've tried the discovery but it doesn't actually seem to hit the Skill or function at all. There's nothing in the logs at all. If I run a manual function test from within the AWS console to discover it does return the expected results so I'm probably missing something from my Skill somewhere I think I just don't know where.
This is the manual test output:
{ "event": { "header": { "messageId": "a625e5bc-6f1f-4e0b-990f-48f6a1450c16", "name": "Discover.Response", "namespace": "Alexa.Discovery", "payloadVersion": "3" }, "payload": { "endpoints": [ { "endpointId": "1", "friendlyName": "Lounge Camera", "description": "Lounge Camera", "displayCategories": [ "CAMERA" ], "cookie": {}, "capabilities": [ { "type": "AlexaInterface", "interface": "Alexa.CameraStreamController", "version": "3", "cameraStreamConfigurations": [ { "protocols": [ "RTSP" ], "resolutions": [ { "width": 1280, "height": 720 } ], "authorizationTypes": [ "BASIC" ], "videoCodecs": [ "H264" ], "audioCodecs": [ "G711" ] } ] } ] } ] } } }
Hi,
So it looks like your lambda code is Ok based on the results from you manual test. That's good but the lambda code isn't being triggered by Alexa Smart Home. Let's find out why. Here are two other areas to check.
Hope this helps, let me know what you find out.
Lindo
I've double checked the information you suggested and everything looks correct. I agree that it doesn't appear to be triggering the function though which is strange. I've even re-created the function and reset everything but it's exactly the same.
Hi,
I'm not sure what's going wrong here. I suggest that you go step by step through the relevant instructions in Steps to Build a Smart Home Skill. Also double check that you've provided the correct account linking information.
Hope this helps.
Lindo
closing due to inactivity.
I've set everything up following your instructions and got the Skill installed for Alexa but when I try to discover new devices it doesn't find anything.
I have a pi setup running the live555 proxy and stunnel which all talk to my actual IP camera which I've also created the SSL cert for etc and my Skill and Lambda function all appear to be correct. What troubleshooting can I do for the Alexa part? I'm very new to this side of things unfortunately so I don't know where I could have gone wrong. Happy to provide logs/config outputs etc for additional help.
Thanks