Initial commit: EMS — Energie Management System
Complete self-consumption optimisation system for 7 kWp PV installation: - Prometheus collector (grid power, SOC, PV, per-phase, compressor) - Pure decision engine with SOC gates, hysteresis, priority ordering - Shelly Gen1/Gen2 actuator (SHA-256 Digest auth, PM power readback) - Viessmann OAuth2 client for DHW temperature control - PV forecast integration (forecast.solar) - Wallbox mutual exclusion (VX3 4.6 kW AC output constraint) - Car-not-charging detection via Shelly PM - Compressor idle → early SG-Ready release - Per-phase grid power for single-phase wallbox decisions - Manual override detection and web UI with override buttons - Full unit test coverage for decision engine - systemd service, Makefile, complete documentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
26
Makefile
Normal file
26
Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
BINARY := ems
|
||||
CONFIG := configs/ems-config.yaml
|
||||
|
||||
.PHONY: build test dry-run run install lint
|
||||
|
||||
build:
|
||||
go build -o $(BINARY) .
|
||||
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
dry-run: build
|
||||
./$(BINARY) -config $(CONFIG) -dry-run
|
||||
|
||||
run: build
|
||||
./$(BINARY) -config $(CONFIG)
|
||||
|
||||
install: build
|
||||
install -Dm755 $(BINARY) /usr/local/bin/$(BINARY)
|
||||
install -Dm644 $(CONFIG) /etc/ems/ems-config.yaml
|
||||
install -Dm644 systemd/ems.service /etc/systemd/system/ems.service
|
||||
systemctl daemon-reload
|
||||
@echo "Run: systemctl enable --now ems"
|
||||
|
||||
lint:
|
||||
go vet ./...
|
||||
Reference in New Issue
Block a user