ndg63276/alexa-sky-hd

Sky-q not detected

Closed this issue · 6 comments

Hey,

I've set up everything I can find so far but my Alexa won't find the box.

Portfoward is correct and working.

Tried this on the lambda

{
    "directive": {
        "header": {
            "messageId": "",
            "name": "Discover",
            "namespace": "Alexa.Discovery",
            "payloadVersion": "3"
        },
        "payload": {
            "scope": {
                "token": "",
                "type": "BearerToken"
            }
        }
    }
}

Got a good response.

Tried disable and renable.

Checked skill had arn correct.

I'm sort of out ideas how to debug further.

Tried the discovery option

,

{
  "header": {
    "messageId": "F8752B11-69BB-4246-B923-3BFB27C06C7D",
    "name": "DiscoverAppliancesRequest",
    "namespace": "Alexa.ConnectedHome.Discovery",
    "payloadVersion": "2"
  },
  "payload": {
    "accessToken": "1"
  }
}

Getting the following result.

{
  "errorMessage": "'directive'",
  "errorType": "KeyError",
  "requestId": "d4262e3a-045e-4a2a-a0e2-eb563eb7692a",
  "stackTrace": [
    "  File \"/var/task/lambda_function.py\", line 193, in lambda_handler\n    if request[\"directive\"][\"header\"][\"name\"] == \"Discover\":\n"
  ]
}

Odd, it still discovers my Sky box ok.

If you go to the Lambda function, then click the Monitor tab, and click "View Logs in Cloudwatch". Then try discovering devices in the Alexa app. Then have a look at the most recent log (might need to refresh to see it), and see if you see any error.

The Discovery process for me has the form as the code in your first post:

Screenshot 2021-08-28 20 25 45

Checking logs and it's showing.

[ERROR] KeyError: 'directive'
Traceback (most recent call last):
  File "/var/task/lambda_function.py", line 193, in lambda_handler
    if request["directive"]["header"]["name"] == "Discover":

For the error from what I can see

I've tried to recreate the lambda but messed up my cloudwatch so going to work on fixing access to that and I'll get back to you.

Make sure in your skill (at https://developer.amazon.com/alexa/console/ask) that your payload version is v3, not v2, Although for me, the Save button doesn't seem to work, it just polls forever. If you get the same, you might have to re-make your skill (just the skill, not the lambda).

Fixed in the end re did the lambda and redid all portfoward from the sky router and usg.

Working perfectly apart from the Facebook portals are the worst Alexa's in the world.

Thanks for this amazing skill!