Haaska - problem with Lambda - need help

Hi,

I finished Alexa skill, Lambda Function, Register application and added to my Amazon Echo skill. However, it cannot discover the components I have in my home assistant.

I tried to trace back:

  • make test in Raspberry Pi = OK
  • test in Lambda = issue

Detail below.

What should I do to make it work?

make test in Raspberry Pi result:
pi@raspberrypi:~/haaska $ make test
{
“header”: {
“payloadVersion”: “2”,
“namespace”: “Alexa.ConnectedHome.System”,
“name”: “HealthCheckResponse”,
“messageId”: “ebd8f280-778e-4bdb-9c8f-18cc863e84d5”
},
“payload”: {
“isHealthy”: true
}
}
true

test in Lambda (Input):
{
“header”: {
“payloadVersion”: “1”,
“namespace”: “Control”,
“name”: “DiscoverAppliancesRequest”
},
“payload”: {
“accessToken”: “whatever”
}
}

test in Lambda (Error):
{
“stackTrace”: [
[
“/var/task/haaska.py”,
660,
“event_handler”,
“ha, payload)”
],
[
“/var/task/haaska.py”,
289,
“invoke”,
“obj = make_class(allowed)(namespace, name, ha, context)”
]
],
“errorType”: “AttributeError”,
“errorMessage”: “type object ‘allowed’ has no attribute ‘Control’”
}

haaska - config.json:
{
“url”: “https://my_ip:443/api”,
“password”: “my_password”,
“expose_by_default”: false
}

Problem solved.

Test using Lambda standard test protocol “Alexa Smart Home - Discovery”

payload version in developer.amazon.com - Need to set as v2 (other devices)

If anyone else comes across this, the test json linked off of bruh’s haaska youtube video is out dated.