home-assistant-ecosystem / home-assistant-cli

:computer: Command-line tool for Home Assistant
Other
428 stars 63 forks source link

error: HTTPError: 404 Client Error #390

Closed kiat-huang closed 1 year ago

kiat-huang commented 1 year ago

Despite creating a new token (twice) and testing with the internal http URL and the external https URL, I'm unable to access the API, with this error message. I've looked on this github and can't find anything about how to deal with this issue or any open issues. Any pointers as to what might be wrong?

{xxxx@fedora:~ ?} hass-cli --server=http://192.168.1.10:8123 --token=eyJ0e...Q.9gy--IB_iZft754ACN2k37_fpD64vUD-i084ljbnjjc info
error: HTTPError: 404 Client Error: Not Found for url: http://192.168.1.10:8123/api/discovery_info
Run with -x to see full exception information
{xxxx@fedora:~ ?} 

Home Assistant 2022.9.7 Supervisor 2022.09.1 Operating System 8.5 Frontend 20220907.2 - latest

fabaff commented 1 year ago

info will be remove as the endpoint (/api/discovery_info) was deprecated. See #388

wez commented 1 year ago

@fabaff Perhaps the readme should be updated to show a different way to sanity check that things are working?

https://github.com/home-assistant-ecosystem/home-assistant-cli#usage

That could show using some other command.

I just spent 15 minutes troubleshooting my token and endpoint before looking for and finding this closed issue; feels kinda irritating!

jarrah31 commented 1 year ago

yes same here, just spent a while trying to get this working based on what the readme tells you to do when testing the connection out. :( I suspect it's due to this message about using brew on macOS: "Keep in mind that the available releases in the distribution could be out-dated."

EDIT - just tried the pip3 install method but info doesn't work on that either.

> hass-cli --version
hass-cli, version 0.9.6

I can successfully run other commands though, it's just that 'info' is misleading given that it's still an option within the command in the latest version.

zdaar commented 5 months ago

One more person arriving on this closed issue for the same outdated readme