Closed wretanhewe closed 3 years ago
Hey there, looks like this is your first time submitting a bug or enhancement to HACC! Thanks for helping make HACC a better app! 🎉
Thanks for reporting this, I think there may be some issues with 0.118.x and the API that I need to investigate, I will let you know what I find soon!
Just wanted to pop in and say I'm having the same issues here. Fresh install of Home Assistant on Debian 10 Virtual Machine, the HACC container is on the same install as HA.
Returned error on the terminal...
warn: HADotNet.CommandCenter.Middleware.HAClientInitialization[0]
Can't initialize HACC API, missing the base URL.
info: HADotNet.CommandCenter.Middleware.HAClientInitialization[0]
Initializing HACC API with URL http://192.168.20.209:8123 and access token [eyJ0eX•••••••••••Q9GWDo].
fail: HADotNet.CommandCenter.Controllers.AdminController[0]
Invalid system settings entered, or unable to reach Home Assistant with the specified information.
System.Exception: Unexpected response code 0 from Home Assistant API endpoint /api/discovery_info.
at HADotNet.Core.BaseClient.Get[T](String path)
at HADotNet.Core.Clients.DiscoveryClient.GetDiscoveryInfo()
at HADotNet.CommandCenter.Controllers.AdminController.Settings() in /src/HADotNet.CommandCenter/Controllers/AdminController.cs:line 67
warn: HADotNet.CommandCenter.Middleware.HAClientInitialization[0]
Can't initialize HACC API, missing the base URL.
warn: HADotNet.CommandCenter.Middleware.HAClientInitialization[0]
Can't initialize HACC API, missing the base URL.
info: HADotNet.CommandCenter.Middleware.HAClientInitialization[0]
HA connection is not initialized, redirecting user to settings area...
warn: HADotNet.CommandCenter.Middleware.HAClientInitialization[0]
Can't initialize HACC API, missing the base URL.
The running instance of HA and the given URL...
{"uuid": "275c6125bd204f64a25e5159446e6c31", "base_url": "http://192.168.20.209:8123", "external_url": null, "internal_url": "http://192.168.20.209:8123", "location_name": "Home", "installation_type": "Home Assistant Supervised", "requires_api_password": true, "version": "2020.12.1"}
Forcing an External URL and Internal URL under HA's /config/core makes no difference.
{"uuid": "275c6125bd204f64a25e5159446e6c31", "base_url": "http://192.168.20.209:8123", "external_url": "http://192.168.20.209:8123", "internal_url": "http://192.168.20.209:8123", "location_name": "Home", "installation_type": "Home Assistant Supervised", "requires_api_password": true, "version": "2020.12.1"}
edit: HA details...
version | 2020.12.1 |
---|---|
installation_type | Home Assistant Supervised |
dev | false |
hassio | true |
docker | true |
virtualenv | false |
python_version | 3.8.6 |
os_name | Linux |
os_version | 4.19.0-13-amd64 |
arch | x86_64 |
timezone | America/Chicago |
V1.0.24 (HA Supervised install via beta channel) now throws this error and then stops:
@slm4996 Thanks for reporting that. That's actually a separate bug related to a dependency versioning issue.
I'm in the process of releasing v1.0.25 that I'm hoping will fix this. Please try this version as soon as it reaches you!
Happy to report that version 1.0.26 resolves both issues. Thank you!
Sweet, thanks for reporting back!
Description
When setting up a new docker container of HACC, and inputting my Base URL and Long-Lived Token, I get the error: "The settings entered are not valid. HACC is unable to reach your Home Assistant instance. Try your entries again, consult the setup guide for help, or check the logs (console) for more information."
And in the logs of the Docker container I see on repeat:
Which seems sensible. I've not told it where to connect yet, because that value IS missing. So, going to the wbepage and after I enter my settings, I see in the logs:
I found that the API /api/discovery_info exists to provide URL and port info (among other things) as per the HTTP component, but I dont know what would cause it to return response code 0?
A long time back (a year maybe?) this configuration, with whatever versions were available at the time, was functional.
Environment
I'm running HACC 1.0.22 in a docker container, on a Synology NAS, DS418-Play Homeassistant Core is also running, Version 0.118.4 on another docker container on the Synology NAS. Both are using the "host" network settings, so the NAS IP followed by Port number (8095 and 8123 respectively) are the routes to access. I can get to both webpages from any computers in the network.
I've confirmed via telnet inside the terminal of the HACC container that it can connect with HomeAssistant at the IP and Port 8123. I've added firewall rules in case that was an issue, and even tested after removing the firewall. I've tested making HACC in a container with the "bridge" type connection, if somehow both containers using the host network settings were causing a problem (however, that was not an issue when it had worked a long time ago). I've tried tiny different syntax changes to the IP address, just in case, with no change. (The spaces after "http://" are intentional here, so the text doesn't hyperlink. I'm not immediately seeing an option for disabling automatic hyperlinking on text)
I found only Issue #89 here which seemed perhaps to be a similar problem? But by the end of that issue, it was functional in HACC version 1.0.18 (currently I'm running 1.0.22). Checking my Configuration.yaml, I did not have the HTTP component enabled (as brought up in issue 89, but I never had before either, and it had worked way back when.) I proceeded to enable HTTP with no extra fields. No luck. I added Server_port and base_url to the HTTP component. No luck. (Homeassistant complains that Base_URL in this context as deprecated, so since that didn't fix the issue, I just took it back out. This URL is set in the settings webpage, as well as any external URL's, so I guess that's where this info has "moved" to in newer version of HomeAssistant)
Summary, I'm on up to date Homeassistant and HACC. I can access each instance. I've tried new Tokens to confirm I'm using good and active ones, I've confirmed the HTTP component is configured, and that the containers can see each other, and no firewall/routing problem is preventing their access to each other, and adjusted Syntax on the Base Url in HACC settings.
Steps to Reproduce (at least for me, this is abnormal behaviour)
Screenshots