A web-based editor for home assistant based on the Monaco editor.
The editor is made to be run on the same system as home assistant and presented as a panel inside of the webpage of home assistant.
Discussion at: https://community.home-assistant.io/t/web-based-editor/32051
As of now the editor is served with nodejs.
Install docker, for RaspberryPi see https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/
Fetch the docker image
sudo docker pull voxic/ha-editor
Go to the location of home assistant configuration and start the docker container.
cd /location_of_homeassistant_configfiles
sudo docker run -d -p 3000:3000 --mount type=bind,source="$(pwd)"/,target=/usr/src/app/configFolder voxic/ha-editor
Edit configuration.yaml and add the following:
# Enable the editor panel
panel_iframe:
editor:
title: 'Editor'
url: 'http://xxx.xxx.xxx.xxx:3000' #IP to your home assistant
icon: mdi:book-open
Restart Home assistant
Make sure that you can run node and npm.
Clone this repo.
git clone https://github.com/voxic/ha-editor.git
Go in to the folder and install NPM modules
cd ha-editor
npm install
Edit app.js and the variable baseDir
to point to the folder where you home assistant config files are located.
let baseDir = "configFolder"
Edit configuration.yaml and add the following:
# Enable the editor panel
panel_iframe:
editor:
title: 'Editor'
url: 'http://xxx.xxx.xxx.xxx:3000' #IP to your home assistant
icon: mdi:book-open
Restart home assistant and start the web-editor
cd ha-editor
node app.js
Enjoy!
- Monaco-editor
- Bootstrap
- Express
- EJS
- Jquery
- Emil Nilsson - voxic
This project is licensed under the MIT License - see the LICENSE for details.