This is a supercool and easy way to edit your files from Home Assistant. I have been juggling windows which isn’t bad but for remote work, a web interface is really nice.
WARNING: I am running HASS as root and this is not the recommended setup
Here is a screenshot of the final product:
The initial steps are pretty easy.
Get the configurator and put the configurator.py file in your homeassistant directory. In my case, it’s .homeassistant
Edit the configurator file if you need to put in the basepath and password:
Code for configurator.py file:
# Set BASEPATH to something like "/home/hass/.homeassistant/" if you're not running the
# configurator from that path
BASEPATH = "/root/.homeassistant/"
# If a password is required to access the API, set it in the form of “password”
# if you have HA ignoring SSL locally this is not needed if on same machine.
HASS_API_PASSWORD = “PASSWORD”
When you do this, You’ll find that the file runs in the foreground and it should be present after you add an iframe to the config (I have a love hate relationship with the iframe module, this is the first time it’s been useful to me).
Code for configuration.yaml file:
NB: On my dev server, I set this to loopback 127.0.0.1 and it worked fine.
If you’re storing secrets like a HASS API password, you probably want to ignore configurator.py from your GIT backups.
Making the configurator.py run as a service:
navigate to /etc/systemd/system
That file should look like this
#Set the path to your configurator.py location
exit nano, saving it.
Then do the magic to make it a system service with autostart.
sudo systemctl --system daemon-reload
sudo systemctl enable firstname.lastname@example.org
sudo systemctl start email@example.com
sudo systemctl status firstname.lastname@example.org