Correct grammar and improve clarity

This commit is contained in:
J 2019-09-06 10:51:02 -05:00 committed by GitHub
parent 3432edce30
commit fed4661146
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,8 +6,8 @@ redirect_from: /ecosystem/hass-configurator/
### Configuration UI for Home Assistant
Since there currently is no nice way to edit the yaml-files Home Assistant is using through the frontend, here is a small webapp that hopefully makes the configuration easier. It is a customized and embedded [Ace editor](https://ace.c9.io/), which has syntax highlighting for yaml, the format used for Home Assistants configuration files. There is an integrated file browser to select whatever file you want to edit. When you're done with editing the file, click the save-button and it will replace the original.
Essentially this is a browser-based alternative to modifying your configuration through SSH, Windows + SMB, Github etc..
Since there is currently no nice way to edit the YAML files Home Assistant is using through the frontend, here is a small webapp that hopefully makes configuration easier. It is a customized and embedded [Ace editor](https://ace.c9.io/), which has syntax highlighting for YAML, the format used for Home Assistant's configuration files. There is also an integrated file browser to select whatever file you want to edit. When you're done editing the file, simply click the save button and your changes will be applied.
This is essentially a browser-based alternative to modifying your configuration through SSH, Windows + SMB, Github, etc.
<p class='img'>
<img src='/images/hassio/screenshots/addon-hass-configurator.png'>
@ -16,10 +16,10 @@ Screenshot of the HASS Configurator.
### Feature list
- Web-Based editor to modify your files
- Web-based editor to modify your files
- Upload and download files
- Git integration
- Lists of available triggers, events, entities, conditions and services. Selected element gets inserted into the editor at the last cursor position.
- List of available triggers, events, entities, conditions and services. Selected element gets inserted into the editor at the last cursor position.
- Check valid configuration and restart Home Assistant directly with the click of a button
- SSL support
- Optional authentication and IP filtering for additional security
@ -33,7 +33,7 @@ Consider running the configurator as a user with limited privileges to limit pos
</div>
### Installation (Linux, macOS)
There are no dependencies on Python modules that are not part of the standard library. And all the fancy JavaScript libraries are loaded from CDN (which means this doesn't work when you're offline).
There are no dependencies on Python modules that are not part of the standard library. All the fancy JavaScript libraries are loaded from CDN (which means this doesn't work when you're offline).
- Copy [configurator.py](https://github.com/danielperna84/hass-configurator/blob/master/configurator.py) to your Home Assistant configuration directory (e.g `/home/homeassistant/.homeassistant`): `wget https://raw.githubusercontent.com/danielperna84/hass-configurator/master/configurator.py`
- Make it executable: `sudo chmod 755 configurator.py`
- (Optional) Set the `GIT` variable in configurator.py to `True` if [GitPython](https://gitpython.readthedocs.io/) is installed on your system. This is required if you want to make use of the Git integration.
@ -41,8 +41,8 @@ There are no dependencies on Python modules that are not part of the standard li
- To terminate the process do the usual `CTRL+C`, maybe once or twice
### Configuration
Near the top of the `configurator.py`-file you will find some global variables you can change to customize the configurator. If you are unfamiliar with Python: when setting variables of the type _string_, you have to write that within quotation marks. The default settings are fine for just checking out the configurator quickly. With more customized setups you should change some settings though.
To keep your settings across updates it is also possible to save settings in an external file. In that case copy [settings.conf](https://github.com/danielperna84/hass-configurator/blob/master/settings.conf) wherever you like and append the full path to the file to the command when starting the configurator. e.g., `sudo .configurator.py /home/homeassistant/.homeassistant/mysettings.conf`. This file is in JSON format. So make sure it has a valid syntax (you can set the editor to JSON to get syntax highlighting for the settings). The major difference to the settings in the py-file is, that `None` becomes `null`.
Near the top of the `configurator.py` file you will find some global variables you can change to customize the configurator. When setting variables of the type _string_, the string must be within quotation marks. The default settings are fine for just checking out the configurator quickly. For more customized setups it might be advisable to change some settings.
To keep your settings across updates it is also possible to save settings in an external file. In that case copy [settings.conf](https://github.com/danielperna84/hass-configurator/blob/master/settings.conf) wherever you like and append the full path to the file to the command when starting the configurator. e.g., `sudo .configurator.py /home/homeassistant/.homeassistant/mysettings.conf`. This file is in JSON format, so make sure it has a valid syntax (you can set the editor to JSON to get syntax highlighting for the settings). The major difference to the settings in the .py file is that `None` becomes `null`.
#### LISTENIP (string)
The IP the service is listening on. By default it is binding to `0.0.0.0`, which is every interface on the system.
@ -70,20 +70,20 @@ Files and folders to ignore in the UI, e.g., `IGNORE_PATTERN = [".*", "*.log", "
If set to `True`, directories will be displayed at the top of the filebrowser.
#### GIT (bool)
Set this variable to `True` to enable Git integration. This feature requires [GitPython](https://gitpython.readthedocs.io)
to be installed on the system that is running the configurator. For technical reasons this feature can not be enabled with the static settings file.
to be installed on the system that is running the configurator. For technical reasons this feature cannot be enabled with the static settings file.
__Note regarding `ALLOWED_NETWORKS`, `BANNED_IPS` and `BANLIMIT`__:
The way this is implemented works in the following order:
1. (Only if `CREDENTIALS` is set) Check credentials
- Failure: Retry `BANLIMIT` times, after that return error 420 (unless you try again without any authentication headers set, e.g., private tab of your browser)
- Failure: Retry `BANLIMIT` times, after that return error 420 (unless you try again without any authentication headers set, such as in a private tab of your browser)
- Success: Continue
2. Check if client IP address is in `BANNED_IPS`
- Yes: Return error 420
- No: Continue
3. Check if client IP address is in `ALLOWED_NETWORKS`
- No: Return error 420
- Yes: Continue and display UI of configurator
- No: Return error 420
### Embedding into Home Assistant
Home Assistant has the [panel_iframe](/components/panel_iframe/) component. With this it is possible to embed the configurator directly into Home Assistant, allowing you to modify your configuration through the Home Assistant frontend.
@ -98,11 +98,11 @@ panel_iframe:
```
<div class='note warning'>
Be careful when setting up port forwarding to the configurator while embedding it into Home Assistant. If you don't restrict access by requiring authentication and / or blocking based on client IP addresses, your configuration will be exposed to the internet!
Be careful when setting up port forwarding to the configurator while embedding it into Home Assistant. If you don't restrict access by requiring authentication and/or blocking based on client IP addresses, your configuration will be exposed to the Internet!
</div>
### Daemonizing / Keeping the configurator running
Since the configurator script on its own is no service, you will have to take some extra steps to keep it running. Here are five options (for Linux), but there are more, depending on your usecase.
Since the configurator script on its own is not a service, you will have to take some extra steps to keep it running. Here are five options (for Linux), but there are more depending on your usecase.
1. Fork the process into the background with the command:
`nohup sudo ./configurator.py &`