pyintellicenter 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyintellicenter/__init__.py +171 -0
- pyintellicenter/attributes.py +455 -0
- pyintellicenter/controller.py +1071 -0
- pyintellicenter/model.py +316 -0
- pyintellicenter/protocol.py +522 -0
- pyintellicenter-0.0.1.dist-info/METADATA +260 -0
- pyintellicenter-0.0.1.dist-info/RECORD +9 -0
- pyintellicenter-0.0.1.dist-info/WHEEL +4 -0
- pyintellicenter-0.0.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"""pyintellicenter - Python library for Pentair IntelliCenter pool control systems.
|
|
2
|
+
|
|
3
|
+
This library provides the core protocol and model classes for communicating
|
|
4
|
+
with Pentair IntelliCenter pool control systems over local network.
|
|
5
|
+
|
|
6
|
+
Example usage:
|
|
7
|
+
```python
|
|
8
|
+
import asyncio
|
|
9
|
+
from pyintellicenter import ModelController, PoolModel, ConnectionHandler
|
|
10
|
+
|
|
11
|
+
async def main():
|
|
12
|
+
model = PoolModel()
|
|
13
|
+
controller = ModelController("192.168.1.100", model)
|
|
14
|
+
handler = ConnectionHandler(controller)
|
|
15
|
+
await handler.start()
|
|
16
|
+
|
|
17
|
+
# Access pool equipment
|
|
18
|
+
for obj in model:
|
|
19
|
+
print(f"{obj.sname}: {obj.status}")
|
|
20
|
+
|
|
21
|
+
asyncio.run(main())
|
|
22
|
+
```
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
from .attributes import (
|
|
26
|
+
ACT_ATTR,
|
|
27
|
+
BODY_ATTR,
|
|
28
|
+
BODY_TYPE,
|
|
29
|
+
CHEM_TYPE,
|
|
30
|
+
CIRCGRP_TYPE,
|
|
31
|
+
CIRCUIT_ATTR,
|
|
32
|
+
CIRCUIT_TYPE,
|
|
33
|
+
COMUART_ATTR,
|
|
34
|
+
DLY_ATTR,
|
|
35
|
+
ENABLE_ATTR,
|
|
36
|
+
EXTINSTR_TYPE,
|
|
37
|
+
FEATR_ATTR,
|
|
38
|
+
GPM_ATTR,
|
|
39
|
+
HEATER_ATTR,
|
|
40
|
+
HEATER_TYPE,
|
|
41
|
+
HNAME_ATTR,
|
|
42
|
+
HTMODE_ATTR,
|
|
43
|
+
LISTORD_ATTR,
|
|
44
|
+
LOTMP_ATTR,
|
|
45
|
+
LSTTMP_ATTR,
|
|
46
|
+
MODE_ATTR,
|
|
47
|
+
NORMAL_ATTR,
|
|
48
|
+
NULL_OBJNAM,
|
|
49
|
+
OBJTYP_ATTR,
|
|
50
|
+
ORPTNK_ATTR,
|
|
51
|
+
ORPVAL_ATTR,
|
|
52
|
+
PARENT_ATTR,
|
|
53
|
+
PHTNK_ATTR,
|
|
54
|
+
PHVAL_ATTR,
|
|
55
|
+
PMPCIRC_TYPE,
|
|
56
|
+
PRIM_ATTR,
|
|
57
|
+
PROPNAME_ATTR,
|
|
58
|
+
PUMP_TYPE,
|
|
59
|
+
PWR_ATTR,
|
|
60
|
+
QUALTY_ATTR,
|
|
61
|
+
READY_ATTR,
|
|
62
|
+
REMBTN_TYPE,
|
|
63
|
+
REMOTE_TYPE,
|
|
64
|
+
RPM_ATTR,
|
|
65
|
+
SALT_ATTR,
|
|
66
|
+
SCHED_TYPE,
|
|
67
|
+
SEC_ATTR,
|
|
68
|
+
SELECT_ATTR,
|
|
69
|
+
SENSE_TYPE,
|
|
70
|
+
SHOMNU_ATTR,
|
|
71
|
+
SNAME_ATTR,
|
|
72
|
+
SOURCE_ATTR,
|
|
73
|
+
STATIC_ATTR,
|
|
74
|
+
STATUS_ATTR,
|
|
75
|
+
SUBTYP_ATTR,
|
|
76
|
+
SUPER_ATTR,
|
|
77
|
+
SYSTEM_TYPE,
|
|
78
|
+
TIME_ATTR,
|
|
79
|
+
TIMOUT_ATTR,
|
|
80
|
+
USE_ATTR,
|
|
81
|
+
VACFLO_ATTR,
|
|
82
|
+
VER_ATTR,
|
|
83
|
+
VOL_ATTR,
|
|
84
|
+
)
|
|
85
|
+
from .controller import (
|
|
86
|
+
BaseController,
|
|
87
|
+
CommandError,
|
|
88
|
+
ConnectionHandler,
|
|
89
|
+
ConnectionMetrics,
|
|
90
|
+
ModelController,
|
|
91
|
+
SystemInfo,
|
|
92
|
+
)
|
|
93
|
+
from .model import PoolModel, PoolObject
|
|
94
|
+
|
|
95
|
+
__version__ = "0.0.1"
|
|
96
|
+
|
|
97
|
+
__all__ = [
|
|
98
|
+
# Version
|
|
99
|
+
"__version__",
|
|
100
|
+
# Controller classes
|
|
101
|
+
"BaseController",
|
|
102
|
+
"CommandError",
|
|
103
|
+
"ConnectionHandler",
|
|
104
|
+
"ConnectionMetrics",
|
|
105
|
+
"ModelController",
|
|
106
|
+
"SystemInfo",
|
|
107
|
+
# Model classes
|
|
108
|
+
"PoolModel",
|
|
109
|
+
"PoolObject",
|
|
110
|
+
# Object types
|
|
111
|
+
"BODY_TYPE",
|
|
112
|
+
"CHEM_TYPE",
|
|
113
|
+
"CIRCUIT_TYPE",
|
|
114
|
+
"CIRCGRP_TYPE",
|
|
115
|
+
"EXTINSTR_TYPE",
|
|
116
|
+
"HEATER_TYPE",
|
|
117
|
+
"PMPCIRC_TYPE",
|
|
118
|
+
"PUMP_TYPE",
|
|
119
|
+
"REMBTN_TYPE",
|
|
120
|
+
"REMOTE_TYPE",
|
|
121
|
+
"SCHED_TYPE",
|
|
122
|
+
"SENSE_TYPE",
|
|
123
|
+
"SYSTEM_TYPE",
|
|
124
|
+
# Special values
|
|
125
|
+
"NULL_OBJNAM",
|
|
126
|
+
# Attributes
|
|
127
|
+
"ACT_ATTR",
|
|
128
|
+
"BODY_ATTR",
|
|
129
|
+
"CIRCUIT_ATTR",
|
|
130
|
+
"COMUART_ATTR",
|
|
131
|
+
"DLY_ATTR",
|
|
132
|
+
"ENABLE_ATTR",
|
|
133
|
+
"FEATR_ATTR",
|
|
134
|
+
"GPM_ATTR",
|
|
135
|
+
"HEATER_ATTR",
|
|
136
|
+
"HNAME_ATTR",
|
|
137
|
+
"HTMODE_ATTR",
|
|
138
|
+
"LISTORD_ATTR",
|
|
139
|
+
"LOTMP_ATTR",
|
|
140
|
+
"LSTTMP_ATTR",
|
|
141
|
+
"MODE_ATTR",
|
|
142
|
+
"NORMAL_ATTR",
|
|
143
|
+
"OBJTYP_ATTR",
|
|
144
|
+
"ORPTNK_ATTR",
|
|
145
|
+
"ORPVAL_ATTR",
|
|
146
|
+
"PARENT_ATTR",
|
|
147
|
+
"PHTNK_ATTR",
|
|
148
|
+
"PHVAL_ATTR",
|
|
149
|
+
"PRIM_ATTR",
|
|
150
|
+
"PROPNAME_ATTR",
|
|
151
|
+
"PWR_ATTR",
|
|
152
|
+
"QUALTY_ATTR",
|
|
153
|
+
"READY_ATTR",
|
|
154
|
+
"RPM_ATTR",
|
|
155
|
+
"SALT_ATTR",
|
|
156
|
+
"SEC_ATTR",
|
|
157
|
+
"SELECT_ATTR",
|
|
158
|
+
"SHOMNU_ATTR",
|
|
159
|
+
"SNAME_ATTR",
|
|
160
|
+
"SOURCE_ATTR",
|
|
161
|
+
"STATIC_ATTR",
|
|
162
|
+
"STATUS_ATTR",
|
|
163
|
+
"SUBTYP_ATTR",
|
|
164
|
+
"SUPER_ATTR",
|
|
165
|
+
"TIME_ATTR",
|
|
166
|
+
"TIMOUT_ATTR",
|
|
167
|
+
"USE_ATTR",
|
|
168
|
+
"VACFLO_ATTR",
|
|
169
|
+
"VER_ATTR",
|
|
170
|
+
"VOL_ATTR",
|
|
171
|
+
]
|
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
"""Definition of all the attributes per OBJTYP."""
|
|
2
|
+
|
|
3
|
+
NULL_OBJNAM = "00000"
|
|
4
|
+
|
|
5
|
+
BODY_TYPE = "BODY"
|
|
6
|
+
CHEM_TYPE = "CHEM"
|
|
7
|
+
CIRCUIT_TYPE = "CIRCUIT"
|
|
8
|
+
CIRCGRP_TYPE = "CIRCGRP"
|
|
9
|
+
EXTINSTR_TYPE = "EXTINSTR"
|
|
10
|
+
HEATER_TYPE = "HEATER"
|
|
11
|
+
PMPCIRC_TYPE = "PMPCIRC"
|
|
12
|
+
PUMP_TYPE = "PUMP"
|
|
13
|
+
REMBTN_TYPE = "REMBTN"
|
|
14
|
+
REMOTE_TYPE = "REMOTE"
|
|
15
|
+
SCHED_TYPE = "SCHED"
|
|
16
|
+
SENSE_TYPE = "SENSE"
|
|
17
|
+
SYSTEM_TYPE = "SYSTEM"
|
|
18
|
+
|
|
19
|
+
ACT_ATTR = "ACT"
|
|
20
|
+
BODY_ATTR = "BODY"
|
|
21
|
+
CIRCUIT_ATTR = "CIRCUIT"
|
|
22
|
+
COMUART_ATTR = "COMUART"
|
|
23
|
+
DLY_ATTR = "DLY"
|
|
24
|
+
ENABLE_ATTR = "ENABLE"
|
|
25
|
+
FEATR_ATTR = "FEATR"
|
|
26
|
+
GPM_ATTR = "GPM"
|
|
27
|
+
HEATER_ATTR = "HEATER"
|
|
28
|
+
HNAME_ATTR = "HNAME"
|
|
29
|
+
HTMODE_ATTR = "HTMODE"
|
|
30
|
+
LISTORD_ATTR = "LISTORD"
|
|
31
|
+
LOTMP_ATTR = "LOTMP"
|
|
32
|
+
LSTTMP_ATTR = "LSTTMP"
|
|
33
|
+
MODE_ATTR = "MODE"
|
|
34
|
+
NORMAL_ATTR = "NORMAL"
|
|
35
|
+
OBJTYP_ATTR = "OBJTYP"
|
|
36
|
+
ORPTNK_ATTR = "ORPTNK"
|
|
37
|
+
ORPVAL_ATTR = "ORPVAL"
|
|
38
|
+
PARENT_ATTR = "PARENT"
|
|
39
|
+
PHVAL_ATTR = "PHVAL"
|
|
40
|
+
PHTNK_ATTR = "PHTNK"
|
|
41
|
+
PRIM_ATTR = "PRIM"
|
|
42
|
+
PROPNAME_ATTR = "PROPNAME"
|
|
43
|
+
PWR_ATTR = "PWR"
|
|
44
|
+
QUALTY_ATTR = "QUALTY"
|
|
45
|
+
READY_ATTR = "READY"
|
|
46
|
+
RPM_ATTR = "RPM"
|
|
47
|
+
SALT_ATTR = "SALT"
|
|
48
|
+
SEC_ATTR = "SEC"
|
|
49
|
+
SELECT_ATTR = "SELECT"
|
|
50
|
+
SHOMNU_ATTR = "SHOMNU"
|
|
51
|
+
SNAME_ATTR = "SNAME"
|
|
52
|
+
SOURCE_ATTR = "SOURCE"
|
|
53
|
+
STATIC_ATTR = "STATIC"
|
|
54
|
+
STATUS_ATTR = "STATUS"
|
|
55
|
+
SUBTYP_ATTR = "SUBTYP"
|
|
56
|
+
SUPER_ATTR = "SUPER"
|
|
57
|
+
TIME_ATTR = "TIME"
|
|
58
|
+
TIMOUT_ATTR = "TIMOUT"
|
|
59
|
+
USE_ATTR = "USE"
|
|
60
|
+
VACFLO_ATTR = "VACFLO"
|
|
61
|
+
VER_ATTR = "VER"
|
|
62
|
+
VOL_ATTR = "VOL"
|
|
63
|
+
|
|
64
|
+
USER_PRIVILEGES = {
|
|
65
|
+
"p": "Pool Access",
|
|
66
|
+
"P": "Pool temperature",
|
|
67
|
+
"h": "Pool Heat Mode",
|
|
68
|
+
"m": "Spa Access",
|
|
69
|
+
"S": "Spa Temperature",
|
|
70
|
+
"n": "Spa Heat Mode",
|
|
71
|
+
"e": "Schedule Access",
|
|
72
|
+
"v": "Vacation Mode",
|
|
73
|
+
"f": "Features Access",
|
|
74
|
+
"l": "Lights Access",
|
|
75
|
+
"c": "Chemistry Access",
|
|
76
|
+
"u": "Usage Access",
|
|
77
|
+
"C": "System Configuration",
|
|
78
|
+
"o": "Support",
|
|
79
|
+
"q": "Alerts and Notifications",
|
|
80
|
+
"i": "User Portal",
|
|
81
|
+
"k": "Groups",
|
|
82
|
+
"a": "Advanced Settings",
|
|
83
|
+
"t": "Status",
|
|
84
|
+
"x": "Service Mode Circuits",
|
|
85
|
+
"g": "General Settings",
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
# represents a body of water (pool or spa)
|
|
89
|
+
BODY_ATTRIBUTES = {
|
|
90
|
+
"ACT1", # (int) ???
|
|
91
|
+
"ACT2", # (int) ???
|
|
92
|
+
"ACT3", # (int) ???
|
|
93
|
+
"ACT4", # (int) ???
|
|
94
|
+
"FILTER", # (objnam) Circuit object that filter this body
|
|
95
|
+
HEATER_ATTR, # (objnam)
|
|
96
|
+
"HITMP", # (int) maximum temperature to set
|
|
97
|
+
HNAME_ATTR, # equals to OBJNAM
|
|
98
|
+
HTMODE_ATTR, # (int) >0 if currently heating, 0 if not
|
|
99
|
+
"HTSRC", # (objnam) the heating source (or '00000')
|
|
100
|
+
LISTORD_ATTR, # (int) used to order in UI
|
|
101
|
+
LOTMP_ATTR, # (int) desired temperature
|
|
102
|
+
LSTTMP_ATTR, # (int) last recorded temperature
|
|
103
|
+
"MANHT", # Manual heating ???
|
|
104
|
+
"MANUAL", # (int) ???
|
|
105
|
+
PARENT_ATTR, # (objnam) parent object
|
|
106
|
+
"PRIM", # (int) ???
|
|
107
|
+
READY_ATTR, # (ON/OFF) ???
|
|
108
|
+
"SEC", # (int) ???
|
|
109
|
+
"SETPT", # (int) set point (same as 'LOTMP' AFAIK)
|
|
110
|
+
"SHARE", # (objnam) sharing with that other body?
|
|
111
|
+
SNAME_ATTR, # (str) friendly name
|
|
112
|
+
"SRCTYP", # ??? only seeing "GENERIC"
|
|
113
|
+
STATIC_ATTR, # (ON/OFF) 'OFF'
|
|
114
|
+
STATUS_ATTR, # (ON/OFF) 'ON' is body is "active"
|
|
115
|
+
SUBTYP_ATTR, # 'POOL' or 'SPA'
|
|
116
|
+
VOL_ATTR, # (int) Volume in Gallons
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
CHEM_ATTRIBUTES = {
|
|
120
|
+
"ALK", # (int) IntelliChem: Alkalinity setting
|
|
121
|
+
BODY_ATTR, # (objnam) BODY being managed
|
|
122
|
+
"CALC", # (int) IntelliChem: Calcium Harness setting
|
|
123
|
+
"CHLOR", # (ON/OFF) IntelliChem: ??
|
|
124
|
+
COMUART_ATTR, # (int) X25 related ?
|
|
125
|
+
"CYACID", # (int) IntelliChem: Cyanuric Acid setting
|
|
126
|
+
LISTORD_ATTR, # (int) used to order in UI
|
|
127
|
+
"ORPHI", # (ON/OFF) IntelliChem: ORP Level too high?
|
|
128
|
+
"ORPLO", # (ON/OFF) IntelliChem: ORP Level too low?
|
|
129
|
+
"ORPSET", # (int) IntelliChem ORP level setting
|
|
130
|
+
ORPTNK_ATTR, # (int) IntelliChem: ORP Tank Level
|
|
131
|
+
ORPVAL_ATTR, # (int) IntelliChem: ORP Level
|
|
132
|
+
"PHHI", # (ON/OFF) IntelliChem: Ph Level too low?
|
|
133
|
+
"PHLO", # (ON/OFF) IntelliChem: Ph Level too low?
|
|
134
|
+
"PHSET", # (float) IntelliChem Ph level setting
|
|
135
|
+
PHTNK_ATTR, # (int) IntelliChem: Ph Tank Level
|
|
136
|
+
PHVAL_ATTR, # (float) IntelliChem: Ph Level
|
|
137
|
+
PRIM_ATTR, # (int) IntelliChlor: primary body output setting in %
|
|
138
|
+
QUALTY_ATTR, # (float) IntelliChem: Water Quality (Saturation Index)
|
|
139
|
+
SALT_ATTR, # (int) Salt level
|
|
140
|
+
SEC_ATTR, # (int) IntelliChlor: secondary body output setting in %
|
|
141
|
+
"SHARE", # (objnam) ??
|
|
142
|
+
"SINDEX", # (int) ??
|
|
143
|
+
SNAME_ATTR, # friendly name
|
|
144
|
+
SUBTYP_ATTR, # 'ICHLOR' for IntelliChlor, 'ICHEM' for IntelliChem
|
|
145
|
+
SUPER_ATTR, # (ON/OFF) IntelliChlor: turn on Boost mode (aka Super Chlorinate)
|
|
146
|
+
TIMOUT_ATTR, # (int) IntelliChlor: in seconds ??
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
CIRCGRP_ATTRIBUTES = {
|
|
150
|
+
ACT_ATTR,
|
|
151
|
+
CIRCUIT_ATTR,
|
|
152
|
+
DLY_ATTR,
|
|
153
|
+
LISTORD_ATTR,
|
|
154
|
+
PARENT_ATTR,
|
|
155
|
+
READY_ATTR,
|
|
156
|
+
STATIC_ATTR,
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
CIRCUIT_ATTRIBUTES = {
|
|
160
|
+
ACT_ATTR, # to be set for changing USE attribute
|
|
161
|
+
BODY_ATTR,
|
|
162
|
+
"CHILD",
|
|
163
|
+
"COVER",
|
|
164
|
+
"DNTSTP", # (ON/OFF) "Don't Stop", disable egg timer
|
|
165
|
+
FEATR_ATTR, # (ON/OFF) Featured
|
|
166
|
+
"FREEZE", # (ON/OFF) Freeze Protection
|
|
167
|
+
HNAME_ATTR, # equals to OBJNAM
|
|
168
|
+
"LIMIT",
|
|
169
|
+
LISTORD_ATTR, # (int) used to order in UI
|
|
170
|
+
"OBJLIST",
|
|
171
|
+
PARENT_ATTR, # OBJNAM of the parent object
|
|
172
|
+
READY_ATTR, # (ON/OFF) ??
|
|
173
|
+
SELECT_ATTR, # ???
|
|
174
|
+
"SET", # (ON/OFF) for light groups only
|
|
175
|
+
SHOMNU_ATTR, # (str) permissions
|
|
176
|
+
SNAME_ATTR, # (str) friendly name
|
|
177
|
+
STATIC_ATTR, # (ON/OFF) ??
|
|
178
|
+
STATUS_ATTR, # (ON/OFF) 'ON' if circuit is active
|
|
179
|
+
SUBTYP_ATTR, # subtype can be '?
|
|
180
|
+
"SWIM", # (ON/OFF) for light groups only
|
|
181
|
+
"SYNC", # (ON/OFF) for light groups only
|
|
182
|
+
TIME_ATTR, # (int) Egg Timer, number of minutes
|
|
183
|
+
"USAGE",
|
|
184
|
+
USE_ATTR, # for lights with light effects, indicate the 'color'
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
# represents External Equipment like covers
|
|
188
|
+
EXTINSTR_ATTRIBUTES = {
|
|
189
|
+
BODY_ATTR, # (objnam) which body it covers
|
|
190
|
+
HNAME_ATTR, # equals to OBJNAM
|
|
191
|
+
LISTORD_ATTR, # (int) used to order in UI
|
|
192
|
+
NORMAL_ATTR, # (ON/OFF) 'ON' for Cover State Normally On
|
|
193
|
+
PARENT_ATTR, # (objnam)
|
|
194
|
+
READY_ATTR, # (ON/OFF) ???
|
|
195
|
+
SNAME_ATTR, # (str) friendly name
|
|
196
|
+
STATIC_ATTR, # (ON/OFF) 'OFF'
|
|
197
|
+
STATUS_ATTR, # (ON/OFF) 'ON' if cover enabled
|
|
198
|
+
SUBTYP_ATTR, # only seen 'COVER'
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
# no idea what this represents
|
|
202
|
+
FEATR_ATTRIBUTES = {
|
|
203
|
+
HNAME_ATTR,
|
|
204
|
+
LISTORD_ATTR,
|
|
205
|
+
READY_ATTR,
|
|
206
|
+
SNAME_ATTR,
|
|
207
|
+
SOURCE_ATTR,
|
|
208
|
+
STATIC_ATTR,
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
HEATER_ATTRIBUTES = {
|
|
212
|
+
BODY_ATTR, # the objnam of the body the pump serves or a list (separated by a space)
|
|
213
|
+
"BOOST", # (int) ??
|
|
214
|
+
COMUART_ATTR, # X25 related?
|
|
215
|
+
"COOL", # (ON/OFF)
|
|
216
|
+
DLY_ATTR, # (int) ??
|
|
217
|
+
HNAME_ATTR, # equals to OBJNAM
|
|
218
|
+
HTMODE_ATTR, # (int) ??
|
|
219
|
+
LISTORD_ATTR, # (int) used to order in UI
|
|
220
|
+
PARENT_ATTR, # (objnam) parent (module) for this heater
|
|
221
|
+
READY_ATTR, # (ON/OFF)
|
|
222
|
+
SHOMNU_ATTR, # (str) permissions
|
|
223
|
+
SNAME_ATTR, # (str) friendly name
|
|
224
|
+
"START", # (int) ??
|
|
225
|
+
STATIC_ATTR, # (ON/OFF) 'OFF'
|
|
226
|
+
STATUS_ATTR, # (ON/OFF) only seen 'ON'
|
|
227
|
+
"STOP", # (int) ??
|
|
228
|
+
SUBTYP_ATTR, # type of heater 'GENERIC','SOLAR','ULTRA','HEATER'
|
|
229
|
+
TIME_ATTR, # (int) ??
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
MODULE_ATTRIBUTES = {
|
|
233
|
+
"CIRCUITS", # [ objects ] the objects that the module controls
|
|
234
|
+
PARENT_ATTR, # (objnam) the parent (PANEL) of the module
|
|
235
|
+
"PORT", # (int) no idea
|
|
236
|
+
SNAME_ATTR, # friendly name
|
|
237
|
+
STATIC_ATTR, # (ON/OFF) 'ON'
|
|
238
|
+
SUBTYP_ATTR, # type of the module (like 'I5P' or 'I8PS')
|
|
239
|
+
VER_ATTR, # (str) the version of the firmware for this module
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
PANEL_ATTRIBUTES = {
|
|
243
|
+
HNAME_ATTR, # equals to OBJNAM
|
|
244
|
+
LISTORD_ATTR, # (int) used to order in UI
|
|
245
|
+
"OBJLIST", # [ (objnam) ] the elements managed by the panel
|
|
246
|
+
"PANID", # ??? only seen 'SHARE'
|
|
247
|
+
SNAME_ATTR, # friendly name
|
|
248
|
+
STATIC_ATTR, # only seen 'ON'
|
|
249
|
+
SUBTYP_ATTR, # only seen 'OCP'
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
# represent a USER for the system
|
|
253
|
+
PERMIT_ATTRIBUTES = {
|
|
254
|
+
ENABLE_ATTR, # (ON/OFF) ON if user is enabled
|
|
255
|
+
"PASSWRD", # 4 digit code or ''
|
|
256
|
+
SHOMNU_ATTR, # privileges associated with this user
|
|
257
|
+
SNAME_ATTR, # friendly name
|
|
258
|
+
STATIC_ATTR, # (ON/OFF) only seen ON
|
|
259
|
+
SUBTYP_ATTR, # ADV for administrator, BASIC for guest
|
|
260
|
+
TIMOUT_ATTR, # (int) in minutes, timeout for user session
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
# represents a PUMP setting
|
|
264
|
+
PMPCIRC_ATTRIBUTES = {
|
|
265
|
+
BODY_ATTR, # not sure, I've only see '00000'
|
|
266
|
+
CIRCUIT_ATTR, # (objnam) the circuit this setting is for
|
|
267
|
+
GPM_ATTR, # (int): the flow setting for the pump if select is GPM
|
|
268
|
+
LISTORD_ATTR, # (int) used to order in UI
|
|
269
|
+
PARENT_ATTR, # (objnam) the pump the setting belongs to
|
|
270
|
+
"SPEED", # (int): the speed setting for the pump if select is RPM
|
|
271
|
+
SELECT_ATTR, # 'RPM' or 'GPM'
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
# no idea what this object type represents
|
|
275
|
+
# only seem to be one instance of it
|
|
276
|
+
PRESS_ATTRIBUTES = {
|
|
277
|
+
SHOMNU_ATTR, # (ON/OFF) ???
|
|
278
|
+
SNAME_ATTR, # seems equal to objnam
|
|
279
|
+
STATIC_ATTR, # (ON/OFF) only seen ON
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
# represents a PUMP
|
|
283
|
+
PUMP_ATTRIBUTES = {
|
|
284
|
+
BODY_ATTR, # the objnam of the body the pump serves or a list (separated by a space)
|
|
285
|
+
CIRCUIT_ATTR, # (int) ??? only seen 1
|
|
286
|
+
COMUART_ATTR, # X25 related?
|
|
287
|
+
HNAME_ATTR, # same as objnam
|
|
288
|
+
GPM_ATTR, # (int) when applicable, real time Gallon Per Minute
|
|
289
|
+
LISTORD_ATTR, # (int) used to order in UI
|
|
290
|
+
"MAX", # (int) maximum RPM
|
|
291
|
+
"MAXF", # (int) maximum GPM (if applicable, 0 otherwise)
|
|
292
|
+
"MIN", # (int) minimum RPM
|
|
293
|
+
"MINF", # (int) minimum GPM (if applicable, 0 otherwise)
|
|
294
|
+
"NAME", # seems to equal OBJNAM
|
|
295
|
+
"OBJLIST", # ([ objnam] ) a list of PMPCIRC settings
|
|
296
|
+
"PRIMFLO", # (int) Priming Speed
|
|
297
|
+
"PRIMTIM", # (int) Priming Time in minutes
|
|
298
|
+
"PRIOR", # (int) ???
|
|
299
|
+
PWR_ATTR, # (int) when applicable, real time Power usage in Watts
|
|
300
|
+
RPM_ATTR, # (int) when applicable, real time Rotation Per Minute
|
|
301
|
+
"SETTMP", # (int) Step size for RPM
|
|
302
|
+
"SETTMPNC", # (int) ???
|
|
303
|
+
SNAME_ATTR, # friendly name
|
|
304
|
+
STATUS_ATTR, # only seen 10 for on, 4 for off
|
|
305
|
+
SUBTYP_ATTR, # type of pump: 'SPEED' (variable speed), 'FLOW' (variable flow), 'VSF' (both)
|
|
306
|
+
"SYSTIM", # (int) ???
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
# represents a mapping between a remote button and a circuit
|
|
311
|
+
REMBTN_ATTRIBUTES = {
|
|
312
|
+
CIRCUIT_ATTR, # (objnam) the circuit triggered by the button
|
|
313
|
+
LISTORD_ATTR, # (int) which button on the remote (1 to 4)
|
|
314
|
+
PARENT_ATTR, # (objnam) the remote this button is associated with
|
|
315
|
+
STATIC_ATTR, # (ON/OFF) not sure, only seen 'ON'
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
# represents a REMOTE
|
|
319
|
+
REMOTE_ATTRIBUTES = {
|
|
320
|
+
BODY_ATTR, # (objnam) the body the remote controls
|
|
321
|
+
COMUART_ATTR, # X25 address?
|
|
322
|
+
ENABLE_ATTR, # (ON/OFF) 'ON' if the remote is set to active
|
|
323
|
+
HNAME_ATTR, # same as objnam
|
|
324
|
+
LISTORD_ATTR, # number likely used to order things in UI
|
|
325
|
+
SNAME_ATTR, # friendly name
|
|
326
|
+
STATIC_ATTR, # (ON/OFF) not sure, only seen 'OFF'
|
|
327
|
+
SUBTYP_ATTR, # type of the remote, I've only seen IS4
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
# represents a SCHEDULE
|
|
331
|
+
SCHED_ATTRIBUTES = {
|
|
332
|
+
ACT_ATTR, # (ON/OFF) ON is schedule is currently active
|
|
333
|
+
CIRCUIT_ATTR, # (objnam) the circuit controlled by this schedule
|
|
334
|
+
"DAY", # the days this schedule run (example: 'MTWRFAU' for every day, 'AU' for weekends)
|
|
335
|
+
"DNTSTP", # 'ON' or 'OFF" means Don't Stop. Set to ON to never end...
|
|
336
|
+
HEATER_ATTR, # set to a HEATER objnam is the schedule should trigger heating, '00000' for off, '00001' for Don't Change
|
|
337
|
+
HNAME_ATTR, # same as objnam
|
|
338
|
+
"HITMP", # number but not sure
|
|
339
|
+
LISTORD_ATTR, # number likely used to order things in UI
|
|
340
|
+
LOTMP_ATTR, # number. when heater is set, that is the desired temperature
|
|
341
|
+
"SINGLE", # 'ON' if the schedule is not to repeat
|
|
342
|
+
SNAME_ATTR, # the friendly name of the schedule
|
|
343
|
+
"START", # start time mode
|
|
344
|
+
# 'ABSTIM' means absolute and 'TIME' will be the startime
|
|
345
|
+
# 'SRIS' means Sunrise, 'SSET' means Sunset
|
|
346
|
+
STATIC_ATTR, # (ON/OFF) not sure, only seen 'OFF'
|
|
347
|
+
STATUS_ATTR, # 'ON' if schedule is active, 'OFF' otherwise
|
|
348
|
+
"STOP", # stop time mode ('ABSTIME','SRIS' or 'SSET')
|
|
349
|
+
TIME_ATTR, # time the schedule starts in 'HH,MM,SS' format (24h clock)
|
|
350
|
+
TIMOUT_ATTR, # time the schedule stops in 'HH,MM,SS' format (24h clock)
|
|
351
|
+
VACFLO_ATTR, # (ON/OFF) 'ON' if schedule only applies to Vacation Mode
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
# represents a SENSOR
|
|
355
|
+
SENSE_ATTRIBUTES = {
|
|
356
|
+
"CALIB", # (int) calibration value
|
|
357
|
+
HNAME_ATTR, # same as objnam
|
|
358
|
+
LISTORD_ATTR, # number likely used to order things in UI
|
|
359
|
+
MODE_ATTR, # I've only seen 'OFF' so far
|
|
360
|
+
"NAME", # I've only seen '00000'
|
|
361
|
+
PARENT_ATTR, # the parent's objnam
|
|
362
|
+
"PROBE", # the uncalibrated reading of the sensor
|
|
363
|
+
SNAME_ATTR, # friendly name
|
|
364
|
+
SOURCE_ATTR, # the calibrated reading of the sensor
|
|
365
|
+
STATIC_ATTR, # (ON/OFF) not sure, only seen 'ON'
|
|
366
|
+
STATUS_ATTR, # I've only seen 'OK' so far
|
|
367
|
+
SUBTYP_ATTR, # 'SOLAR','POOL' (for water), 'AIR'
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
# represent the (unique instance of) SYSTEM object
|
|
371
|
+
SYSTEM_ATTRIBUTES = [
|
|
372
|
+
ACT_ATTR, # ON/OFF but not sure what it does
|
|
373
|
+
"ADDRESS", # Pool Address
|
|
374
|
+
"AVAIL", # ON/OFF but not sure what it does
|
|
375
|
+
"CITY", # Pool City
|
|
376
|
+
"COUNTRY", # Country obviously (example 'United States')
|
|
377
|
+
"EMAIL", # primary email for the owner
|
|
378
|
+
"EMAIL2", # secondary email for the owner
|
|
379
|
+
"HEATING", # ON/OFF: Pump On During Heater Cool-Down Delay
|
|
380
|
+
HNAME_ATTR, # same as objnam
|
|
381
|
+
"LOCX", # (float) longitude
|
|
382
|
+
"LOCY", # (float) latitude
|
|
383
|
+
"MANHT", # ON/OFF: Manual Heat
|
|
384
|
+
MODE_ATTR, # unit system, 'METRIC' or 'ENGLISH'
|
|
385
|
+
"NAME", # name of the owner
|
|
386
|
+
"PASSWRD", # a 4 digit password or ''
|
|
387
|
+
"PHONE", # primary phone number for the owner
|
|
388
|
+
"PHONE2", # secondary phone number for the owner
|
|
389
|
+
PROPNAME_ATTR, # name of the property
|
|
390
|
+
"SERVICE", # 'AUTO' for automatic
|
|
391
|
+
SNAME_ATTR, # a crazy looking string I assume to be unique to this system
|
|
392
|
+
"START", # almost looks like a date but no idea
|
|
393
|
+
"STATE", # Pool State
|
|
394
|
+
STATUS_ATTR, # ON/OFF
|
|
395
|
+
"STOP", # same value as START
|
|
396
|
+
"TEMPNC", # ON/OFF
|
|
397
|
+
"TIMZON", # (int) Time Zone (example '-8' for US Pacific)
|
|
398
|
+
VACFLO_ATTR, # ON/OFF, vacation mode
|
|
399
|
+
"VACTIM", # ON/OFF
|
|
400
|
+
"VALVE", # ON/OFF: Pump Off During Valve Action
|
|
401
|
+
VER_ATTR, # (str) software version
|
|
402
|
+
"ZIP", # Pool Zip Code
|
|
403
|
+
]
|
|
404
|
+
|
|
405
|
+
# represents the system CLOCK
|
|
406
|
+
# note that there are 2 clocks in the system
|
|
407
|
+
# one only contains the SOURCE attribute
|
|
408
|
+
# the other everything but SOURCE
|
|
409
|
+
SYSTIM_ATTRIBUTES = {
|
|
410
|
+
"CLK24A", # clock mode, 'AMPM' or 'HR24'
|
|
411
|
+
"DAY", # in 'MM,DD,YY' format
|
|
412
|
+
"DLSTIM", # ON/OFF, ON for following DST
|
|
413
|
+
HNAME_ATTR, # same as objnam
|
|
414
|
+
"LOCX", # (float) longitude
|
|
415
|
+
"LOCY", # (float) latitude
|
|
416
|
+
"MIN", # in 'HH,MM,SS' format (24h clock)
|
|
417
|
+
SNAME_ATTR, # unused really, likely equals to OBJNAM
|
|
418
|
+
SOURCE_ATTR, # set to URL if time is from the internet
|
|
419
|
+
STATIC_ATTR, # (ON/OFF) not sure, only seen 'ON'
|
|
420
|
+
"TIMZON", # (int) timezone (example '-8' for US Pacific)
|
|
421
|
+
"ZIP", # ZipCode
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
VALVE_ATTRIBUTES = {
|
|
425
|
+
"ASSIGN", # 'NONE', 'INTAKE' or 'RETURN'
|
|
426
|
+
CIRCUIT_ATTR, # I've only seen '00000'
|
|
427
|
+
DLY_ATTR, # (ON/OFF)
|
|
428
|
+
HNAME_ATTR, # same as objnam
|
|
429
|
+
PARENT_ATTR, # (objnam) parent (a module)
|
|
430
|
+
SNAME_ATTR, # friendly name
|
|
431
|
+
STATIC_ATTR, # (ON/OFF) I've only seen 'OFF'
|
|
432
|
+
SUBTYP_ATTR, # I've only seen 'LEGACY'
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
ALL_ATTRIBUTES_BY_TYPE = {
|
|
436
|
+
BODY_TYPE: BODY_ATTRIBUTES,
|
|
437
|
+
CHEM_TYPE: CHEM_ATTRIBUTES,
|
|
438
|
+
CIRCGRP_TYPE: CIRCGRP_ATTRIBUTES,
|
|
439
|
+
CIRCUIT_TYPE: CIRCUIT_ATTRIBUTES,
|
|
440
|
+
EXTINSTR_TYPE: EXTINSTR_ATTRIBUTES,
|
|
441
|
+
"FEATR": FEATR_ATTRIBUTES,
|
|
442
|
+
HEATER_TYPE: HEATER_ATTRIBUTES,
|
|
443
|
+
"MODULE": MODULE_ATTRIBUTES,
|
|
444
|
+
"PANEL": PANEL_ATTRIBUTES,
|
|
445
|
+
PMPCIRC_TYPE: PMPCIRC_ATTRIBUTES,
|
|
446
|
+
"PRESS": PRESS_ATTRIBUTES,
|
|
447
|
+
PUMP_TYPE: PUMP_ATTRIBUTES,
|
|
448
|
+
REMBTN_TYPE: REMBTN_ATTRIBUTES,
|
|
449
|
+
REMOTE_TYPE: REMOTE_ATTRIBUTES,
|
|
450
|
+
SCHED_TYPE: SCHED_ATTRIBUTES,
|
|
451
|
+
SENSE_TYPE: SENSE_ATTRIBUTES,
|
|
452
|
+
SYSTEM_TYPE: SYSTEM_ATTRIBUTES,
|
|
453
|
+
"SYSTIM": SYSTIM_ATTRIBUTES,
|
|
454
|
+
"VALVE": VALVE_ATTRIBUTES,
|
|
455
|
+
}
|