Haaska device discovery failing

I’ve followed the instructions at https://github.com/mike-grant/haaska/wiki. 2-3 times actually:

First go, used different emails for AWS than Alexa. (Arrg)

On the second go, the test script worked and skill finally showed up after I added intents and utterances. Skill was “Dev” but now also under “private”. But no new devices are discovered and no new commands. I limited the HA config so only a couple devices would show up in the test script.

Third-ish time, I tired other regions for the lambda code. I’m near Vancouver, Canada and so far I have apps in us-east-1(original) , us-west-1 (failed) and us-west-2 (tests successfully). Same results in Alexa.

Is there more to switching regions than copying the code and ARN id over?

Just what are the finished steps for the Alexa Skill? I just guessed at the intents stuff but no idea if that is causing trouble. Any other definitive way to debug this?

HA debug info showing successful test:

2020-05-12 14:26:13 DEBUG (MainThread) [homeassistant.components.alexa.smart_home_http] Received Alexa Smart Home request:
 {
     'directive':
     {
         'header':
         {
             'namespace': 'Alexa.Discovery',
             'name': 'Discover',
             'payloadVersion': '3',
             'messageId': '1bd5d003-31b9-... '
         },
         'payload':
         {
             'scope':
             {
                 'type': 'BearerToken',
                 'token': 'access-token-from-skill'
             }
         }
     }
 }

2020-05-12 14:26:13 DEBUG (MainThread) [homeassistant.components.alexa.smart_home_http] Sending Alexa Smart Home response:
{
    'event':
    {
        'header':
        {
            'namespace': 'Alexa.Discovery',
            'name': 'Discover.Response',
            'messageId': '7a3c8d08-dcf9-47d8...',
            'payloadVersion': '3'
        },
        'payload':
        {
            'endpoints': [
            {
                'displayCategories': ['SWITCH'],
                'cookie':
                {},
                'endpointId': 'switch#baskets_drive_house_beds',
                'friendlyName': 'Baskets, drive & house beds',
                'description': 'switch.baskets_drive_house_beds via Home Assistant',
                'manufacturerName': 'Home Assistant',
                'capabilities': [
                {
                    'type': 'AlexaInterface',
                    'interface': 'Alexa.PowerController',
                    'version': '3',
                    'properties':
                    {
                        'supported': [
                        {
                            'name': 'powerState'
                        }],
                        'proactivelyReported': True,
                        'retrievable': True
                    }
                },
                {
                    'type': 'AlexaInterface',
                    'interface': 'Alexa.EndpointHealth',
                    'version': '3',
                    'properties':
                    {
                        'supported': [
                        {
                            'name': 'connectivity'
                        }],
                        'proactivelyReported': True,
                        'retrievable': True
                    }
                },
                {
                    'type': 'AlexaInterface',
                    'interface': 'Alexa',
                    'version': '3'
                }]
            },
            {
                'displayCategories': ['SMARTLOCK'],
                'cookie':
                {},
                'endpointId': 'lock#yale_yrd226_tsdb_66271911_door_lock',
                'friendlyName': 'Deadbold',
                'description': 'lock.yale_yrd226_tsdb_66271911_door_lock via Home Assistant',
                'manufacturerName': 'Home Assistant',
                'capabilities': [
                {
                    'type': 'AlexaInterface',
                    'interface': 'Alexa.LockController',
                    'version': '3',
                    'properties':
                    {
                        'supported': [
                        {
                            'name': 'lockState'
                        }],
                        'proactivelyReported': True,
                        'retrievable': True
                    }
                },
                {
                    'type': 'AlexaInterface',
                    'interface': 'Alexa.EndpointHealth',
                    'version': '3',
                    'properties':
                    {
                        'supported': [
                        {
                            'name': 'connectivity'
                        }],
                        'proactivelyReported': True,
                        'retrievable': True
                    }
                },
                {
                    'type': 'AlexaInterface',
                    'interface': 'Alexa',
                    'version': '3'
                }]
            }]
        }
    }
}

Anyone have some suggestions? It feels really close but ultimately fails to do anything useful.

Hi there

I’m having the same problem, test works ok, I got response, but Alexa Discovery doesn’t work
Have you managed to make it work?

Thanks!

Hi all,

I’m having the same problem, test works ok, I got response, but Alexa not discover any device.

How can i debug problem?

Thank you

Hello,

I solved the problem. the reason was the wrong choice of the region.

Hi Gregskh,

I understand that region selection is very important… I build the lambda function in “Ireland”, and skill language was set as EN-UK, even though I’m staying in Germany as a english speaker… Do you see something wrong here about region selection in my case?

Regards,
Richard

After 24hrs of tomfoolery I have sorted my install. I am in the UK so naturally followed the instructions but using Europe (Ireland)eu-west-1 server. My test passed but no devices were found in Alexa Discovery. I deleted everything and started again with everything configured for US East (N. Virginia)us-east-1 - same result. I then created a seperate Lambda function for (Ireland)eu-west-1 and pointed the skill to that - same result.

I then added locale: en-GB to my configuration.yaml and all devices were discovered.

This is now my config:

alexa:
  smart_home:
    locale: en-GB

I’m guessing that locale default: en-US kicked in and conflicted with the locale of my Alexa device. There is probably a way to check the locale and cross-check for conflict by my tiny brain isn’t up to the task.

Fingers crossed it all doesn’t fall apart tomorrow and I have to retract this.