python-omnilogic-local 0.14.0__tar.gz → 0.14.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/PKG-INFO +1 -1
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/cli.py +22 -23
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/models/filter_diagnostics.py +1 -1
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyproject.toml +1 -1
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/LICENSE +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/README.md +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/__init__.py +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/api.py +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/exceptions.py +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/models/__init__.py +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/models/const.py +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/models/leadmessage.py +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/models/mspconfig.py +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/models/telemetry.py +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/models/util.py +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/protocol.py +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/types.py +0 -0
- {python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/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.14.
|
3
|
+
Version: 0.14.2
|
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
|
@@ -18,44 +18,43 @@ RELAY_SYSTEM_ID = 13
|
|
18
18
|
|
19
19
|
|
20
20
|
async def async_main() -> None:
|
21
|
-
|
22
|
-
mspconfig: MSPConfig
|
23
|
-
telem: Telemetry
|
21
|
+
filter_diags: FilterDiagnostics # pylint: disable=unused-variable # noqa: F842
|
22
|
+
mspconfig: MSPConfig
|
23
|
+
telem: Telemetry
|
24
24
|
|
25
25
|
omni = OmniLogicAPI(os.environ.get("OMNILOGIC_HOST", "127.0.0.1"), 10444, 5.0)
|
26
|
+
get_raw = os.environ.get("OMNILOGIC_RAW", False)
|
26
27
|
|
27
28
|
# Some basic calls to run some testing against the library
|
28
29
|
|
29
|
-
# Fetch the MSPConfig data
|
30
|
-
mspconfig = await omni.async_get_config()
|
31
|
-
# Fetch the MSPConfig data as the raw XML
|
32
|
-
# mspconfig = await omni.async_get_config(raw=True)
|
33
|
-
print(mspconfig)
|
30
|
+
# Fetch the MSPConfig data
|
31
|
+
mspconfig = await omni.async_get_config(raw=get_raw) # pylint: disable=unexpected-keyword-arg
|
34
32
|
|
35
|
-
# Fetch the current telemetry data
|
36
|
-
telem = await omni.async_get_telemetry()
|
37
|
-
# Fetch the current telemetry data as the raw XML
|
38
|
-
# telem = await omni.async_get_telemetry(raw=True)
|
39
|
-
print(telem)
|
33
|
+
# Fetch the current telemetry data
|
34
|
+
telem = await omni.async_get_telemetry(raw=get_raw) # pylint: disable=unexpected-keyword-arg
|
40
35
|
|
41
36
|
# Fetch a list of current alarms
|
42
37
|
# print(await omni.async_get_alarm_list())
|
43
38
|
|
44
39
|
# Fetch diagnostic data for a filter pump
|
45
|
-
|
46
|
-
|
40
|
+
# filter_diags = await omni.async_get_filter_diagnostics(POOL_ID, PUMP_EQUIPMENT_ID, raw=get_raw)
|
41
|
+
|
42
|
+
print(mspconfig)
|
43
|
+
print(telem)
|
44
|
+
# print(filter_diags)
|
45
|
+
|
47
46
|
# Decode the filter display revision
|
48
|
-
# b1=chr(
|
49
|
-
# b2=chr(
|
50
|
-
# b3=chr(
|
51
|
-
# b4=chr(
|
47
|
+
# b1=chr(filter_diags.get_param_by_name("DisplayFWRevisionB1"))
|
48
|
+
# b2=chr(filter_diags.get_param_by_name("DisplayFWRevisionB2"))
|
49
|
+
# b3=chr(filter_diags.get_param_by_name("DisplayFWRevisionB3"))
|
50
|
+
# b4=chr(filter_diags.get_param_by_name("DisplayFWRevisionB4"))
|
52
51
|
# b5 and b6 are whitespace and a null terminator
|
53
|
-
# b5=chr(
|
54
|
-
# b6=chr(
|
52
|
+
# b5=chr(filter_diags.get_param_by_name("DisplayFWRevisionB5"))
|
53
|
+
# b6=chr(filter_diags.get_param_by_name("DisplayFWRevisionB6"))
|
55
54
|
# print(f"{b1}{b2}.{b3}.{b4}")
|
56
55
|
# Decode the filter power consumption (don't do this, it's returned already decoded in the telemetry)
|
57
|
-
# p1=
|
58
|
-
# p2=
|
56
|
+
# p1=filter_diags.get_param_by_name("PowerMSB")
|
57
|
+
# p2=filter_diags.get_param_by_name("PowerLSB")
|
59
58
|
# The f-string below converts the bytes to hex and displays them. Just get this value from the telemetry, it's easier
|
60
59
|
# print(f"{p1:x}{p2:x}")
|
61
60
|
|
@@ -31,7 +31,7 @@ class FilterDiagnostics(BaseModel):
|
|
31
31
|
xml,
|
32
32
|
# Some things will be lists or not depending on if a pool has more than one of that piece of equipment. Here we are coercing
|
33
33
|
# everything that *could* be a list into a list to make the parsing more consistent.
|
34
|
-
force_list=("Parameter"
|
34
|
+
force_list=("Parameter"),
|
35
35
|
)
|
36
36
|
# The XML nests the Parameter entries under a Parameters entry, this is annoying to work with. Here we are adjusting the data to
|
37
37
|
# remove that extra level in the data
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "python-omnilogic-local"
|
3
|
-
version = "0.14.
|
3
|
+
version = "0.14.2"
|
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
|
{python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/__init__.py
RENAMED
File without changes
|
File without changes
|
{python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/exceptions.py
RENAMED
File without changes
|
{python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/models/__init__.py
RENAMED
File without changes
|
{python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/models/const.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/models/util.py
RENAMED
File without changes
|
{python_omnilogic_local-0.14.0 → python_omnilogic_local-0.14.2}/pyomnilogic_local/protocol.py
RENAMED
File without changes
|
File without changes
|
File without changes
|