haaska: Max retries exceeded with url: /api/alexa/smart_home

Hello,

Sorry to bother you with this issue but I have tried everything and have no wtf I have this error when I execute the test snippet. Please help, my brain hurts!

  • haaska skill language is English (UK).
  • Lambda region is Ireland.
  • Endpoint: arn:aws:lambda:eu-west-1:amazonID:function:haaska
  • Client ID/Client Secret/Redirect URLs configured.
  • Skill ID entered in function
  • Haaska Config:
{
  "url": "https://hass.mydomain.com/api",
  "bearer_token": "my_token",
  "debug": false,
  "ssl_verify": false,
  "ssl_client": []
}
  • Hass config:
alexa:
  smart_home:
    entity_config:
      light.living_room:
        name: Ceiling
      light.reading:
        name: Reading
      light.bathroom_lights:
        name: Ceiling
      light.bedroom_main:
        name: Ceiling
      light.bedroom_strip:
        name: Headboard
etc.

Error:

{
  "errorMessage": "HTTPSConnectionPool(host='hass.mydomain.com', port=443): Max retries exceeded with url: /api/alexa/smart_home (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7faa2be26f60>: Failed to establish a new connection: [Errno -2] Name or service not known',))",
  "errorType": "ConnectionError",
  "stackTrace": [
    [
      "/var/task/haaska.py",
      109,
      "event_handler",
      "return ha.post('alexa/smart_home', event, wait=True).json()"
    ],
    [
      "/var/task/haaska.py",
      62,
      "post",
      "timeout=(None, read_timeout))"
    ],
    [
      "/var/task/requests/sessions.py",
      572,
      "post",
      "return self.request('POST', url, data=data, json=json, **kwargs)"
    ],
    [
      "/var/task/requests/sessions.py",
      524,
      "request",
      "resp = self.send(prep, **send_kwargs)"
    ],
    [
      "/var/task/requests/sessions.py",
      637,
      "send",
      "r = adapter.send(request, **kwargs)"
    ],
    [
      "/var/task/requests/adapters.py",
      516,
      "send",
      "raise ConnectionError(e, request=request)"
    ]
  ]
}

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 25 (11 by maintainers)

Most upvoted comments

@esabea - Ok. I will be testing this myself tonight.

I normally use it with SSL Verify false, so I will try turning that on with my certificate too.

do not worry … I have managed to solve the simplest way in the world, repeating everything from the beginning!

Hey mike, Thanks for the reply! I get 404 for the API and 405 for api/alexa/smart_home. I don’t understand why api would throw a 404… any ideas? Thanks! On 28 Oct 2018, at 07:39, Anthony Lavado @.***> wrote: @chimpy Hey there. If you go to “https://haas.mydomain.com/api/” (obviously with your actual domain in there), do you get anything back? It should be a “401: Unauthorized”. Similarly, if you manually browse to “https://haas.mydomain.com/api/alexa/smart_home”, you should get a “405: Method Not Allowed”. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

so been messing around with this. Check 3 things:

  1. the URL matches your EXTERNAL url http://blah.domain.suffix/api (you may need port 8123)
  2. if you need port 8123 in your URL make sure you have port forwarding for that port
  3. check if both cloud alexa and alexa smart_home are both enabled
  4. if you use !include to split out your config - put all the alexa contents in the config.yaml

Anyway hope this helps someone who finds it