This project is very much a work in progress, but here's a rough idea of what it looks like at the moment:
https://hub.docker.com/r/harvtronix/home-assistant-graphite-ui
To run the project as a Docker container, pull the image and start it with a command like this:
docker run -tid \
--name "graphite" \
--restart unless-stopped \
--network host \
--env GRAPHITE_HA_SERVER="uri.of.your.home.assistant.server:8123" \
--env GRAPHITE_HA_AUTH_TOKEN="generated_long_living_home_assistant_access_token" \
harvtronix/home-assistant-graphite-ui:latest
To run the project locally, you'll need to install Node.js (preferably Node 14 or higher).
Create a .env
file with the following environment variables:
GRAPHITE_HA_SERVER="uri.of.your.home.assistant.server:8123"
GRAPHITE_HA_AUTH_TOKEN="generated_long_living_home_assistant_access_token"
Run npm install
from the project dir.
Run npm run dev-server
to run the UI and have it connect to the home assistant server specified in the .env
file.
If you want to run against a test server, you can run npm run dev-db
to start a json-backed database with whatever data you want. In the __dev__
folder there are two files named db-services.js
and db-states.js
which contain some sample data scraped from the APIs of a home assistant server. You can modify or replace this with your own data for testing. The express server that backs the json database supports a couple basic operations like toggle
, turn_off
, turn_on
, lock
, and unlock
, but can be easily extended to support more.