python-omnilogic-local 0.5.1__py3-none-any.whl → 0.6.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pyomnilogic_local/exceptions.py +10 -0
- pyomnilogic_local/models/mspconfig.py +7 -3
- pyomnilogic_local/models/telemetry.py +7 -5
- pyomnilogic_local/protocol.py +2 -1
- pyomnilogic_local/types.py +1 -13
- {python_omnilogic_local-0.5.1.dist-info → python_omnilogic_local-0.6.1.dist-info}/METADATA +1 -1
- {python_omnilogic_local-0.5.1.dist-info → python_omnilogic_local-0.6.1.dist-info}/RECORD +9 -8
- {python_omnilogic_local-0.5.1.dist-info → python_omnilogic_local-0.6.1.dist-info}/WHEEL +0 -0
- {python_omnilogic_local-0.5.1.dist-info → python_omnilogic_local-0.6.1.dist-info}/entry_points.txt +0 -0
@@ -4,20 +4,19 @@ import logging
|
|
4
4
|
import sys
|
5
5
|
from typing import Any, Literal, TypeAlias
|
6
6
|
|
7
|
-
from ..types import OmniParsingException
|
8
|
-
|
9
7
|
if sys.version_info >= (3, 11):
|
10
8
|
from typing import Self
|
11
9
|
else:
|
12
10
|
from typing_extensions import Self
|
13
11
|
|
14
|
-
|
15
12
|
from pydantic import BaseModel, Field, ValidationError
|
16
13
|
from xmltodict import parse as xml_parse
|
17
14
|
|
15
|
+
from ..exceptions import OmniParsingException
|
18
16
|
from ..types import (
|
19
17
|
BodyOfWaterType,
|
20
18
|
ColorLogicLightType,
|
19
|
+
ColorLogicShow,
|
21
20
|
FilterType,
|
22
21
|
HeaterType,
|
23
22
|
OmniType,
|
@@ -143,6 +142,11 @@ class MSPColorLogicLight(OmniBase):
|
|
143
142
|
omni_type: OmniType = OmniType.CL_LIGHT
|
144
143
|
type: ColorLogicLightType | str = Field(alias="Type")
|
145
144
|
v2_active: Literal["yes", "no"] | None = Field(alias="V2-Active")
|
145
|
+
effects: list[ColorLogicShow] | None
|
146
|
+
|
147
|
+
def __init__(self, **data: Any) -> None:
|
148
|
+
super().__init__(**data)
|
149
|
+
self.effects = list(ColorLogicShow) if self.v2_active == "yes" else [show for show in ColorLogicShow if show.value <= 16]
|
146
150
|
|
147
151
|
|
148
152
|
class MSPBoW(OmniBase):
|
@@ -5,6 +5,7 @@ from typing import Any, SupportsInt, TypeAlias, TypeVar, cast, overload
|
|
5
5
|
from pydantic import BaseModel, Field, ValidationError
|
6
6
|
from xmltodict import parse as xml_parse
|
7
7
|
|
8
|
+
from ..exceptions import OmniParsingException
|
8
9
|
from ..types import (
|
9
10
|
BackyardState,
|
10
11
|
ChlorinatorOperatingMode,
|
@@ -17,7 +18,6 @@ from ..types import (
|
|
17
18
|
FilterWhyOn,
|
18
19
|
HeaterMode,
|
19
20
|
HeaterState,
|
20
|
-
OmniParsingException,
|
21
21
|
OmniType,
|
22
22
|
PumpState,
|
23
23
|
RelayState,
|
@@ -47,8 +47,9 @@ class TelemetryBackyard(BaseModel):
|
|
47
47
|
status_version: int = Field(alias="@statusVersion")
|
48
48
|
air_temp: int = Field(alias="@airTemp")
|
49
49
|
state: BackyardState | int = Field(alias="@state")
|
50
|
-
|
51
|
-
|
50
|
+
# The below two fields are only available for telemetry with a status_version >= 11
|
51
|
+
config_checksum: int | None = Field(alias="@ConfigChksum")
|
52
|
+
msp_version: str | None = Field(alias="@mspVersion")
|
52
53
|
|
53
54
|
|
54
55
|
class TelemetryBoW(BaseModel):
|
@@ -115,7 +116,7 @@ class TelemetryPump(BaseModel):
|
|
115
116
|
omni_type: OmniType = OmniType.PUMP
|
116
117
|
system_id: int = Field(alias="@systemId")
|
117
118
|
state: PumpState | int = Field(alias="@pumpState")
|
118
|
-
speed: int = Field(alias="@
|
119
|
+
speed: int = Field(alias="@pumpSpeed")
|
119
120
|
last_speed: int = Field(alias="@lastSpeed")
|
120
121
|
why_on: int = Field(alias="@whyOn")
|
121
122
|
|
@@ -172,7 +173,7 @@ class Telemetry(BaseModel):
|
|
172
173
|
pump: list[TelemetryPump] | None = Field(alias="Pump")
|
173
174
|
relay: list[TelemetryRelay] | None = Field(alias="Relay")
|
174
175
|
valve_actuator: list[TelemetryValveActuator] | None = Field(alias="ValveActuator")
|
175
|
-
virtual_heater: TelemetryVirtualHeater | None = Field(alias="VirtualHeater")
|
176
|
+
virtual_heater: list[TelemetryVirtualHeater] | None = Field(alias="VirtualHeater")
|
176
177
|
|
177
178
|
class Config:
|
178
179
|
orm_mode = True
|
@@ -225,6 +226,7 @@ class Telemetry(BaseModel):
|
|
225
226
|
OmniType.PUMP,
|
226
227
|
OmniType.RELAY,
|
227
228
|
OmniType.VALVE_ACTUATOR,
|
229
|
+
OmniType.VIRT_HEATER,
|
228
230
|
),
|
229
231
|
)
|
230
232
|
try:
|
pyomnilogic_local/protocol.py
CHANGED
@@ -9,8 +9,9 @@ import zlib
|
|
9
9
|
|
10
10
|
from typing_extensions import Self
|
11
11
|
|
12
|
+
from .exceptions import OmniTimeoutException
|
12
13
|
from .models.leadmessage import LeadMessage
|
13
|
-
from .types import ClientType, MessageType
|
14
|
+
from .types import ClientType, MessageType
|
14
15
|
|
15
16
|
_LOGGER = logging.getLogger(__name__)
|
16
17
|
|
pyomnilogic_local/types.py
CHANGED
@@ -121,7 +121,7 @@ class ColorLogicShow(PrettyEnum):
|
|
121
121
|
USA = 14
|
122
122
|
MARDI_GRAS = 15
|
123
123
|
COOL_CABARET = 16
|
124
|
-
####
|
124
|
+
#### The below options only work on lights that support OmniDirect / V2-Active in MSPConfig
|
125
125
|
YELLOW = 17
|
126
126
|
ORANGE = 18
|
127
127
|
GOLD = 19
|
@@ -300,15 +300,3 @@ class SensorUnits(str, PrettyEnum):
|
|
300
300
|
class ValveActuatorState(PrettyEnum):
|
301
301
|
OFF = 0
|
302
302
|
ON = 1
|
303
|
-
|
304
|
-
|
305
|
-
class OmniLogicException(Exception):
|
306
|
-
pass
|
307
|
-
|
308
|
-
|
309
|
-
class OmniTimeoutException(OmniLogicException):
|
310
|
-
pass
|
311
|
-
|
312
|
-
|
313
|
-
class OmniParsingException(OmniLogicException):
|
314
|
-
pass
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: python-omnilogic-local
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.6.1
|
4
4
|
Summary: A library for local control of Hayward OmniHub/OmniLogic pool controllers using their local API
|
5
5
|
Home-page: https://github.com/cryptk/python-omnilogic-local
|
6
6
|
License: Apache-2.0
|
@@ -1,17 +1,18 @@
|
|
1
1
|
pyomnilogic_local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
pyomnilogic_local/api.py,sha256=JpNpDcPDuCZhimyTT7YaMepi0JAFAihCTxJQJngzqq8,21453
|
3
3
|
pyomnilogic_local/cli.py,sha256=jHAhN_VfjgEVbXlvLsPdgNSab-jY8XntpXoek0I1Vfc,3921
|
4
|
+
pyomnilogic_local/exceptions.py,sha256=7-EYTP-_VgGrA8WWGwQPUE1NGjJEDWB-ovyvSM2iaNY,164
|
4
5
|
pyomnilogic_local/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
6
|
pyomnilogic_local/models/const.py,sha256=j4HSiPJW5If296yJ-AiIsBI9EdlckF4QkVFIpTLb5C4,51
|
6
7
|
pyomnilogic_local/models/filter_diagnostics.py,sha256=N4YWl9aEMKcWZ4QOlqR68WV9H1WjTtxjs0wHrNojAaU,1532
|
7
8
|
pyomnilogic_local/models/leadmessage.py,sha256=9r6PbIHHzD0tyeKiFUve3WLcjS8uL2Gj6r_96X7l5H8,407
|
8
|
-
pyomnilogic_local/models/mspconfig.py,sha256=
|
9
|
-
pyomnilogic_local/models/telemetry.py,sha256=
|
9
|
+
pyomnilogic_local/models/mspconfig.py,sha256=nb7Iqy8mP9GQ8vwI9NQb_-I5vwHJfhMDdUdayUmcRCg,8352
|
10
|
+
pyomnilogic_local/models/telemetry.py,sha256=IP8InR_sHYwYtgF6v7WlxqwB9nFEmW9HHFcuhZ_07D8,9968
|
10
11
|
pyomnilogic_local/models/util.py,sha256=3Qch98NOl5eO-KIOUBnE9ar86MlzbZ0g2LRApMgj-co,1476
|
11
|
-
pyomnilogic_local/protocol.py,sha256=
|
12
|
-
pyomnilogic_local/types.py,sha256=
|
12
|
+
pyomnilogic_local/protocol.py,sha256=JxJwtjHC11FXPCK6hc5FtXnxgJ5GyNkXqpjT0cFHvb4,10189
|
13
|
+
pyomnilogic_local/types.py,sha256=PiLvBBQl-amj0P2rRa15IP0Ebrfc23IzBqZNgIhQWOA,6325
|
13
14
|
pyomnilogic_local/util.py,sha256=agbRBKnecrYycC9iUmo1aJDjbVg9VxHyq4QY0D8-bfA,359
|
14
|
-
python_omnilogic_local-0.
|
15
|
-
python_omnilogic_local-0.
|
16
|
-
python_omnilogic_local-0.
|
17
|
-
python_omnilogic_local-0.
|
15
|
+
python_omnilogic_local-0.6.1.dist-info/METADATA,sha256=UwcSfI4kCyQG_AoLs0sjP_4yVAiU5O4HZLGUNiXI080,2727
|
16
|
+
python_omnilogic_local-0.6.1.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
17
|
+
python_omnilogic_local-0.6.1.dist-info/entry_points.txt,sha256=PUvdumqSijeB0dHH_s5oE2TnWtPWdJSNpSOsn8yTtOo,56
|
18
|
+
python_omnilogic_local-0.6.1.dist-info/RECORD,,
|
File without changes
|
{python_omnilogic_local-0.5.1.dist-info → python_omnilogic_local-0.6.1.dist-info}/entry_points.txt
RENAMED
File without changes
|