heater wip

This commit is contained in:
2021-02-06 16:35:53 +01:00
parent 39e8ff7134
commit 8a071954af
9 changed files with 111 additions and 23 deletions

View File

@ -34,6 +34,7 @@ class ServiceList(enum.Enum):
ACU = auto()
TMP1075_1 = auto()
TMP1075_2 = auto()
HEATER = auto()
class SerialConfig(enum.Enum):

View File

@ -158,6 +158,8 @@ def add_globals_post_args_parsing(args: argparse.Namespace):
service = ServiceList.TMP1075_1
elif service == "tmp1075_2":
service = ServiceList.TMP1075_2
elif service == "heater":
service = ServiceList.HEATER
else:
logger.warning("Service not known! Setting standard service 17")
service = ServiceList.SERVICE_17

View File

@ -18,6 +18,7 @@ class ObjectIds(enum.Enum):
ACU_HANDLER_ID = auto()
TMP1075_1_HANDLER_ID = auto()
TMP1075_2_HANDLER_ID = auto()
HEATER = auto()
def set_object_ids(object_id_dict: Dict[ObjectIds, bytearray]):
@ -31,5 +32,6 @@ def set_object_ids(object_id_dict: Dict[ObjectIds, bytearray]):
o_ids.ACU_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x4]),
o_ids.TMP1075_1_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x5]),
o_ids.TMP1075_2_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x6]),
o_ids.HEATER: bytearray([0x54, 0x00, 0x00, 0x1]),
}
)