Would like to share my OpenHAB architecture with the community.
Maybe useful to shorten the learning curve for finding the right architecture or share other approaches.
- Use case
- Had OpenHAB working for some years already with a separate wallbox. This wallbox has a Modbus/TCP interface but was never attached to OpenHAB
- New solar installation with E3DC S10X wanted to be integrated
- Collected various rules in different programming languages
- Hardware
- E3DC S10X with battery + solar panels
- ESL Wallbox “Walli Light 11/22 KW” with Phoenix Contact Modbus controller (specific item EV-CC-AC1-M3-CBC-RCM-ETH)
- Tasks
- Attaching the wallbox via modbus. Why?
The wallbox was seen as a regular appliance like any other bulb, so it discharged the battery quickly and didn´t allow specific controlling. - I wanted to establish two charging modes (100% from grid or surplus charging). Surplus means charging, if battery SOC already reached 100% and house consumes less than solar panels produce. A key inside the wallbox was used to distinguish between these modes
- I wanted to stop E3DC from discharging, once mode “100% from grid” is chosen
- Mode “surplus” means adjusting load current between 6 to 16A (or no charging at all), depending on available energy
- Modbus is a good choice for the wallbox
- rscp2mqtt is better than Modbus for controlling the E3DC device. After checking Modbus interface, it turned out that reading lots of values is fine, but E3DC doesn´t want the device to be written with e.g. “stop discharging” or “get x kWh as emergency buffer”. Exactly here the RSCP protocol is the better choice. As the E3DC device is also connected via Ethernet TCP/IP, I checked various bindings. Finally, as of writing this text, rscp2mqtt has been chosen as a stable MQTT solution with all I need. Check with Windows GUI, if you want
- Architecture
- Synology NAS with virtual machine+docker support
- New Debian 12.4 VM
– openHAB installed via “apt” to be close to system level. E.g., exec binding doesn´t like living in a sandbox
– Installed docker with following containers
– MariaDB for storing item states
– phpmyadmin to administer the OpenHAB database
– mosquitto for message queueing
– rscp2mqtt for E3DC RSCP connection in/out
– portainer to administer the containers
– frontail to ease logging for openhab.log and events.log via web - OpenHAB rules migrated to current ECMA Javascript
- Wallbox via OpenHAB Modbus binding
- Attached, but out of scope for this text
– Logamax plus GB162 15GkW gas heating via KM200 binding
– KNX with 30 devices, managed via ETS6
– Panasonic “Etherea” air conditioning with KNX interfaces
– Paul Novus 300 ventilation system with KNX interfaces
– Heating control valves
– Washing machine final state machine
– Network UPS
– NTP time
– Tasmota WiFi sockets to measure power and energy
– OpenWeather One Call API
– Blinds, lights, compressor, garage door opener+status via KNX
– Temperature sensors, presence detection
– E3DC visu via widget
- How it looks like today
Yes, it´s programmers level and not state-of-the art UX
- Outlook
- Surplus charging. I´m currently working on an object model with classes for constant or dynamic devices. Like wallbox, Tasmota devices.
- Buy a electricity meter for my wallbox