Skip to content

Commit

Permalink
Dynamic loading of device model
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknn committed Oct 3, 2024
1 parent ead1e8e commit c74fd05
Show file tree
Hide file tree
Showing 29 changed files with 461 additions and 303 deletions.
6 changes: 5 additions & 1 deletion custom_components/swegon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
DOMAIN,
PLATFORMS,
CONF_NAME,
CONF_DEVICE_MODEL,
CONF_IP,
CONF_PORT,
CONF_SLAVE_ID,
CONF_SCAN_INTERVAL,
CONF_SCAN_INTERVAL_FAST
CONF_SCAN_INTERVAL_FAST,
DEVICE_CASA_R4
)
from .coordinator import SwegonCoordinator

Expand All @@ -30,6 +32,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

# Load config data
name = entry.data[CONF_NAME]
device_model = entry.data.get(CONF_DEVICE_MODEL, DEVICE_CASA_R4)
ip = entry.data[CONF_IP]
port = entry.data[CONF_PORT]
slave_id = entry.data[CONF_SLAVE_ID]
Expand All @@ -49,6 +52,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

# Set up coordinator
coordinator = SwegonCoordinator(hass, dev, ip, port, slave_id,scan_interval, scan_interval_fast)
await coordinator._swegonDevice.async_load_device_data(device_model)
hass.data[DOMAIN][entry.entry_id] = coordinator

# Forward the setup to the platforms.
Expand Down
Binary file modified custom_components/swegon/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file modified custom_components/swegon/__pycache__/button.cpython-312.pyc
Binary file not shown.
Binary file modified custom_components/swegon/__pycache__/config_flow.cpython-312.pyc
Binary file not shown.
Binary file modified custom_components/swegon/__pycache__/const.cpython-312.pyc
Binary file not shown.
Binary file modified custom_components/swegon/__pycache__/coordinator.cpython-312.pyc
Binary file not shown.
Binary file modified custom_components/swegon/__pycache__/entity.cpython-312.pyc
Binary file not shown.
Binary file modified custom_components/swegon/__pycache__/number.cpython-312.pyc
Binary file not shown.
Binary file modified custom_components/swegon/__pycache__/select.cpython-312.pyc
Binary file not shown.
Binary file modified custom_components/swegon/__pycache__/sensor.cpython-312.pyc
Binary file not shown.
Binary file modified custom_components/swegon/__pycache__/swegon.cpython-312.pyc
Binary file not shown.
Binary file modified custom_components/swegon/__pycache__/switch.cpython-312.pyc
Binary file not shown.
9 changes: 8 additions & 1 deletion custom_components/swegon/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
from typing import Any

from homeassistant.const import CONF_DEVICES
from .const import DOMAIN, CONF_NAME, CONF_IP, CONF_PORT, CONF_SLAVE_ID, CONF_SCAN_INTERVAL, CONF_SCAN_INTERVAL_FAST
from .const import DOMAIN, CONF_NAME, CONF_DEVICE_MODEL, CONF_IP, CONF_PORT, CONF_SLAVE_ID, CONF_SCAN_INTERVAL, CONF_SCAN_INTERVAL_FAST
from .const import DEFAULT_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL_FAST
from .const import DEVICE_CASA_R4, DEVICE_CASA_R15

CONFIG_ENTRY_NAME = "Swegon"

