Haaska Connection Issues

hello

Im new to home assistant and want to set up haaska. I have gone through all the steps on the wiki but I get and error when I goto test it on the aws website. I get the following error:

{
  "errorMessage": "('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))",
  "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",
      498,
      "send",
      "raise ConnectionError(err, request=request)"
    ]
  ]
}

All Ports have been forwarded but not sure what I am doing wrong.

Any Help would be appreciated.

Many Thanks
Mark

Just a guess, but since one of the errors says the remote end closed the connection without a response, my guess is that the bearer token configured in Lambda is not matching up with the one assigned by HA.

1 Like

Thanks. I created another Long-Lived Access Token and entered it into the config.json again on the aws site and it worked first time.

Thanks again for the help. :+1:

May you please review this because it looks kinda similar and provide me your insight thanks

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

I think host='localhost' is the problem.

1 Like

thanks for taking the time to respond but apologies for the dumb question as I am no expert and new to this, but where can I adjust this?

And I am guessing it should be referring to my duckdns host am I correct?

nevermind I got it fixed :slight_smile: thanks.

Hello,

Iā€™m getting the exact same error with host=localhost. Could you share how you fixed your error?

nevermind I got it fixed :slight_smile: thanks.