Haaska help needed

I’ve got

  • Alexa skill implemented
  • Lambda implemented
  • login with Amazon set up and configured

I’m trying to test the lambda with this

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

The output I’m getting from amazon is

DiscoverAppliancesRequest failed
Traceback (most recent call last):
  File "/var/task/haaska.py", line 136, in DiscoverAppliancesRequest
    discover_appliances(self.ha)}
  File "/var/task/haaska.py", line 340, in discover_appliances
    is_exposed_entity(x)]
  File "/var/task/haaska.py", line 323, in mk_appliance
    o['friendlyName'] = x['attributes']['friendly_name']
KeyError: 'friendly_name'

My instance is running SSL and is using my domain with a CNAME pointing to an openDNS domain. My NAS re-ups the openDNS configuration if my IP changes.

make test from the command line also fails.

I can’t find anything similar to this output. Can someone help?

I modified the config to not expose by default and it’s fixed. Something not having a defined friendly name was tanking the whole thing. It works great now!

1 Like

Hi quadmaster,

I have a similar issue to yours. I get that error when I’m testing the lambda function from aws. When I set expose by default to false, the error goes away, but does not discover any devices.

What did you need to do to selectively expose the entities ?

I have a customize.yaml to hide and expose from HomeKit currently

Hey guys,
I also have this exact issue, any info you can provide to solve this would be great.

Traceback (most recent call last):
File "/var/task/haaska.py", line 141, in DiscoverAppliancesRequest
discover_appliances(self.ha)}
File "/var/task/haaska.py", line 344, in discover_appliances
return [mk_appliance(x) for x in states if is_supported_entity(x) and
File "/var/task/haaska.py", line 345, in <listcomp>
is_exposed_entity(x)]
File "/var/task/haaska.py", line 328, in mk_appliance
o['friendlyName'] = x['attributes']['friendly_name']
KeyError: 'friendly_name'[DEBUG]

I too am trying to get Haaska to work. Followed the instructions here (Wanderer)
I’ve got

  • Alexa skill implemented
  • Lambda implemented
  • login with Amazon set up and configured
    I’m trying to test the lambda and got this error;

‘header’: KeyError
Traceback (most recent call last):
File “/var/task/haaska.py”, line 660, in event_handler
name = event[‘header’][‘name’]
KeyError: ‘header’

I don’t understand it. Any help would be appreciated.

Hi all - it sounds like you’re using the wrong version of Haaska, and possibly even the wrong test details as a result.

Are any of you still having issues? I can help go over them now.