class GlobalThermostatConfiguration(EepromModel): """ The global thermostat configuration. """ outside_sensor = EepromByte((0, 16)) threshold_temp = EepromTemp((0, 17)) pump_delay = EepromByte((0, 19)) switch_to_heating_output_0 = EepromByte((199, 0)) switch_to_heating_value_0 = EepromByte((199, 1)) switch_to_heating_output_1 = EepromByte((199, 2)) switch_to_heating_value_1 = EepromByte((199, 3)) switch_to_heating_output_2 = EepromByte((199, 4)) switch_to_heating_value_2 = EepromByte((199, 5)) switch_to_heating_output_3 = EepromByte((199, 6)) switch_to_heating_value_3 = EepromByte((199, 7)) switch_to_cooling_output_0 = EepromByte((199, 8)) switch_to_cooling_value_0 = EepromByte((199, 9)) switch_to_cooling_output_1 = EepromByte((199, 10)) switch_to_cooling_value_1 = EepromByte((199, 11)) switch_to_cooling_output_2 = EepromByte((199, 12)) switch_to_cooling_value_2 = EepromByte((199, 13)) switch_to_cooling_output_3 = EepromByte((199, 14)) switch_to_cooling_value_3 = EepromByte((199, 15))
class CoolingConfiguration(EepromModel): """ Models a thermostat in cooling mode. The maximum number of thermostats is 32. """ id = EepromId(32) name = EepromString(16, lambda mid: (204 + (mid / 16), 16 * (mid % 16))) setp0 = EepromTemp(lambda mid: (201, 32 + mid)) setp1 = EepromTemp(lambda mid: (201, 64 + mid)) setp2 = EepromTemp(lambda mid: (201, 96 + mid)) setp3 = EepromTemp(lambda mid: (201, 128 + mid)) setp4 = EepromTemp(lambda mid: (201, 160 + mid)) setp5 = EepromTemp(lambda mid: (201, 192 + mid)) sensor = EepromByte(lambda mid: (203, 8 + mid)) output0 = EepromByte(lambda mid: (201, mid)) output1 = EepromByte(lambda mid: (201, 224 + mid)) pid_p = EepromByte(lambda mid: (200, 4 * mid)) pid_i = EepromByte(lambda mid: (200, (4 * mid) + 1)) pid_d = EepromByte(lambda mid: (200, (4 * mid) + 2)) pid_int = EepromByte(lambda mid: (200, (4 * mid) + 3)) permanent_manual = EepromIBool(lambda mid: (195, 64 + mid)) auto_mon = CompositeDataType([ ('temp_n', EepromTemp(lambda mid: (212, mid + 0))), ('start_d1', EepromTime(lambda mid: (206, (4 * mid) + 0))), ('stop_d1', EepromTime(lambda mid: (206, (4 * mid) + 1))), ('temp_d1', EepromTemp(lambda mid: (210, mid + 0))), ('start_d2', EepromTime(lambda mid: (206, (4 * mid) + 2))), ('stop_d2', EepromTime(lambda mid: (206, (4 * mid) + 3))), ('temp_d2', EepromTemp(lambda mid: (211, mid + 0))) ]) auto_tue = CompositeDataType([ ('temp_n', EepromTemp(lambda mid: (212, mid + 32))), ('start_d1', EepromTime(lambda mid: (206, (4 * mid) + 128))), ('stop_d1', EepromTime(lambda mid: (206, (4 * mid) + 129))), ('temp_d1', EepromTemp(lambda mid: (210, mid + 32))), ('start_d2', EepromTime(lambda mid: (206, (4 * mid) + 130))), ('stop_d2', EepromTime(lambda mid: (206, (4 * mid) + 131))), ('temp_d2', EepromTemp(lambda mid: (211, mid + 32))) ]) auto_wed = CompositeDataType([ ('temp_n', EepromTemp(lambda mid: (212, mid + 64))), ('start_d1', EepromTime(lambda mid: (207, (4 * mid) + 0))), ('stop_d1', EepromTime(lambda mid: (207, (4 * mid) + 1))), ('temp_d1', EepromTemp(lambda mid: (210, mid + 64))), ('start_d2', EepromTime(lambda mid: (207, (4 * mid) + 2))), ('stop_d2', EepromTime(lambda mid: (207, (4 * mid) + 3))), ('temp_d2', EepromTemp(lambda mid: (211, mid + 64))) ]) auto_thu = CompositeDataType([ ('temp_n', EepromTemp(lambda mid: (212, mid + 96))), ('start_d1', EepromTime(lambda mid: (207, (4 * mid) + 128))), ('stop_d1', EepromTime(lambda mid: (207, (4 * mid) + 129))), ('temp_d1', EepromTemp(lambda mid: (210, mid + 96))), ('start_d2', EepromTime(lambda mid: (207, (4 * mid) + 130))), ('stop_d2', EepromTime(lambda mid: (207, (4 * mid) + 131))), ('temp_d2', EepromTemp(lambda mid: (211, mid + 96))) ]) auto_fri = CompositeDataType([ ('temp_n', EepromTemp(lambda mid: (212, mid + 128))), ('start_d1', EepromTime(lambda mid: (208, (4 * mid) + 0))), ('stop_d1', EepromTime(lambda mid: (208, (4 * mid) + 1))), ('temp_d1', EepromTemp(lambda mid: (210, mid + 128))), ('start_d2', EepromTime(lambda mid: (208, (4 * mid) + 2))), ('stop_d2', EepromTime(lambda mid: (208, (4 * mid) + 3))), ('temp_d2', EepromTemp(lambda mid: (211, mid + 128))) ]) auto_sat = CompositeDataType([ ('temp_n', EepromTemp(lambda mid: (212, mid + 160))), ('start_d1', EepromTime(lambda mid: (208, (4 * mid) + 128))), ('stop_d1', EepromTime(lambda mid: (208, (4 * mid) + 129))), ('temp_d1', EepromTemp(lambda mid: (210, mid + 160))), ('start_d2', EepromTime(lambda mid: (208, (4 * mid) + 130))), ('stop_d2', EepromTime(lambda mid: (208, (4 * mid) + 131))), ('temp_d2', EepromTemp(lambda mid: (211, mid + 160))) ]) auto_sun = CompositeDataType([ ('temp_n', EepromTemp(lambda mid: (212, mid + 192))), ('start_d1', EepromTime(lambda mid: (209, (4 * mid) + 0))), ('stop_d1', EepromTime(lambda mid: (209, (4 * mid) + 1))), ('temp_d1', EepromTemp(lambda mid: (210, mid + 192))), ('start_d2', EepromTime(lambda mid: (209, (4 * mid) + 2))), ('stop_d2', EepromTime(lambda mid: (209, (4 * mid) + 3))), ('temp_d2', EepromTemp(lambda mid: (211, mid + 192))) ]) room = EextByte()