Haaska test connection refused

Hi!

At the part of trying to test out the Lambda.

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

Unfortunately I like many others have run into a problem, connection refused

My setup is Home assistant core(installed manually, not sure if that changes anything) on raspi with a SSH tunnel to a Cloud machine.

-i /home/pi/.ssh/ssh-key-2020-10-21.key -R 8888:localhost:8123 ubuntu@mypublicip

Cloud machine has caddyserver.

Caddyfile:

turboluck-caddy.duckdns.org {
    reverse_proxy * localhost:8888
}

In my haaska lambda config.json, I input “url”: “https://turboluck-caddy.duckdns.org

What have a done wrong?

Thnx in advance

Haaska should be trying to access your HA instance, just like you would using a web browser from an external location outside your home. If you use https://turboluck-caddy.duckdns.org to access your HA instance from the outside world, then yes this is the URL you would configure in Haaska.

Connection refused is a good indicator that the URL you are using is correct, but it could mean the token you configured in Haaska is not being accepted by HA. You may want to try a new token.

Thnx!

I regenerated a new token and tried it. I also realised (could be super daft of me) that I may not have hit the ‘Deploy’ button on my lambda function before.

Working now though! YES!