-
Notifications
You must be signed in to change notification settings - Fork 2
/
const.py
132 lines (110 loc) · 2.9 KB
/
const.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
"""Contains constants."""
from __future__ import annotations
from enum import IntEnum, unique
from typing import Final
# Binary states.
STATE_ON: Final = "on"
STATE_OFF: Final = "off"
# General attributes.
ATTR_CONNECTED: Final = "connected"
ATTR_CURRENT_TEMP: Final = "current_temp"
ATTR_DEVICE_INDEX: Final = "device_index"
ATTR_INDEX: Final = "index"
ATTR_LOADED: Final = "loaded"
ATTR_OFFSET: Final = "offset"
ATTR_PARAMETER: Final = "parameter"
ATTR_PASSWORD: Final = "password"
ATTR_SCHEDULE: Final = "schedule"
ATTR_SENSORS: Final = "sensors"
ATTR_STATE: Final = "state"
ATTR_SWITCH: Final = "switch"
ATTR_TARGET_TEMP: Final = "target_temp"
ATTR_THERMOSTAT: Final = "thermostat"
ATTR_TRANSMISSION: Final = "transmission"
ATTR_TYPE: Final = "type"
ATTR_VALUE: Final = "value"
ATTR_SIZE: Final = "size"
# Bytes.
BYTE_UNDEFINED: Final = 0xFF
@unique
class EncryptionType(IntEnum):
"""Contains wireless encryption types."""
UNKNOWN = 0
NONE = 1
WEP = 2
WPA = 3
WPA2 = 4
@unique
class DeviceState(IntEnum):
"""Contains device states."""
OFF = 0
FANNING = 1
KINDLING = 2
WORKING = 3
SUPERVISION = 4
PAUSED = 5
STANDBY = 6
BURNING_OFF = 7
ALERT = 8
MANUAL = 9
UNSEALING = 10
OTHER = 11
@unique
class ProductType(IntEnum):
"""Contains product types."""
ECOMAX_P = 0
ECOMAX_I = 1
@unique
class AlertType(IntEnum):
"""Contains alert types."""
POWER_LOSS = 0
BOILER_TEMP_SENSOR_FAILURE = 1
MAX_BOILER_TEMP_EXCEEDED = 2
FEEDER_TEMP_SENSOR_FAILURE = 3
MAX_FEEDER_TEMP_EXCEEDED = 4
EXHAUST_TEMP_SENSOR_FAILURE = 5
KINDLING_FAILURE = 7
FAN_FAILURE = 11
@unique
class DeviceType(IntEnum):
"""Contains device addresses."""
ALL = 0
ECOMAX = 69
ECOSTER = 81
ECONET = 86
@unique
class FrameType(IntEnum):
"""Contains frame types."""
REQUEST_STOP_MASTER = 24
REQUEST_START_MASTER = 25
REQUEST_CHECK_DEVICE = 48
REQUEST_ECOMAX_PARAMETERS = 49
REQUEST_MIXER_PARAMETERS = 50
REQUEST_SET_ECOMAX_PARAMETER = 51
REQUEST_SET_MIXER_PARAMETER = 52
REQUEST_SCHEDULES = 54
REQUEST_SET_SCHEDULE = 55
REQUEST_UID = 57
REQUEST_PASSWORD = 58
REQUEST_ECOMAX_CONTROL = 59
REQUEST_ALERTS = 61
REQUEST_PROGRAM_VERSION = 64
REQUEST_DATA_SCHEMA = 85
REQUEST_THERMOSTAT_PARAMETERS = 92
REQUEST_SET_THERMOSTAT_PARAMETER = 93
RESPONSE_DEVICE_AVAILABLE = 176
RESPONSE_ECOMAX_PARAMETERS = 177
RESPONSE_MIXER_PARAMETERS = 178
RESPONSE_SET_ECOMAX_PARAMETER = 179
RESPONSE_SET_MIXER_PARAMETER = 180
RESPONSE_SCHEDULES = 182
RESPONSE_UID = 185
RESPONSE_PASSWORD = 186
RESPONSE_ECOMAX_CONTROL = 187
RESPONSE_ALERTS = 189
RESPONSE_PROGRAM_VERSION = 192
RESPONSE_DATA_SCHEMA = 213
RESPONSE_THERMOSTAT_PARAMETERS = 220
RESPONSE_SET_THERMOSTAT_PARAMETER = 221
MESSAGE_REGULATOR_DATA = 8
MESSAGE_SENSOR_DATA = 53