The Haaska Super Thread

Blockquote

Thanks @bscuderi! I was having this exact same problem. The Lambda test was passing and I could see all my entities, but Alexa discovery failed to find anything. I excluded all my Denon devices from Alexa in my configuration.yaml (below), restarted Home Assistant, and BAM! It started working after the 2nd discovery attempt.

alexa:
  smart_home:
    filter:
       exclude_entities:
         - media_player.denon_avr
         - media_player.denon_avr_2
         - media_player.denon_avr_s940h
         - switch.denon_dsw_1h
         - media_player.living_room
         - media_player.living_room_zone2
         - media_player.bedroom
         - media_player.living_room_2
         - media_player.master_bedroom
         - media_player.master_bedroom_2
         - media_player.master_bedroom_heos
         - media_player.theater
         - media_player.theater_2
         - media_player.theater_3
         - media_player.theater_heos
         - media_player.theater_zone2
1 Like

Hi Everyone,

I am hoping someone can help who has a similiar setup. I seem to be failing the last test no matter what i have tried so far…

I am running Home Assistant as a Docker container on a Synology NAS. I have a external fixed IP, i have a cert from lets encrypt which is inside Synology , where i use Nginx to reverse proxy from my custom domain without the port numbers etc. Everything has been and continues to work fine with HA. I have other services which require SSL etc that work fine such as Smart Things. So i believe my setup is OK.

I believe the issue is either in Nginx but i might be off the mark. I have started process from start to finish and seem to be only be stuck on this last part. The response i get when i do the test on haaska in AWS

{
  "errorMessage": "HTTPConnectionPool(host='localhost', port=8123): Max retries exceeded with url: /api/alexa/smart_home (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa22f00af60>: Failed to establish a new connection: [Errno 111] Connection refused',))",
  "errorType": "ConnectionError",
  "stackTrace": [
    [
      "/var/task/haaska.py",
      111,
      "event_handler",
      "return ha.post('alexa/smart_home', event, wait=True)"
    ],
    [
      "/var/task/haaska.py",
      65,
      "post",
      "timeout=(None, read_timeout))"
    ],
    [
      "/var/task/requests/sessions.py",
      581,
      "post",
      "return self.request('POST', url, data=data, json=json, **kwargs)"
    ],
    [
      "/var/task/requests/sessions.py",
      533,
      "request",
      "resp = self.send(prep, **send_kwargs)"
    ],
    [
      "/var/task/requests/sessions.py",
      646,
      "send",
      "r = adapter.send(request, **kwargs)"
    ],
    [
      "/var/task/requests/adapters.py",
      516,
      "send",
      "raise ConnectionError(e, request=request)"
    ]
  ]
}

Does anyone with a similiar setup have any clues. I am sure i have missed something basic but not being confident with Nginx is steering me that way (rightly or wrongly).

Thanks in advance

Judging by your output did you make sure to deploy your code before running the test ? If you take a look in the designer window at the top right there’s a deploy button. After you modify the .json file you need to deploy so your test function executes against the latest code and not the original .json file that you imported when importing the .zip package.

@guilly you are a life saver!!! Not sure whether to laugh or cry.
Its working

1 Like

I ran into the same issue last night :slight_smile:

Does anyone know why the Haaska test function succeeds but account linking fails. I can see my devices when running the test function but I can’t seem to link my account.

The only thing I have changed is I had to set SSL_Verify to False. I purchased an SSL certificate from namecheap which is signed by USERTrust RSA Certification Authority. Do you need to have a valid SSL for the account linking to work ? Is there any other way to troubleshoot where this might be failing ?

When I first setup Haaska, I set it up without my HA instance using SSL and all worked fine (I have since changed my HA instance to now use SSL).

As for the SSL certificate itself, it is possible your SSL certificate does not include the signing/root CA’s certificate chained within your SSL (Ex. PEM) file, in which case Haaska may fail the SSL verification.

I was able to register using HA Cloud (nabu casa) so I guess that confirms my flows are fine ? As far as including the CA’s cert within my cert file, I’m not sure I understand. My cert is valid is valid when I browse to HA which tells me the CA is trusted from my devices perspective.

I could see maybe AWS missing one of the intermediate CA’s which would break the chain but that seems like a stretch… I’ll revert back to duckdns with Let’sEncrypt and see if I can get it to work, however I’d really like to understand what causes linking not to work or how to trouble shoot.