DEVICE_DATA = {
CONF_NAME: "",
CONF_DEVICE_MODEL: DEVICE_CASA_R4,
CONF_IP: "192.168.10.13",
CONF_PORT: 502,
CONF_SLAVE_ID: 1,
Expand Down Expand Up @@ -67,11 +69,16 @@ async def async_step_init(self, user_input: dict[str, Any] | None = None):
""" ################################################### """
# Schema taking device details when adding or updating
def getDeviceSchema(user_input: dict[str, Any] | None = None) -> vol.Schema:
DEVICE_TYPES = [DEVICE_CASA_R4, DEVICE_CASA_R15]

data_schema = vol.Schema(
{
vol.Required(
CONF_NAME, description="Name", default=user_input[CONF_NAME]
): cv.string,
vol.Required(CONF_DEVICE_MODEL, default=user_input[CONF_DEVICE_MODEL]): selector.SelectSelector(
selector.SelectSelectorConfig(options=DEVICE_TYPES),
),
vol.Required(
CONF_IP, description="IP Address", default=user_input[CONF_IP]
): cv.string,
Expand Down
5 changes: 5 additions & 0 deletions custom_components/swegon/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# Configuration Device Constants
CONF_NAME: str = "name"
CONF_DEVICE_MODEL: str = "device_model"
CONF_IP: str = "ip_address"
CONF_PORT: str = "port"
CONF_SLAVE_ID: str = "slave_id"
Expand All @@ -15,3 +16,7 @@
# Defaults
DEFAULT_SCAN_INTERVAL: int = 300 # Seconds
DEFAULT_SCAN_INTERVAL_FAST: int = 5 # Seconds

# Device types - Name and device file
DEVICE_CASA_R4 = "CASA R4"
DEVICE_CASA_R15 = "CASA R15"
2 changes: 1 addition & 1 deletion custom_components/swegon/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator

from .const import DOMAIN
from .swegon import Swegon
from .pyswegon.swegon import Swegon

_LOGGER = logging.getLogger(__name__)

Expand Down
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
125 changes: 125 additions & 0 deletions custom_components/swegon/pyswegon/devices/casa_r15.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
from ..swegon import Modbus_Datapoint
from ..swegon import COMMANDS,SETPOINTS,DEVICE_INFO,ALARMS,SENSORS,SENSORS2,VIRTUALSENSORS,UNIT_STATUSES,CONFIG

Datapoints = {}

# Read / Write - Holding registers
Datapoints[COMMANDS] = {}
Datapoints[COMMANDS]["Op_Mode"] = Modbus_Datapoint(5000)
Datapoints[COMMANDS]["Fireplace_Mode"] = Modbus_Datapoint(5001)
Datapoints[COMMANDS]["Unused"] = Modbus_Datapoint(5002)
Datapoints[COMMANDS]["Travelling_Mode"] = Modbus_Datapoint(5003)

# Read / Write - Holding registers
Datapoints[SETPOINTS] = {}
Datapoints[SETPOINTS]["Temp_SP"] = Modbus_Datapoint(5100, 0.01)

# Read only - Input registers
Datapoints[DEVICE_INFO] = {}
Datapoints[DEVICE_INFO]["FW_Maj"] = Modbus_Datapoint(6000)
Datapoints[DEVICE_INFO]["FW_Min"] = Modbus_Datapoint(6001)
Datapoints[DEVICE_INFO]["FW_Build"] = Modbus_Datapoint(6002)
Datapoints[DEVICE_INFO]["Par_Maj"] = Modbus_Datapoint(6003)
Datapoints[DEVICE_INFO]["Par_Min"] = Modbus_Datapoint(6004)
Datapoints[DEVICE_INFO]["Model_Name"] = Modbus_Datapoint(6007) # 15 Bytes
Datapoints[DEVICE_INFO]["Serial_Number"] = Modbus_Datapoint(6023) # 24 Bytes

# Read only - Input registers
Datapoints[ALARMS] = {}
Datapoints[ALARMS]["T1_Failure"] = Modbus_Datapoint(6100)
Datapoints[ALARMS]["T2_Failure"] = Modbus_Datapoint(6101)
Datapoints[ALARMS]["T3_Failure"] = Modbus_Datapoint(6102)
Datapoints[ALARMS]["T4_Failure"] = Modbus_Datapoint(6103)
Datapoints[ALARMS]["T5_Failure"] = Modbus_Datapoint(6104)
Datapoints[ALARMS]["T6_Failure"] = Modbus_Datapoint(6105)
Datapoints[ALARMS]["T7_Failure"] = Modbus_Datapoint(6106)
Datapoints[ALARMS]["T8_Failure"] = Modbus_Datapoint(6107)
Datapoints[ALARMS]["T1_Failure_Unconf"] = Modbus_Datapoint(6108)
Datapoints[ALARMS]["T2_Failure_Unconf"] = Modbus_Datapoint(6109)
Datapoints[ALARMS]["T3_Failure_Unconf"] = Modbus_Datapoint(6110)
Datapoints[ALARMS]["T4_Failure_Unconf"] = Modbus_Datapoint(6111)
Datapoints[ALARMS]["T5_Failure_Unconf"] = Modbus_Datapoint(6112)
Datapoints[ALARMS]["T6_Failure_Unconf"] = Modbus_Datapoint(6113)
Datapoints[ALARMS]["T7_Failure_Unconf"] = Modbus_Datapoint(6114)
Datapoints[ALARMS]["T8_Failure_Unconf"] = Modbus_Datapoint(6115)
Datapoints[ALARMS]["Afterheater_Failure"] = Modbus_Datapoint(6116)
Datapoints[ALARMS]["Afterheater_Failure_Unconf"] = Modbus_Datapoint(6117)
Datapoints[ALARMS]["Preheater_Failure"] = Modbus_Datapoint(6118)
Datapoints[ALARMS]["Preheater_Failure_Unconf"] = Modbus_Datapoint(6119)
Datapoints[ALARMS]["Freezing_Danger"] = Modbus_Datapoint(6120)
Datapoints[ALARMS]["Freezing_Danger_Unconf"] = Modbus_Datapoint(6121)
Datapoints[ALARMS]["Internal_Error"] = Modbus_Datapoint(6122)
Datapoints[ALARMS]["Internal_Error_Unconf"] = Modbus_Datapoint(6123)
Datapoints[ALARMS]["Supply_Fan_Failure"] = Modbus_Datapoint(6124)
Datapoints[ALARMS]["Supply_Fan_Failure_Unconf"] = Modbus_Datapoint(6125)
Datapoints[ALARMS]["Exhaust_Fan_Failure"] = Modbus_Datapoint(6126)
Datapoints[ALARMS]["Exhaust_Fan_Failure_Unconf"] = Modbus_Datapoint(6127)
Datapoints[ALARMS]["Service_Info"] = Modbus_Datapoint(6128)
Datapoints[ALARMS]["Filter_Guard_Info"] = Modbus_Datapoint(6129)
Datapoints[ALARMS]["Emergency_Stop"] = Modbus_Datapoint(6130)
Datapoints[ALARMS]["Active_Alarms"] = Modbus_Datapoint(6131)
Datapoints[ALARMS]["Info_Unconf"] = Modbus_Datapoint(6132)

# Read only - Input registers
Datapoints[SENSORS] = {}
Datapoints[SENSORS]["Fresh_Temp"] = Modbus_Datapoint(6200, 0.1)
Datapoints[SENSORS]["Supply_Temp1"] = Modbus_Datapoint(6201, 0.1)
Datapoints[SENSORS]["Supply_Temp2"] = Modbus_Datapoint(6202, 0.1)
Datapoints[SENSORS]["Extract_Temp"] = Modbus_Datapoint(6203, 0.1)
Datapoints[SENSORS]["Exhaust_Temp"] = Modbus_Datapoint(6204, 0.1)
Datapoints[SENSORS]["Room_Temp"] = Modbus_Datapoint(6205, 0.1)
Datapoints[SENSORS]["UP1_Temp"] = Modbus_Datapoint(6206, 0.1)
Datapoints[SENSORS]["UP2_Temp"] = Modbus_Datapoint(6207, 0.1)
Datapoints[SENSORS]["WR_Temp"] = Modbus_Datapoint(6208, 0.1)
Datapoints[SENSORS]["PreHeat_Temp"] = Modbus_Datapoint(6209, 0.1)
Datapoints[SENSORS]["ExtFresh_Temp"] = Modbus_Datapoint(6210, 0.1)
Datapoints[SENSORS]["C02_Unf"] = Modbus_Datapoint(6211, 1.0)
Datapoints[SENSORS]["CO2_Fil"] = Modbus_Datapoint(6212, 1.0)
Datapoints[SENSORS]["RH"] = Modbus_Datapoint(6213, 1.0)
Datapoints[SENSORS]["AH"] = Modbus_Datapoint(6214, 0.1)
Datapoints[SENSORS]["AH_SP"] = Modbus_Datapoint(6215, 0.1)
Datapoints[SENSORS]["VOC"] = Modbus_Datapoint(6216, 1.0)
Datapoints[SENSORS]["Supply_Pressure"] = Modbus_Datapoint(6217, 1.0)
Datapoints[SENSORS]["Exhaust_Pressure"] = Modbus_Datapoint(6218, 1.0)
Datapoints[SENSORS]["Supply_Flow"] = Modbus_Datapoint(6219, 3.6)
Datapoints[SENSORS]["Exhaust_Flow"] = Modbus_Datapoint(6220, 3.6)

# Read only - Input registers
Datapoints[SENSORS2] = {}
Datapoints[SENSORS2]["Heat_Exchanger"] = Modbus_Datapoint(6233, 1.0)

# Virtual sensors (calculated)
Datapoints[VIRTUALSENSORS] = {}
Datapoints[VIRTUALSENSORS]["Efficiency"] = Modbus_Datapoint(0, 1)

# Read only - Input registers
Datapoints[UNIT_STATUSES] = {}
Datapoints[UNIT_STATUSES]["Unit_state"] = Modbus_Datapoint(6300)
Datapoints[UNIT_STATUSES]["Speed_state"] = Modbus_Datapoint(6301)
Datapoints[UNIT_STATUSES]["Supply_Fan"] = Modbus_Datapoint(6302)
Datapoints[UNIT_STATUSES]["Exhaust_Fan"] = Modbus_Datapoint(6303)
Datapoints[UNIT_STATUSES]["Supply_Fan_RPM"] = Modbus_Datapoint(6304)
Datapoints[UNIT_STATUSES]["Exhaust_Fan_RPM"] = Modbus_Datapoint(6305)
Datapoints[UNIT_STATUSES]["NotUsed1"] = Modbus_Datapoint(6306)
Datapoints[UNIT_STATUSES]["NotUsed2"] = Modbus_Datapoint(6307)
Datapoints[UNIT_STATUSES]["NotUsed3"] = Modbus_Datapoint(6308)
Datapoints[UNIT_STATUSES]["NotUsed4"] = Modbus_Datapoint(6309)
Datapoints[UNIT_STATUSES]["NotUsed5"] = Modbus_Datapoint(6310)
Datapoints[UNIT_STATUSES]["NotUsed6"] = Modbus_Datapoint(6311)
Datapoints[UNIT_STATUSES]["NotUsed7"] = Modbus_Datapoint(6312)
Datapoints[UNIT_STATUSES]["NotUsed8"] = Modbus_Datapoint(6313)
Datapoints[UNIT_STATUSES]["NotUsed9"] = Modbus_Datapoint(6314)
Datapoints[UNIT_STATUSES]["Temp_SP2"] = Modbus_Datapoint(6315)
Datapoints[UNIT_STATUSES]["Heating_Output"] = Modbus_Datapoint(6316)

# Read / Write - Holding registers
Datapoints[CONFIG] = {}
Datapoints[CONFIG]["Reset_Alarms"] = Modbus_Datapoint(5406) #5406
Datapoints[CONFIG]["Travelling_Mode_Speed_Drop"] = Modbus_Datapoint(5105) #5105
Datapoints[CONFIG]["Fireplace_Run_Time"] = Modbus_Datapoint(5103) #5103
Datapoints[CONFIG]["Fireplace_Max_Speed_Difference"] = Modbus_Datapoint(5104) #5104
Datapoints[CONFIG]["Night_Cooling"] = Modbus_Datapoint(5163) #5163
Datapoints[CONFIG]["Night_Cooling_FreshAir_Max"] = Modbus_Datapoint(5164) #5164
Datapoints[CONFIG]["Night_Cooling_FreshAir_Start"] = Modbus_Datapoint(5165) #5165
Datapoints[CONFIG]["Night_Cooling_RoomTemp_Start"] = Modbus_Datapoint(5166) #5166
Datapoints[CONFIG]["Night_Cooling_SupplyTemp_Min"] = Modbus_Datapoint(5167) #5167
125 changes: 125 additions & 0 deletions custom_components/swegon/pyswegon/devices/casa_r4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
from ..swegon import Modbus_Datapoint
from ..swegon import COMMANDS,SETPOINTS,DEVICE_INFO,ALARMS,SENSORS,SENSORS2,VIRTUALSENSORS,UNIT_STATUSES,CONFIG

Datapoints = {}

# Read / Write - Holding registers
Datapoints[COMMANDS] = {}
Datapoints[COMMANDS]["Op_Mode"] = Modbus_Datapoint(5000)
Datapoints[COMMANDS]["Fireplace_Mode"] = Modbus_Datapoint(5001)
Datapoints[COMMANDS]["Unused"] = Modbus_Datapoint(5002)
Datapoints[COMMANDS]["Travelling_Mode"] = Modbus_Datapoint(5003)

# Read / Write - Holding registers
Datapoints[SETPOINTS] = {}
Datapoints[SETPOINTS]["Temp_SP"] = Modbus_Datapoint(5100, 0.1)

# Read only - Input registers
Datapoints[DEVICE_INFO] = {}
Datapoints[DEVICE_INFO]["FW_Maj"] = Modbus_Datapoint(6000)
Datapoints[DEVICE_INFO]["FW_Min"] = Modbus_Datapoint(6001)
Datapoints[DEVICE_INFO]["FW_Build"] = Modbus_Datapoint(6002)
Datapoints[DEVICE_INFO]["Par_Maj"] = Modbus_Datapoint(6003)
Datapoints[DEVICE_INFO]["Par_Min"] = Modbus_Datapoint(6004)
Datapoints[DEVICE_INFO]["Model_Name"] = Modbus_Datapoint(6007) # 15 Bytes
Datapoints[DEVICE_INFO]["Serial_Number"] = Modbus_Datapoint(6023) # 24 Bytes

# Read only - Input registers
Datapoints[ALARMS] = {}
Datapoints[ALARMS]["T1_Failure"] = Modbus_Datapoint(6100)
Datapoints[ALARMS]["T2_Failure"] = Modbus_Datapoint(6101)
Datapoints[ALARMS]["T3_Failure"] = Modbus_Datapoint(6102)
Datapoints[ALARMS]["T4_Failure"] = Modbus_Datapoint(6103)
Datapoints[ALARMS]["T5_Failure"] = Modbus_Datapoint(6104)
Datapoints[ALARMS]["T6_Failure"] = Modbus_Datapoint(6105)
Datapoints[ALARMS]["T7_Failure"] = Modbus_Datapoint(6106)
Datapoints[ALARMS]["T8_Failure"] = Modbus_Datapoint(6107)
Datapoints[ALARMS]["T1_Failure_Unconf"] = Modbus_Datapoint(6108)
Datapoints[ALARMS]["T2_Failure_Unconf"] = Modbus_Datapoint(6109)
Datapoints[ALARMS]["T3_Failure_Unconf"] = Modbus_Datapoint(6110)
Datapoints[ALARMS]["T4_Failure_Unconf"] = Modbus_Datapoint(6111)
Datapoints[ALARMS]["T5_Failure_Unconf"] = Modbus_Datapoint(6112)
Datapoints[ALARMS]["T6_Failure_Unconf"] = Modbus_Datapoint(6113)
Datapoints[ALARMS]["T7_Failure_Unconf"] = Modbus_Datapoint(6114)
Datapoints[ALARMS]["T8_Failure_Unconf"] = Modbus_Datapoint(6115)
Datapoints[ALARMS]["Afterheater_Failure"] = Modbus_Datapoint(6116)
Datapoints[ALARMS]["Afterheater_Failure_Unconf"] = Modbus_Datapoint(6117)
Datapoints[ALARMS]["Preheater_Failure"] = Modbus_Datapoint(6118)
Datapoints[ALARMS]["Preheater_Failure_Unconf"] = Modbus_Datapoint(6119)
Datapoints[ALARMS]["Freezing_Danger"] = Modbus_Datapoint(6120)
Datapoints[ALARMS]["Freezing_Danger_Unconf"] = Modbus_Datapoint(6121)
Datapoints[ALARMS]["Internal_Error"] = Modbus_Datapoint(6122)
Datapoints[ALARMS]["Internal_Error_Unconf"] = Modbus_Datapoint(6123)
Datapoints[ALARMS]["Supply_Fan_Failure"] = Modbus_Datapoint(6124)
Datapoints[ALARMS]["Supply_Fan_Failure_Unconf"] = Modbus_Datapoint(6125)
Datapoints[ALARMS]["Exhaust_Fan_Failure"] = Modbus_Datapoint(6126)
Datapoints[ALARMS]["Exhaust_Fan_Failure_Unconf"] = Modbus_Datapoint(6127)
Datapoints[ALARMS]["Service_Info"] = Modbus_Datapoint(6128)
Datapoints[ALARMS]["Filter_Guard_Info"] = Modbus_Datapoint(6129)
Datapoints[ALARMS]["Emergency_Stop"] = Modbus_Datapoint(6130)
Datapoints[ALARMS]["Active_Alarms"] = Modbus_Datapoint(6131)
Datapoints[ALARMS]["Info_Unconf"] = Modbus_Datapoint(6132)

# Read only - Input registers
Datapoints[SENSORS] = {}
Datapoints[SENSORS]["Fresh_Temp"] = Modbus_Datapoint(6200, 0.1)
Datapoints[SENSORS]["Supply_Temp1"] = Modbus_Datapoint(6201, 0.1)
Datapoints[SENSORS]["Supply_Temp2"] = Modbus_Datapoint(6202, 0.1)
Datapoints[SENSORS]["Extract_Temp"] = Modbus_Datapoint(6203, 0.1)
Datapoints[SENSORS]["Exhaust_Temp"] = Modbus_Datapoint(6204, 0.1)
Datapoints[SENSORS]["Room_Temp"] = Modbus_Datapoint(6205, 0.1)
Datapoints[SENSORS]["UP1_Temp"] = Modbus_Datapoint(6206, 0.1)
Datapoints[SENSORS]["UP2_Temp"] = Modbus_Datapoint(6207, 0.1)
Datapoints[SENSORS]["WR_Temp"] = Modbus_Datapoint(6208, 0.1)
Datapoints[SENSORS]["PreHeat_Temp"] = Modbus_Datapoint(6209, 0.1)
Datapoints[SENSORS]["ExtFresh_Temp"] = Modbus_Datapoint(6210, 0.1)
Datapoints[SENSORS]["C02_Unf"] = Modbus_Datapoint(6211, 1.0)
Datapoints[SENSORS]["CO2_Fil"] = Modbus_Datapoint(6212, 1.0)
Datapoints[SENSORS]["RH"] = Modbus_Datapoint(6213, 1.0)
Datapoints[SENSORS]["AH"] = Modbus_Datapoint(6214, 0.1)
Datapoints[SENSORS]["AH_SP"] = Modbus_Datapoint(6215, 0.1)
Datapoints[SENSORS]["VOC"] = Modbus_Datapoint(6216, 1.0)
Datapoints[SENSORS]["Supply_Pressure"] = Modbus_Datapoint(6217, 1.0)
Datapoints[SENSORS]["Exhaust_Pressure"] = Modbus_Datapoint(6218, 1.0)
Datapoints[SENSORS]["Supply_Flow"] = Modbus_Datapoint(6219, 3.6)
Datapoints[SENSORS]["Exhaust_Flow"] = Modbus_Datapoint(6220, 3.6)

# Read only - Input registers
Datapoints[SENSORS2] = {}
Datapoints[SENSORS2]["Heat_Exchanger"] = Modbus_Datapoint(6233, 1.0)

# Virtual sensors (calculated)
Datapoints[VIRTUALSENSORS] = {}
Datapoints[VIRTUALSENSORS]["Efficiency"] = Modbus_Datapoint(0, 1)

# Read only - Input registers
Datapoints[UNIT_STATUSES] = {}
Datapoints[UNIT_STATUSES]["Unit_state"] = Modbus_Datapoint(6300)
Datapoints[UNIT_STATUSES]["Speed_state"] = Modbus_Datapoint(6301)
Datapoints[UNIT_STATUSES]["Supply_Fan"] = Modbus_Datapoint(6302)
Datapoints[UNIT_STATUSES]["Exhaust_Fan"] = Modbus_Datapoint(6303)
Datapoints[UNIT_STATUSES]["Supply_Fan_RPM"] = Modbus_Datapoint(6304)
Datapoints[UNIT_STATUSES]["Exhaust_Fan_RPM"] = Modbus_Datapoint(6305)
Datapoints[UNIT_STATUSES]["NotUsed1"] = Modbus_Datapoint(6306)
Datapoints[UNIT_STATUSES]["NotUsed2"] = Modbus_Datapoint(6307)
Datapoints[UNIT_STATUSES]["NotUsed3"] = Modbus_Datapoint(6308)
Datapoints[UNIT_STATUSES]["NotUsed4"] = Modbus_Datapoint(6309)
Datapoints[UNIT_STATUSES]["NotUsed5"] = Modbus_Datapoint(6310)
Datapoints[UNIT_STATUSES]["NotUsed6"] = Modbus_Datapoint(6311)
Datapoints[UNIT_STATUSES]["NotUsed7"] = Modbus_Datapoint(6312)
Datapoints[UNIT_STATUSES]["NotUsed8"] = Modbus_Datapoint(6313)
Datapoints[UNIT_STATUSES]["NotUsed9"] = Modbus_Datapoint(6314)
Datapoints[UNIT_STATUSES]["Temp_SP2"] = Modbus_Datapoint(6315)
Datapoints[UNIT_STATUSES]["Heating_Output"] = Modbus_Datapoint(6316)

# Read / Write - Holding registers
Datapoints[CONFIG] = {}
Datapoints[CONFIG]["Reset_Alarms"] = Modbus_Datapoint(5406) #5406
Datapoints[CONFIG]["Travelling_Mode_Speed_Drop"] = Modbus_Datapoint(5105) #5105
Datapoints[CONFIG]["Fireplace_Run_Time"] = Modbus_Datapoint(5103) #5103
Datapoints[CONFIG]["Fireplace_Max_Speed_Difference"] = Modbus_Datapoint(5104) #5104
Datapoints[CONFIG]["Night_Cooling"] = Modbus_Datapoint(5163) #5163
Datapoints[CONFIG]["Night_Cooling_FreshAir_Max"] = Modbus_Datapoint(5164) #5164
Datapoints[CONFIG]["Night_Cooling_FreshAir_Start"] = Modbus_Datapoint(5165) #5165
Datapoints[CONFIG]["Night_Cooling_RoomTemp_Start"] = Modbus_Datapoint(5166) #5166
Datapoints[CONFIG]["Night_Cooling_SupplyTemp_Min"] = Modbus_Datapoint(5167) #5167
Loading

0 comments on commit c74fd05

Please sign in to comment.