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

Unexpected response code 0 from Home Assistant API endpoint /api/states. #23

Closed
markhotchkiss opened this issue Feb 20, 2021 · 2 comments
Labels
question Further information is requested

Comments

@markhotchkiss
Copy link

When accessing the GetStates the following error messages is thrown.

Unexpected response code 0 from Home Assistant API endpoint /api/states.

Any pointers would be greatly appreciated. This has only started happening recently. The version of HA that I am using is 2021.2.1

Thanks!

@qJake
Copy link
Owner

qJake commented Feb 20, 2021

The latest version of this library now throws a special HTTP exception for this, and the NetworkDescription property will contain the network-related error (Timeout, DNS issue, etc.) that occurred.

Can you try again with the new version and let me know what the NetworkDescription property is set to on the HttpResponseException that is thrown?

@qJake qJake added the question Further information is requested label Feb 20, 2021
@markhotchkiss
Copy link
Author

Hi, thanks for the help!

I thought I was on the latest version, but appears not. Upgraded and the error was actually a 401 Unauthorized. Got a new Token and pointed my url to a https instead of http and all working again.

Thanks for the help!

@qJake qJake closed this as completed Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants