-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
EVCC Heizstab‐Ansteuerung mit Shelly 2‐Kanal‐Relais
unikinCK edited this page Feb 10, 2026
·
5 revisions
Dieses Setup integriert einen Warmwasser-Heizstab als steuerbare Last in EVCC, indem ein Shelly Pro 2 (2-Kanal-Relais) über HTTP angesprochen wird.
Der Heizstab wird stufig (0 / 1 / 2 Heizkreise) abhängig von der von EVCC angeforderten Stromstärke geschaltet.
Verwendete Komponenten:
- EVCC Custom Charger
- Shell-Skripte als Steuer- und Status-Backend
- Direkte HTTP-API des Shelly
- Zwei Relaiskanäle zur Leistungsstaffelung
Ziel ist es, PV-Überschuss sinnvoll in Warmwasser umzuwandeln.
EVCC
└── Custom Charger (heating)
├── status.sh → Heizstatus (bereit / aktiv)
├── enabled.sh → Aktiv-Status
├── enable.sh → Globales Ein/Aus
└── maxcurrent.sh → Leistungsstufen → Relais 0 / 1
↓
Shelly Pro 2 (HTTP API)
↓
Heizstab (3 Phasen)
chargers:
- name: shelly-heizstab
type: custom
features:
- integrateddevice
- heating
icon: waterheater
status:
source: script
cmd: /etc/evcc/scripts/status.sh
enabled:
source: script
cmd: /etc/evcc/scripts/enabled.sh
enable:
source: script
cmd: /etc/evcc/scripts/enable.sh {{ .enable }}
maxcurrent:
source: script
cmd: /etc/evcc/scripts/maxcurrent.sh {{ .maxcurrent }}
vehicles:
- name: heizstab_temp
title: heizstab
type: custom
capacity: 65
soc:
source: http
uri: http://192.168.0.126/status
method: GET
jq: .ext_temperature."0".tC
- Gerät: Shelly Pro 2
- IP-Adresse:
192.168.0.193
HTTP Endpunkte
/relay/0?turn=on|off/relay/1?turn=on|off
Statusabfrage
/relay/0/relay/1
#!/bin/sh
r0=$(wget -qO- http://192.168.0.193/relay/0 | grep -o '"ison": true')
r1=$(wget -qO- http://192.168.0.193/relay/1 | grep -o '"ison": true')
if [ -n "$r0" ] || [ -n "$r1" ]; then
echo true
else
echo false
fi#!/bin/sh
if [ "$1" = "false" ]; then
wget -qO- "http://192.168.0.193/relay/0?turn=off"
wget -qO- "http://192.168.0.193/relay/1?turn=off"
fi#!/bin/sh
s0=$(wget -qO- http://192.168.0.193/relay/0 | grep -o '"ison": true')
s1=$(wget -qO- http://192.168.0.193/relay/1 | grep -o '"ison": true')
if [ -n "$s0" ] || [ -n "$s1" ]; then
echo C # Heizen aktiv
else
echo B # Bereit
fi#!/bin/sh
CURRENT=$1
less_than() {
echo "$CURRENT < $1" | awk '{ if ($1 < $3) exit 0; else exit 1 }'
}
if less_than 2; then
wget -qO- "http://192.168.0.193/relay/0?turn=off"
wget -qO- "http://192.168.0.193/relay/1?turn=off"
elif less_than 4; then
wget -qO- "http://192.168.0.193/relay/0?turn=off"
wget -qO- "http://192.168.0.193/relay/1?turn=on"
elif less_than 6; then
wget -qO- "http://192.168.0.193/relay/0?turn=on"
wget -qO- "http://192.168.0.193/relay/1?turn=off"
else
wget -qO- "http://192.168.0.193/relay/0?turn=on"
wget -qO- "http://192.168.0.193/relay/1?turn=on"
fi| EVCC Strom | Relais 0 | Relais 1 | Heizleistung |
|---|---|---|---|
| < 2 A | aus | aus | 0 % |
| 2–4 A | aus | an | ca. 50 % |
| 4–6 A | an | aus | ca. 66 % |
| > 6 A | an | an | 100 % |