esphome-configs/packages/modbus-boiler.yaml

225 lines
6.8 KiB
YAML

defaults:
sensor_name_prefix: ""
text_sensor:
## Trend Status ##
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Demand source
address: 0x0006
register_type: read
raw_encode: HEXBYTES
lambda: |-
uint16_t value = modbus_controller::word_from_hex_str(x, 0);
switch (value) {
case 0: return std::string("Unknown");
case 1: return std::string("No source demand");
case 2: return std::string("CH");
case 3: return std::string("DHW");
case 4: return std::string("Lead Lag slave");
case 5: return std::string("Lead Lag master");
case 6: return std::string("CH frost protection");
case 7: return std::string("DHW frost protection");
case 8: return std::string("No demand due to burner switch (register 199) turned off");
case 9: return std::string("DHW storage");
case 10: return std::string("Reserved");
case 11: return std::string("Warm weather shutdown");
case 12: return std::string("Hot standby");
}
return x;
## BURNER CONTROL STATUS ##
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Burner control status
address: 0x0020
register_type: read
raw_encode: HEXBYTES
lambda: |-
uint16_t value = modbus_controller::word_from_hex_str(x, 0);
switch (value) {
case 0: return std::string("Disabled");
case 1: return std::string("Locked out");
case 4: return std::string("Anti-short cycle");
case 5: return std::string("Unconfigured safety data");
case 34: return std::string("Standby Hold");
case 35: return std::string("Standby Delay");
case 48: return std::string("Normal Standby");
case 49: return std::string("Preparing");
case 50: return std::string("Ignition");
case 51: return std::string("Firing");
case 52: return std::string("Postpurge");
}
// Reserved
return x;
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Lockout code
address: 0x0022
register_type: read
raw_encode: HEXBYTES
lambda: |-
uint16_t value = modbus_controller::word_from_hex_str(x, 0);
switch (value) {
case 0: return std::string("No lockout");
// TODO: see Table 9
}
return x;
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Alarm reason
address: 0x0023
register_type: read
raw_encode: HEXBYTES
lambda: |-
uint16_t value = modbus_controller::word_from_hex_str(x, 0);
switch (value) {
case 0: return std::string("None");
case 1: return std::string("Lockout");
case 2: return std::string("Alert");
case 3: return std::string("Other");
}
return x;
## CENTRAL HEATING (CH) STATUS ##
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}CH status
address: 0x0040
register_type: read
raw_encode: HEXBYTES
lambda: |-
uint16_t value = modbus_controller::word_from_hex_str(x, 0);
switch (value) {
case 0: return std::string("Unknown");
case 1: return std::string("Disabled");
case 2: return std::string("Normal");
case 3: return std::string("Suspended");
}
return x;
## PUMP STATUS ##
# TODO: map to text (bitmap)
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Pump A status
address: 0x005D
register_type: read
raw_encode: HEXBYTES
# TODO: map to text (bitmap)
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Pump B status
address: 0x005E
register_type: read
raw_encode: HEXBYTES
## LEAD LAG STATUS ##
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Lead Lag master status
address: 0x00A0
register_type: read
raw_encode: HEXBYTES
lambda: |-
uint16_t value = modbus_controller::word_from_hex_str(x, 0);
switch (value) {
case 0: return std::string("Unknown");
case 1: return std::string("Disabled");
case 2: return std::string("Normal");
case 3: return std::string("Suspended");
}
return x;
# TODO: map to text (bitmap)
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Lead Lag slave status
address: 0x00A1
register_type: read
raw_encode: HEXBYTES
# Derived from "SOLA Modbus I/F" Rev. 4.1.1
# https://www.ccontrols.com/support/dp/OEMModbusSIS4_1_1_1_1.pdf
sensor:
## Trend Status ##
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Outlet (S3S4) or Outlet limit (S3) sensor
address: 0x0007
register_type: read
value_type: U_WORD # U16
unit_of_measurement: '°C'
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Inlet (S1) sensor
address: 0x000B
register_type: read
value_type: U_WORD # U16
unit_of_measurement: '°C'
accuracy_decimals: 1
filters:
- multiply: 0.1
## STATISTICS ##
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Burner cycle count
address: 0x0080
register_type: read
value_type: U_DWORD # U32
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Burner run time
address: 0x0082
register_type: read
value_type: U_DWORD # U32
unit_of_measurement: h
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}CH pump cycle count
address: 0x0084
register_type: read
value_type: U_DWORD # U32
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}System pump cycle count
address: 0x0088
register_type: read
value_type: U_DWORD # U32
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Boiler pump cycle count
address: 0x008A
register_type: read
value_type: U_DWORD # U32
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Controller cycle count
address: 0x008E
register_type: read
value_type: U_DWORD # U32
- platform: modbus_controller
modbus_controller_id: ${controller_id}
name: ${sensor_name_prefix}Controller run time
address: 0x0090
register_type: read
value_type: U_DWORD # U32
unit_of_measurement: h