Awesome, that worked! Nice insight @rpitera! Thank you.
EASY INSTALL AND BOOT INSTRUCTIONS
For anyone like me and @SmartValley who are trying to get “Simplistic Configurator” installed and booting on startup and having a hard time. I’ve simplified the steps to as below. Boot is done by installing SUPERVISOR, thanks to @xstrex for the tips. Massive thanks to @danielperna84 for actually making this plugin. It’s AWESOME!
GITHUB Repository (if you’re after future versions of configurator): https://github.com/danielperna84/hass-configurator
How to Install "Simplistic Configuration UI"
Note: The files I’ve configured are for a HASSBIAN installation of Home Assistant. If you have installed HASS using another method your folder locations may be different. To use these steps simply update the 2 CONF files in the ZIP file to reflect your locations.
-
Copy the “Configurator” folder from this ZIP File to your HASS Folder “/home/homeassistant/.homeassistant/”.
-
Add the below to your HASS “configuration.yaml” file. Update your IP Address to reflect your own.
add to your configuration.yaml:
panel_iframe:
configurator:
title: Configurator
icon: mdi:wrench
url: http://192.168.86.127:3218
-
modify the “/home/homeassistant/.homeassistant/configurator/settings.conf” to have a password you’re after. Also add your HASS password as this will allow you to reload configs and restart HASS from the configurator. Refer to https://github.com/danielperna84/hass-configurator
-
In Terminal run “sudo apt install supervisor” to install SUPERVISOR
-
Run “sudo cp -b /home/homeassistant/.homeassistant/configurator/hass-configurator.conf /etc/supervisor/conf.d/hass-configurator.conf” to copy the SUPERVISOR startup configuration to the correct location for boot.
-
Run “sudo service supervisor enable” to enable SUPERVISOR service
-
Run “sudo service supervisor start” to start the SUPERVISOR service which will start configurator on boot
Hi,
For some reason I can’t get the systemd service to run, running sudo ./configurator.py, it works as intended (Great!).
However running the systemd file (hass-poc-configurator.systemd) I get asked to enter pass, but then I get:
Failed to enable unite: file hass-poc-configurator.systemd.servicec: No such file or direcotry
Not great! I noticed that systemd is suffixing .service to the file, so I tried renaming to hass-poc-configurator.service, and this gets enabled in systemd:
Created symlink /etc/systemd/system/multi-user-target.wants/hass-poc-configurator.service > /etc/systemd/system/hass-poc-configurator.service
despite the service running, (I can see it with systemctl status hass-poc-configurator.service
) the page doesn’t run - while this service is running in systemd, I again run sudo ./configurator.py
expecting it to conflict (it should already be running right?) but no it runs again and all works again…
So something is up with my systemd and I am not sure why… why doesn’t it accept the .systemd file type? (should it?) and why isn’t it running when it’s done as a .service despite saying it’s running??
in the file I have:
[Unit]
Description=Hass-Poc-Configurator
After=network.target[Service]
Type=simple
#Set the path to your configurator.py location
ExecStart=/usr/bin/python3 /home/homeassistant/.homeassistant/configurator.py[Install[
WantedBy=multi-user/target
Forget me, I enabled it, forgot to START it… I would have thought reload would do that but apparently not?
Captain Comedy AWAAAAY!
Forgot to mention:
Meanwhile we are at 0.1.9. Here the changelogs:
0.1.8:
- UI fix (git add button was broken)
- Link to repository was broken
- Removed “poc” from some old links
- Added IGNORE_PATTERN option
0.1.9:
- Updated external libraries
docker, I should how to do?
admin@Synology:/volume1/docker/home-assistant$ sudo chmod 755 configurator.py
Password:
admin@Synology:/volume1/docker/home-assistant$ sudo ./configurator.py
sudo: unable to execute ./configurator.py: No such file or directory
I don’t use Docker, but as far as I know you can just do a docker pull tboyce021/hass-configurator
and run the container. The Docker version is maintained by @tboyce1. Maybe he can give you more advice.
It is possible to prohibit the access to some files (eg secrets.yaml)?
You can use the IGNORE_PATTERN setting for that. Technically the configurator would still be able to open the file, but it will be hidden from the filebrowser.
Hey what ip should i use for the panel iframe url?
That depends on your setup. If the machine it is running on has the IP 1.2.3.4, then that is the IP you’ll have to use. An exception would be if you are runnning it within Docker. In that case you would probably use the IP of the Host running the container.
This project is brilliant. As a newbie to Hass I’m always making config errors - which cause the whole system to error and not load! This addon means I can still remotely edit out my errors to get it running again. The only thing I really need is the ability to reboot. I’ve tried using the shell execute but nothing seems to happen (I guess it needs sudo). Sudo doesn’t work at all - I guess that’s a security thing.
So - my Hass environment hasn’t come up after a reboot and the restart Hass therefore won’t work. Is there a way I can reboot without having to go to the box and unplug/replug?
Many thanks, Duncan
That depends on how the system is set up. But rebooting usually won’t work because the user who is running the configurator shouldn’t have the privilege to do so. So if you haven’t set up SSH access, then doing it locally at the machine is probably the easiest solution.
Hmm - I thought that might be the case. Thanks anyway - and thank you for such a brilliant tool! Without it I may have given up on Hass (the config has been a nightmare). I now feel like I’m getting somewhere with it.
Duncan
danielperna84
First of all thank you for the fantastic tool. I’ve implemented in my PI and I wish I’d seen it 2 months ago when i started.
One feedback comment:
On the “keeping configurator running section” I used option 2 (for my Pi). The template file has to end with .service as opposed to .systemd. I tried enabling per the HASS instruction, which is type “sudo systemctl enable HASS-PoC-Configurator.systemd” and didnt recognise the command. I changed the file extension to .service, re-enabled and worked fine
Thank you again!
Yes, technically it’s the incorrect extension. The way this was thought to be was to differentiate between the different implementations (systemd, supervisor, possibly init.d if someone takes care of it). But they should be renamed anyway, since it doesn’t need PoC in the name anymore. If just I weren’t so lazy.
Daniel, thank you. I’ve limited “coding” knowledge so appreciate the explanation. I discovered it the hard way, trial and error
One question, I’m running it on Hassbian so config is /home/homeassistant/.homeassistant.
Would that have any bearing on the restart, upload, etc menu in your configurator? If I press restart Hass i get “object, object” and nothing happens.
I guess i don’t understand this stuff… trying to install in hassbian
i get this with default configuration:
pi@hassbian:/home/homeassistant/.homeassistant $ sudo ./configurator.py /home/homeassistant/.homeassistant/configuratorsettings.conf
INFO:2017-09-26 13:59:08,197:__main__:Starting server
Traceback (most recent call last):
File "./configurator.py", line 3586, in <module>
main(sys.argv[1:])
File "./configurator.py", line 3570, in main
HTTPD = HTTPServer(server_address, Handler)
File "/usr/lib/python3.4/socketserver.py", line 429, in __init__
self.server_bind()
File "/usr/lib/python3.4/http/server.py", line 133, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/lib/python3.4/socketserver.py", line 440, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
What have i done wrong?
this happened to me when I had started it once and closed the session without ctrl+c. I then tried running it and got the same error.
I ctrl +c, the system restarted HA, went back to …/.homeassistant and run the command.
Try it.
That error came up when I ran it the first time…
EDIT: after rebooting it runs now’s! Thanks @juan11perez
Now I need to autorun it.