Hi,

I’ve integrated Alexa using Haaska method with HA.
All devices and scenes (scripts) show up fine.
However, when I try to create a routine in Alexa, it does not show me any available scenes(scripts), only devices.
So, under “New Routine” -> “Add Action” , I have checked
Skills - which says I have no skills installed, though I have a couple and Haaska in dev
Smart Home - which shows all devices, but no scenes or scripts.

Any ideas ? Thanks.

Hi there

I just finished the haaska installation and I found some issues.

Issue 1
After uploading the .zip file, the lambda_function.py was missing. I had to recreate the file manually.
Issue 2
All started from this step setting-up-aws-lambda—part-2

The AWS console has changed. It was not possible to find the “Handler” box to replace with “haaska.event_handler”. This step is “not done yet” in my installation.
Todays appears a new button “DEPLOY”. You have to deploy before do the testing. Otherwise produces an error.

Finally, all seems went well but no luck finding the devices :sob:

Attached some screenshots to clarify and identify the changes

1 Like

Hello,

I followed the instructions as closely as I could (I had to make a slight change when I got to "Setting Up AWS Lambda - Part 2” as I had to change lambda_function.lambda_handler to the haaska.event_handler up within Basic Settings / Edit before uploading the haaska_1.1.0.zip file). But even before I uploaded the zip file there was a warning "

  • Lambda can’t find the file haaska.py. Make sure that your handler upholds the format: file-name.method .” I continued anyway (rightly or wrongly).

The instructions are slightly different from what I see within Linking Alexa Skills Kit to Login With Amazon (points 5-7); should the Allowed Origins box have anything in it? The default is https://www.yourwebsite.com but it is difficult to see whether that is greyed out or not. I think it is.

When I tested it the following error code came back

{

  "errorMessage": "2020-11-02T11:38:26.621Z 2519c540-f5b4-486e-93f4-fc28b364fbc8 Task timed out after 3.00 seconds"

}

I changed the time out from 3 to 10 seconds, but that caused a similar error (“after 10.01 seconds”).

START RequestId: 6e018a42-cc9a-4db3-a42c-98198ee14027 Version: $LATEST

END RequestId: 6e018a42-cc9a-4db3-a42c-98198ee14027

REPORT RequestId: 6e018a42-cc9a-4db3-a42c-98198ee14027 Duration: 10010.17 ms Billed Duration: 10000 ms Memory Size: 128 MB Max Memory Used: 53 MB Init Duration: 265.82 ms

2020-11-02T11:40:03.443Z 6e018a42-cc9a-4db3-a42c-98198ee14027 Task timed out after 10.01 seconds

My HA is running on a dedicated, wired Raspberry Pi4, and my internet speeds are reliably ~28 down, ~8 up.

Any suggestions as to where I have gone wrong?

TIA

OK - I have made a couple of corrections (added the “:8123/api” etc), but still getting this error to the test

START RequestId: e3ea2cde-73af-4516-abf4-48712c5f5bea Version: $LATEST
END RequestId: e3ea2cde-73af-4516-abf4-48712c5f5bea
REPORT RequestId: e3ea2cde-73af-4516-abf4-48712c5f5bea	Duration: 7007.15 ms	Billed Duration: 7000 ms	Memory Size: 128 MB	Max Memory Used: 24 MB	
2020-11-02T15:14:48.855Z e3ea2cde-73af-4516-abf4-48712c5f5bea Task timed out after 7.01 seconds

Any thoughts?

TIA

EDITED TO ADD: The haaska skill does show up within my Alexa app, but it never finds anything after searching for 45 seconds.

@dbanyos I found the handler info under “Basic settings”

2 Likes

Thanks @pawwin it works!!! Now “she” found all my devices!!!

Now If i could only get mine to work. :sweat_smile:

UPDATE: Works for me now. My issue was misconfigured port forwarding. If anyone runs into the error where it times out after 3 seconds. Check your network configuration.

Congrats @pawwin!!!

Hello to all!

First of all I am new to HA and im loving it!

I have configured haaska without problem, and my Alexa sees HA devices, I have a question, can I make Alexa “Talk” when some automation or action is done in HA?
THX

I use the Alexa Media Player for sending Text to Speech from HA to a specified Alexa device.

1 Like