441 lines
11 KiB
YAML
441 lines
11 KiB
YAML
esphome:
|
|
name: oekoboiler-interface
|
|
friendly_name: Oekoboiler Interface
|
|
|
|
esp8266:
|
|
board: nodemcuv2
|
|
|
|
# Enable logging
|
|
logger:
|
|
baud_rate: 0 # Disable UART logging since we're using it for Modbus
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
encryption:
|
|
key: !secret oekoboiler_api_key
|
|
|
|
ota:
|
|
- platform: esphome
|
|
password: !secret oekoboiler_ota_password
|
|
|
|
wifi:
|
|
ssid: !secret wifi_ssid
|
|
password: !secret wifi_password
|
|
|
|
# Enable fallback hotspot
|
|
ap:
|
|
ssid: "Oekoboiler Fallback"
|
|
password: !secret oekoboiler_fallback_password
|
|
|
|
captive_portal:
|
|
|
|
web_server:
|
|
port: 80
|
|
|
|
# UART configuration for Modbus (0-based register addressing)
|
|
uart:
|
|
id: mod_bus
|
|
tx_pin: GPIO1 # D10/TX
|
|
rx_pin: GPIO3 # D9/RX
|
|
baud_rate: 9600
|
|
stop_bits: 1
|
|
data_bits: 8
|
|
parity: NONE
|
|
|
|
# Modbus RTU
|
|
modbus:
|
|
flow_control_pin: GPIO5 # D1 - DE/RE pin for MAX485
|
|
id: modbus1
|
|
send_wait_time: 200ms
|
|
|
|
modbus_controller:
|
|
- id: oekoboiler
|
|
address: 0x1
|
|
modbus_id: modbus1
|
|
setup_priority: -10
|
|
update_interval: 10s
|
|
command_throttle: 200ms
|
|
|
|
# Sensors
|
|
sensor:
|
|
# WiFi Signal
|
|
- platform: wifi_signal
|
|
name: "Oekoboiler WiFi Signal"
|
|
update_interval: 60s
|
|
|
|
# Uptime
|
|
- platform: uptime
|
|
name: "Oekoboiler Uptime"
|
|
update_interval: 60s
|
|
|
|
# Temperature Sensors (Input Registers 3x) - 0-based addressing
|
|
# A1 - Water Temperature (30001 -> register 1)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Water Temperature"
|
|
address: 1
|
|
register_type: read
|
|
value_type: S_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
state_class: measurement
|
|
accuracy_decimals: 1
|
|
filters:
|
|
- multiply: 0.1
|
|
|
|
# A2 - Evaporator Temperature (30002 -> register 2)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Evaporator Temperature"
|
|
address: 2
|
|
register_type: read
|
|
value_type: S_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
state_class: measurement
|
|
accuracy_decimals: 1
|
|
filters:
|
|
- multiply: 0.1
|
|
|
|
# A4 - Ambient Temperature (30003 -> register 3)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Ambient Temperature"
|
|
address: 3
|
|
register_type: read
|
|
value_type: S_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
state_class: measurement
|
|
accuracy_decimals: 1
|
|
filters:
|
|
- multiply: 0.1
|
|
|
|
# A3 - Exhaust Temperature (30004 -> register 4)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Exhaust Temperature"
|
|
address: 4
|
|
register_type: read
|
|
value_type: S_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
state_class: measurement
|
|
accuracy_decimals: 1
|
|
filters:
|
|
- multiply: 0.1
|
|
|
|
# A9 - Return Gas Temperature (30005 -> register 5)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Return Gas Temperature"
|
|
address: 5
|
|
register_type: read
|
|
value_type: S_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
state_class: measurement
|
|
accuracy_decimals: 1
|
|
filters:
|
|
- multiply: 0.1
|
|
|
|
# Holding Registers (4x) - 0-based addressing
|
|
# Set Temperature PV (40009 -> register 9)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Set Temperature PV"
|
|
address: 9
|
|
register_type: holding
|
|
value_type: U_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
state_class: measurement
|
|
|
|
# Set Temperature Normal (40010 -> register 10)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Set Temperature Normal"
|
|
id: set_temp_normal
|
|
address: 10
|
|
register_type: holding
|
|
value_type: U_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
state_class: measurement
|
|
|
|
# Set Temperature at F62=0 (40011 -> register 11)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Set Temperature F62"
|
|
address: 11
|
|
register_type: holding
|
|
value_type: U_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
state_class: measurement
|
|
|
|
# Temperature Delta/Hysteresis (40012 -> register 12)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Temperature Delta"
|
|
id: temp_delta
|
|
address: 12
|
|
register_type: holding
|
|
value_type: U_WORD
|
|
unit_of_measurement: "°C"
|
|
|
|
# Maximum Temperature with Heat Pump (40014 -> register 14)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Max Temperature Heat Pump"
|
|
address: 14
|
|
register_type: holding
|
|
value_type: U_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
|
|
# Compressor Delay (40021 -> register 21)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Compressor Delay"
|
|
address: 21
|
|
register_type: holding
|
|
value_type: U_WORD
|
|
unit_of_measurement: "min"
|
|
|
|
# Controller Status (41102 -> register 1102)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Controller Status Raw"
|
|
id: controller_status_raw
|
|
address: 1102
|
|
register_type: holding
|
|
value_type: U_WORD
|
|
internal: true
|
|
|
|
# Operating Mode (41105 -> register 1105)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Mode Raw"
|
|
id: mode_raw
|
|
address: 1105
|
|
register_type: holding
|
|
value_type: U_WORD
|
|
internal: true
|
|
|
|
# Model (41001 -> register 1001)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Model"
|
|
address: 1001
|
|
register_type: holding
|
|
value_type: U_WORD
|
|
|
|
# Software Version (41002 -> register 1002)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Software Version"
|
|
address: 1002
|
|
register_type: holding
|
|
value_type: U_WORD
|
|
|
|
# Binary Sensors
|
|
binary_sensor:
|
|
# Connection status
|
|
- platform: status
|
|
name: "Connection Status"
|
|
|
|
# Digital Outputs (Coils 0x) - 0-based addressing
|
|
# Compressor (00001 -> coil 1)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Compressor Running"
|
|
address: 1
|
|
register_type: coil
|
|
device_class: running
|
|
|
|
# Heating Element (00002 -> coil 2)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Heating Element"
|
|
address: 2
|
|
register_type: coil
|
|
device_class: heat
|
|
|
|
# Four-way Valve (00003 -> coil 3)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Four-way Valve"
|
|
address: 3
|
|
register_type: coil
|
|
|
|
# Fan (00004 -> coil 4)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Fan Running"
|
|
address: 4
|
|
register_type: coil
|
|
device_class: running
|
|
|
|
# Digital Inputs (Discrete Inputs 1x) - 0-based addressing
|
|
# A6 - Heating Element Overheat (10006 -> discrete input 6)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Heating Element Overheat"
|
|
address: 6
|
|
register_type: discrete_input
|
|
device_class: problem
|
|
|
|
# A5 - Compressor High Pressure (10007 -> discrete input 7)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "High Pressure Alarm"
|
|
address: 7
|
|
register_type: discrete_input
|
|
device_class: problem
|
|
|
|
# A8 - Condensate Overflow (10008 -> discrete input 8)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Condensate Overflow"
|
|
address: 8
|
|
register_type: discrete_input
|
|
device_class: problem
|
|
|
|
# Text Sensors
|
|
text_sensor:
|
|
# Controller Status Text
|
|
- platform: template
|
|
name: "Controller Status"
|
|
lambda: |-
|
|
int status = (int)id(controller_status_raw).state;
|
|
switch(status) {
|
|
case 0: return {"Power Off"};
|
|
case 1: return {"Standby"};
|
|
case 2: return {"Preheating"};
|
|
case 3: return {"Heating"};
|
|
case 4: return {"Before Defrost"};
|
|
case 5: return {"Defrosting"};
|
|
case 6: return {"After Defrost"};
|
|
case 8: return {"Alarm"};
|
|
default: return {"Unknown (" + to_string(status) + ")"};
|
|
}
|
|
|
|
# Operating Mode Text
|
|
- platform: template
|
|
name: "Operating Mode"
|
|
lambda: |-
|
|
int mode = (int)id(mode_raw).state;
|
|
switch(mode) {
|
|
case 0: return {"Econ Mode"};
|
|
case 1: return {"Auto Mode"};
|
|
case 2: return {"Heater Mode"};
|
|
default: return {"Unknown (" + to_string(mode) + ")"};
|
|
}
|
|
|
|
# Switches
|
|
switch:
|
|
# PV Mode (40067 -> register 67)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "PV Mode"
|
|
address: 67
|
|
register_type: holding
|
|
bitmask: 1
|
|
entity_category: config
|
|
icon: "mdi:solar-power"
|
|
|
|
# Heating Element Enable (40015 -> register 15)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Heating Element Enable"
|
|
address: 15
|
|
register_type: holding
|
|
bitmask: 1
|
|
entity_category: config
|
|
icon: "mdi:heating-coil"
|
|
|
|
# Heating Element for Sterilization (40017 -> register 17)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Sterilization Enable"
|
|
address: 17
|
|
register_type: holding
|
|
bitmask: 1
|
|
entity_category: config
|
|
|
|
# Number Controls
|
|
number:
|
|
# Set Temperature Normal (40010 -> register 10)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Target Temperature"
|
|
address: 10
|
|
value_type: U_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
min_value: 5
|
|
max_value: 70
|
|
step: 1
|
|
mode: box
|
|
use_write_multiple: true
|
|
entity_category: config
|
|
|
|
# Set Temperature PV (40009 -> register 9)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Target Temperature PV"
|
|
address: 9
|
|
value_type: U_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
min_value: 5
|
|
max_value: 70
|
|
step: 1
|
|
mode: box
|
|
use_write_multiple: true
|
|
entity_category: config
|
|
|
|
# Temperature Delta (40012 -> register 12)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Temperature Hysteresis"
|
|
address: 12
|
|
value_type: U_WORD
|
|
unit_of_measurement: "°C"
|
|
min_value: 1
|
|
max_value: 20
|
|
step: 1
|
|
mode: box
|
|
use_write_multiple: true
|
|
entity_category: config
|
|
icon: "mdi:thermometer-lines"
|
|
|
|
# Ambient Temperature Shutdown (40013 -> register 13)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Heat Pump Shutdown Temperature"
|
|
address: 13
|
|
value_type: S_WORD
|
|
unit_of_measurement: "°C"
|
|
device_class: temperature
|
|
min_value: -10
|
|
max_value: 5
|
|
step: 1
|
|
mode: box
|
|
use_write_multiple: true
|
|
entity_category: config
|
|
|
|
# Sterilization Cycle (40018 -> register 18)
|
|
- platform: modbus_controller
|
|
modbus_controller_id: oekoboiler
|
|
name: "Sterilization Cycle Hours"
|
|
address: 18
|
|
value_type: U_WORD
|
|
unit_of_measurement: "hours"
|
|
min_value: 1
|
|
max_value: 990
|
|
step: 1
|
|
mode: box
|
|
use_write_multiple: true
|
|
entity_category: config |