pail23 / energy-assistant-backend

MIT License
2 stars 1 forks source link

Energy Assistant

Energy Assistant is a free, opensource Energy Management System which works together with Home Assistant and Evcc.

Energy Assistant is using Emhass in order to optimize the energy consumption of your house.

Documentation and support

For issues, please go to the issue tracker.

For feature requests, please see feature requests.

Running the Energy Assistant

Preferred method: Home Assistant Add-on

By far the most convenient way to run the Energy Assistant is to install the Energy Assistant Add-on:

  1. Add the Energy Assistant repository to your Home Assistant instance.
  2. Install the Energy Assistant add-on.

Add repository on my Home Assistant

Alternative method: Docker image

An alternative way to run the Energy Assistant is by running the docker image:

Copy the energy_assistant.yaml.dist file to energy_assistant.yaml and modify it to match your setup and then start the docker container in the same folder.

docker run --name em -p 8080:5000 -v "$(pwd)/energy_assistant.yaml:/config/energy_assistant.yaml" ghcr.io/pail23/energy-assistant-server:latest

Configure Energy Assistant

Please find information on how to configure Energy Assistant here.

User documentation

Please consult the user documentation for Energy Assistant.

Local Development

The easiest way to get started with development is to use Visual Studio Code with devcontainers. This approach will create a preconfigured development environment with all the tools you need. This approach is enabled for the Energy Assistant frontend and the Energy Assistant backend repository. Learn more about devcontainers.

Getting started:

  1. Go to Energy Assistant backend repository and click "fork".
  2. Clone the forked repository locally (git clone ...)
  3. Open the devcontainer in VSCode
  4. Copy energy_assistan.yaml.dist to energy_assistan.yaml and configure your setup (e.g. connection to Home Assistant)
  5. Press F5 to start Energy Assistant
  6. Go to Energy Assistant frontend repository and click "fork".
  7. Clone the forked repository locally (git clone ...)
  8. Open the devcontainer in VSCode
  9. Enter yarn install and then yarn dev in the Terminal of VSCode

Useful commands:

./scripts/lint.sh run the linter to check the code quality.

./scripts/create-dev-db.sh create a new database in the root folder of the project.