python-omnilogic-local 0.5.1__tar.gz → 0.6.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/PKG-INFO +1 -1
- python_omnilogic_local-0.6.0/pyomnilogic_local/exceptions.py +10 -0
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/mspconfig.py +7 -3
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/telemetry.py +6 -4
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/protocol.py +2 -1
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/types.py +1 -13
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyproject.toml +1 -1
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/README.md +0 -0
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/__init__.py +0 -0
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/api.py +0 -0
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/cli.py +0 -0
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/__init__.py +0 -0
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/const.py +0 -0
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/filter_diagnostics.py +0 -0
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/leadmessage.py +0 -0
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/util.py +0 -0
- {python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/util.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: python-omnilogic-local
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.6.0
|
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
|
{python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/mspconfig.py
RENAMED
@@ -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):
|
{python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/telemetry.py
RENAMED
@@ -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
|
|
@@ -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:
|
@@ -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
|
|
@@ -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
|
[tool.poetry]
|
2
2
|
name = "python-omnilogic-local"
|
3
|
-
version = "0.
|
3
|
+
version = "0.6.0"
|
4
4
|
description = "A library for local control of Hayward OmniHub/OmniLogic pool controllers using their local API"
|
5
5
|
authors = ["cryptk <cryptk@users.noreply.github.com>", "djtimca", "garionphx"]
|
6
6
|
license = "Apache-2.0"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/__init__.py
RENAMED
File without changes
|
{python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/const.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{python_omnilogic_local-0.5.1 → python_omnilogic_local-0.6.0}/pyomnilogic_local/models/util.py
RENAMED
File without changes
|
File without changes
|