HEMS is a Home Energy Management System that lets you monitor, configure and automate energy management for various devices like: Smart meter, Charge point/EVSE, Solar Panels.
Currently supported hardware:
Type | Model |
---|---|
Charge Point | Alfen NG9xx (Eve Single S-line/Eve Single Pro-line/Eve Double Pro-line) |
Smart meter | P1 v5 |
Solar Panels | Enphase Envoy Gateway |
Docker containers with HEMS (beta/feature) builds.
Currently available for the following platforms:
Operating system | Architecture |
---|---|
Linux | amd64 |
Linux | arm |
Linux | arm64 |
Docker repository: https://hub.docker.com/repository/docker/pieterhil/energy-management-system
The recommended method is to use Docker compose (See below). For instructions how to install docker desktop see https://docs.docker.com/desktop/ and docker engine (server) see https://docs.docker.com/engine/install/.
mkdir hems
cd hems
mkdir config
create config.json and a NLog.config in the 'config' subfolder. You can find examples of these in this repository folder docker/tests/config/
docker-compose.yml
version: '3.8'
services:
hems:
image: pieterhil/energy-management-system:latest
container_name: hems
user: 1001:123
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./config:/app/ems/userdata
environment:
- TZ=Europe/Amsterdam
- EMS_PATHS_CONFIG=/app/ems/userdata/config.json
- EMS_PATHS_NLOG=/app/ems/userdata/NLog.config
You can use the following two options to start the container:
docker-compose up -d
or
docker compose up -d
docker-compose pull pieterhil/energy-management-system:latest
docker-compose down
docker-compose up -d --remove-orphans
docker image prune
Get the latest image from the repository:
docker pull pieterhil/energy-management-system:latest
Remove any old containers from the system that where left over from a previous run.
docker container rm hems
docker run \
-p 8080:8080 \
--mount type=bind,source="$(pwd)"/config,destination=/app/ems/userdata \
--user 1001:123
-e TZ=Europe/Amsterdam \
-e EMS_PATHS_CONFIG=/app/ems/userdata/config.json \
-e EMS_PATHS_NLOG=/app/ems/userdata/NLog.config \
--name=hems \
pieterhil/energy-management-system:latest
The application does as user 'app' inside the docker container. For some systems it is mandatory that this user has write access to the volume so that logfiles and the databse can be saved. Some operating systems this is nod needed. For instance macOS is able to write in the mounted volume. It is recommended always to supply a user and group id that has write access to the local storage. You can do this in the docker-compose.yml file, or Some background information and other strategies for handling this issue can be found at the following blog post: Docker and the Host Filesystem Owner Matching Problem and can also be found at The Internet Archive WayBackMachine
The frontend is accessible using the browser http://127.0.0.1:8080 if you are running the docker on you own local system.
We'd love to get contributions from you! Take a look at the
Contribution Documents
to see how to setup a development environment and to get your changes merged in.
Distributed under the BSD 3-Clause license. See LICENSE
for more information.