Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPError "404 Client Error: Not Found for url: https://****:8123/api/alexa/smart_home", #23

Closed
alekvie opened this issue Feb 17, 2018 · 9 comments
Assignees

Comments

@alekvie
Copy link

alekvie commented Feb 17, 2018

I'm not sure if this is the correct way to ask for help. I used a older version of haaska by you, mike-grant, and everything were working fine. However, when I added a switch to home assistant alexa stopped finding devices (and I could not control the other devices with alexa). Thus, I tried the new updated version and now I get a error when using the following test event. Furthermore, alexa does not find any devices.

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

Det error is as follows:

{
  "errorMessage": "404 Client Error: Not Found for url: https://***:8123/api/alexa/smart_home",
  "errorType": "HTTPError",
  "stackTrace": [
    [
      "/var/task/haaska.py",
      108,
      "event_handler",
      "return ha.post('alexa/smart_home', event, wait=True).json()"
    ],
    [
      "/var/task/haaska.py",
      62,
      "post",
      "r.raise_for_status()"
    ],
    [
      "/var/task/requests/models.py",
      935,
      "raise_for_status",
      "raise HTTPError(http_error_msg, response=self)"
    ]
  ]
}
@mike-grant mike-grant self-assigned this Feb 17, 2018
@mike-grant
Copy link
Owner

What version of HomeAssistant are you currently using?

Thanks

@alekvie
Copy link
Author

alekvie commented Feb 17, 2018

Thank you for your quick reply! I'm using Home Assistant 0.63.2 on Hassbian.

@TheJulianJES
Copy link

@alekvie Can you send your configuration of Home Assistant? (It requires the Smart Home configuration for this skill now: https://home-assistant.io/components/alexa/#smart-home)

@TheJulianJES
Copy link

TheJulianJES commented Feb 17, 2018

You can even expose full domains to Alexa, if you want that:

alexa:
  smart_home:
    filter:
      include_domains:
        - alert
        - automation
        - cover
        - fan
        - group
        - input_boolean
        - light
        - media_player
        - scene
        - script
        - switch

Also, you should consider secrets (https://home-assistant.io/docs/configuration/secrets/) in Home Assistant, if you share your configuration more often (or just delete the password before sending it). Now if it is your real password in that configuration, you should change it.

@alekvie
Copy link
Author

alekvie commented Feb 17, 2018

Thank you @TheJulianJES . There is nothing wrong with my configuration?

@TheJulianJES
Copy link

TheJulianJES commented Feb 17, 2018

@alekvie You will have to write:

alexa:
  smart_home:

It is the smart home option in the Alexa component, so you will always need that in your configuration.

@alekvie
Copy link
Author

alekvie commented Feb 17, 2018

@TheJulianJES, ok. So as long as I have the smart_home: option in my configuration file, the error is probably caused by something else?

@TheJulianJES
Copy link

@alekvie Well, I see that you also used v2 test event. Try using the new one:

{
  "directive": {
    "header": {
      "namespace": "Alexa.Discovery",
      "name": "Discover",
      "payloadVersion": "3",
      "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
    },
    "payload": {
      "scope": {
        "type": "BearerToken",
        "token": "access-token-from-skill"
      }
    }
  }
}

@alekvie
Copy link
Author

alekvie commented Feb 18, 2018

@TheJulianJES, suddenly it works - the test and to discover new devices. Thank you so much for your help!

@alekvie alekvie closed this as completed Feb 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants