Yeah the strange thing is when I click open web UI I do get prompted for username and password but not when accessing it via embedded method.
Are you using some sort of reverse proxy setup which might mess around with the authentication headers?
Not that I’m aware of. I have no issues with logging into HASSIO remotely/locally via web or iOS app. This is the first issue I’ve come across with regard to authentication.
I do have credentials setup but I’ve added a ‘0.0.0.0/0’ for allowed networks so I can access remotely from any browser.
Anyone running the official Docker container danielperna84/hassio-hass-configurator and know the Docker parameters to pass to it like /config, etc?
I’m am running the official HASS Docker, not HASS.io.
@danielperna84 Really great work, I’ve just found out about this tool and I love it!
I am having one issue: I cannot get the link to the HA api to work. I’m using SSL. See the error I’m getting below and my settings.conf file. Any ideas what could be causing this? 192.168.1.1 is my router IP, I’m not totally clear why that is listed here. I assume it’s because the traffic is going out to my dynamic dns address and then back in through my router, but i can’t make heads or tails of it.
If it makes a difference, I’m using regular Home Assistant, not hass.io.
!
It’s been a while since I have tested with SSL, but when using the regular configurator you should be able to set the HASS_API
to the internal IP of HASS. If I recall correctly, then SSL is not verified. So you don’t need to use the hostname. And the configurator is accessing the API by itself from within the network. So for this feature external access to the API is irrelevant und shouldn’t be routed to the outside.
@danielperna84 Thanks for the reply. When you setup SSL on Home Assistant, you can no longer access HA from the local IP address, you have to use the external dynamic DNS address. This doesn’t seem to be a problem actually; using curl commands, I verified that I can access the api from the external address. However, it seems like there is something wrong with the bootstrap part of the api; I get a 404 error response when calling it, while all of the other REST commands work fine. See the image below. Thoughts? It’s not an authentication issue, all of the other REST commands work. I should be getting a result that looks like what is posted in the REST api documentation.
@bloody2k Maybe you can try the same thing and post your results? It sounds like you had it working previously, and it broke when upgrading to 0.57.1.
You could create an entry in the hosts file on your local network client machine to have it use the local IP when the dns name is called.
192.168.1.xx yourhaname.duckdns.org
Apparently the bootstrap
part of the API is not working anymore, as reported here:
If that’s really the case, then none of the thrid party tools will work anymore. So this probably is a bug within Home Assistant. I myself haven’t upgraded to 0.57 yet, so I didn’t experience the problem for probably exactly this reason.
The problem with the missing entities, services and events has been fixed and will be solved via update as soon as my PR at https://github.com/home-assistant/hassio-addons/pull/200 has been merged.
Users of the standalone version can already get the latest version here: https://github.com/danielperna84/hass-configurator
Does anyone have any tips for getting this working with SSL? I’m using the “out of the box” DuckDNS/LetsEncrypt plugin for Hass.io. My configuration is set like so:
{
"username": "xxxxxxx",
"password": "xxxxxxxx",
"certfile": "/ssl/fullchain.pem",
"keyfile": "/ssl/privkey.pem",
"ssl": true,
"allowed_networks": [],
"banned_ips": [
"8.8.8.8"
],
"banlimit": 0,
"ignore_pattern": [
"__pycache__"
],
"dirsfirst": false
}
Those are the correct paths to the cert and key files, which is what is used by the DuckDNS plugin and I’ve verified those paths are correct via an SSH terminal. But when I try to start the Configurator plugin, I get this:
starting version 3.2.2
INFO:2017-12-29 18:19:11,394:__main__:Starting server
Traceback (most recent call last):
File "/configurator.py", line 3659, in <module>
main(sys.argv[1:])
File "/configurator.py", line 3649, in main
server_side=True)
File "/usr/lib/python3.6/ssl.py", line 1142, in wrap_socket
ciphers=ciphers)
File "/usr/lib/python3.6/ssl.py", line 741, in __init__
self._context.load_cert_chain(certfile, keyfile)
FileNotFoundError: [Errno 2] No such file or directory
Mine does not have /ssl/ before the fullchain.pem or privkey.pem
Your error indicates it can’t find the certificate.
I also found I had to set an allowed network 0.0.0.0/0
My fconfig looks like this:
{ "username": "xxxxxxxx", "password": "xxxxxxxx", "certfile": "fullchain.pem", "keyfile": "privkey.pem", "ssl": true, "allowed_networks": [ "0.0.0.0/0" ], "banned_ips": [ "" ], "banlimit": 5, "ignore_pattern": [ "__pycache__" ], "dirsfirst": true }
Thanks, that worked! Not sure why it worked, because my cert and key files are definitely in /ssl, but whatever.
I remember screwing around with it when I tried to get it going as well.
@danielperna84 I just loaded your repository but upon trying to install I get this log error:
Supervisor Logs
18-01-04 07:53:31 WARNING (MainThread) [hassio.addons.data] Can’t read /data/addons/core/homematic/config.json
18-01-04 07:53:31 WARNING (MainThread) [hassio.addons.data] Can’t read /data/addons/core/tellstick/config.json
18-01-04 07:53:31 INFO (MainThread) [hassio.addons] Load addons: 17 all - 1 new - 0 remove
18-01-04 07:55:20 INFO (MainThread) [hassio.addons.addon] Create Home-Assistant addon data folder /data/addons/data/b794684e_hass-configurator
18-01-04 07:55:20 INFO (SyncWorker_0) [hassio.dock.addon] Start build b794684e/amd64-addon-hass-configurator:0.1.1
18-01-04 07:55:20 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py”, line 410, in start
resp = yield from self._request_handler(request)
File “/usr/lib/python3.6/site-packages/aiohttp/web.py”, line 325, in _handle
resp = yield from handler(request)
File “/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py”, line 93, in impl
return (yield from handler(request))
File “/usr/lib/python3.6/site-packages/hassio/api/util.py”, line 33, in wrap_api
answer = await method(api, *args, **kwargs)
File “/usr/lib/python3.6/site-packages/hassio/addons/addon.py”, line 515, in install
if not await self.docker.install(self.last_version):
File “/usr/lib/python3.6/site-packages/hassio/dock/util.py”, line 18, in wrap_api
return await method(api, *args, **kwargs)
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/hassio/dock/addon.py”, line 251, in _install
return self._build(tag)
File “/usr/lib/python3.6/site-packages/hassio/dock/addon.py”, line 264, in _build
image = self.docker.images.build(**build_env.get_docker_args(tag))
File “/usr/lib/python3.6/site-packages/docker/models/images.py”, line 179, in build
raise BuildError(chunk[‘error’])
docker.errors.BuildError: Error parsing reference: “%%BASE_IMAGE%%” is not a valid repository/tag: invalid reference format
18-01-04 08:05:22 INFO (SyncWorker_2) [hassio.dock.addon] Start build b794684e/amd64-addon-hass-configurator:0.1.1
18-01-04 08:05:23 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py”, line 410, in start
resp = yield from self._request_handler(request)
File “/usr/lib/python3.6/site-packages/aiohttp/web.py”, line 325, in _handle
resp = yield from handler(request)
File “/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py”, line 93, in impl
return (yield from handler(request))
File “/usr/lib/python3.6/site-packages/hassio/api/util.py”, line 33, in wrap_api
answer = await method(api, *args, **kwargs)
File “/usr/lib/python3.6/site-packages/hassio/addons/addon.py”, line 515, in install
if not await self.docker.install(self.last_version):
File “/usr/lib/python3.6/site-packages/hassio/dock/util.py”, line 18, in wrap_api
return await method(api, *args, **kwargs)
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/hassio/dock/addon.py”, line 251, in _install
return self._build(tag)
File “/usr/lib/python3.6/site-packages/hassio/dock/addon.py”, line 264, in _build
image = self.docker.images.build(**build_env.get_docker_args(tag))
File “/usr/lib/python3.6/site-packages/docker/models/images.py”, line 179, in build
raise BuildError(chunk[‘error’])
docker.errors.BuildError: Error parsing reference: “%%BASE_IMAGE%%” is not a valid repository/tag: invalid reference format
The Configurator has become a part of the official repository for hass.io addons. My repository is not maintained anymore. The official repository can be found at: https://github.com/home-assistant/hassio-addons
I have this installed through Hass.io, but I’m a bit confused as to how the GIT options work.
I’d assumed that it’s used to commit and push to my own repository for an easy backup, but I can’t see anywhere to enter my github details, and when I try a commit anyway it complains (obviously) about “could not read Username for https://github.com”
Is it possible to get this working or is it a remnant of some previous functionality?
It’s a feature primarily intended for the standalone version of the configurator. There you have shell access and can setup the remote manually, along with details needed for authentication.
However, in the menu on the top right you have an option called “execute shell command”. I have never tried it with hassio, but maybe adding a remote works from there as well.
I don’t know how well this works with GitHub though. I have a SSH based remote with Pubkey authentication and it works like a charm.
Well, as I’ve been pushing to git manually, I’ve already set up a repository etc in my config folder, and that does seem to be reflected in Configurator. I was also able to add a branch, and I can also commit through Configurator, it’s just push doesn’t work from the UI. If I SSH in and do a push, my commits through Configurator then go through,
Seems to be pretty close to working, just not quite…