python-omnilogic-local 2.2.0__tar.gz → 2.3.0__tar.gz
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.
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/PKG-INFO +1 -1
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/debug/commands.py +38 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyproject.toml +1 -1
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/LICENSE +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/README.md +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/__init__.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/_base.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/__init__.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/api.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/constants.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/exceptions.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/message.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/mock_api.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/protocol.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/backyard.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/bow.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/chlorinator.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/chlorinator_equip.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/__init__.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/cli.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/debug/__init__.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/__init__.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/backyard.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/bows.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/chlorinators.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/commands.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/csads.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/filters.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/groups.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/heaters.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/lights.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/pumps.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/relays.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/schedules.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/sensors.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/valves.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/pcap_utils.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/utils.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/collections.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/colorlogiclight.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/csad.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/csad_equip.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/decorators.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/filter.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/groups.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/heater.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/heater_equip.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/__init__.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/const.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/exceptions.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/filter_diagnostics.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/leadmessage.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/mspconfig.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/telemetry.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/omnilogic.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/omnitypes.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/pump.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/py.typed +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/relay.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/schedule.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/sensor.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/system.py +0 -0
- {python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-omnilogic-local
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: A library for local control of Hayward OmniHub/OmniLogic pool controllers using their local API
|
|
5
5
|
Author: Chris Jowett, djtimca, garionphx
|
|
6
6
|
Author-email: Chris Jowett <421501+cryptk@users.noreply.github.com>
|
|
@@ -4,16 +4,21 @@
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
6
|
import asyncio
|
|
7
|
+
import xml.etree.ElementTree as ET
|
|
8
|
+
from enum import IntEnum
|
|
7
9
|
from pathlib import Path
|
|
8
10
|
from typing import TYPE_CHECKING, cast
|
|
9
11
|
|
|
10
12
|
import click
|
|
11
13
|
|
|
14
|
+
from pyomnilogic_local.api.constants import XML_ENCODING, XML_NAMESPACE
|
|
12
15
|
from pyomnilogic_local.cli.pcap_utils import parse_pcap_file, process_pcap_messages
|
|
16
|
+
from pyomnilogic_local.util import PrettyEnum
|
|
13
17
|
|
|
14
18
|
if TYPE_CHECKING:
|
|
15
19
|
from pyomnilogic_local import OmniLogic
|
|
16
20
|
from pyomnilogic_local.models.telemetry import TelemetryChlorinator
|
|
21
|
+
from pyomnilogic_local.omnitypes import MessageType
|
|
17
22
|
|
|
18
23
|
|
|
19
24
|
@click.group()
|
|
@@ -350,3 +355,36 @@ def set_csad_orp(ctx: click.Context, bow_id: int, csad_id: int, target: int) ->
|
|
|
350
355
|
except Exception as e:
|
|
351
356
|
click.echo(f"Error setting CSAD ORP target: {e}", err=True)
|
|
352
357
|
raise click.Abort from e
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
@debug.command()
|
|
361
|
+
@click.argument("bow_id", type=int)
|
|
362
|
+
@click.argument("csad_id", type=int)
|
|
363
|
+
@click.argument("opid", type=int)
|
|
364
|
+
@click.argument("is_on")
|
|
365
|
+
@click.pass_context
|
|
366
|
+
def set_csad_enable(ctx: click.Context, bow_id: int, csad_id: int, opid: int, is_on: bool) -> None:
|
|
367
|
+
"""Attempt to enable or disable a CSAD (Chemical Sense and Dispense) device."""
|
|
368
|
+
omnilogic: OmniLogic = ctx.obj["OMNILOGIC"]
|
|
369
|
+
|
|
370
|
+
body_element = ET.Element("Request", {"xmlns": XML_NAMESPACE})
|
|
371
|
+
|
|
372
|
+
name_element = ET.SubElement(body_element, "Name")
|
|
373
|
+
name_element.text = "UISetCSADEnabled"
|
|
374
|
+
|
|
375
|
+
parameters_element = ET.SubElement(body_element, "Parameters")
|
|
376
|
+
parameter = ET.SubElement(parameters_element, "Parameter", name="poolId", dataType="int")
|
|
377
|
+
parameter.text = str(bow_id)
|
|
378
|
+
parameter = ET.SubElement(parameters_element, "Parameter", name="CSADID", dataType="int", alias="EquipmentID")
|
|
379
|
+
parameter.text = str(csad_id)
|
|
380
|
+
parameter = ET.SubElement(parameters_element, "Parameter", name="Enabled", dataType="bool", alias="Data")
|
|
381
|
+
parameter.text = str(int(is_on))
|
|
382
|
+
|
|
383
|
+
req_body = ET.tostring(body_element, xml_declaration=True, encoding=XML_ENCODING)
|
|
384
|
+
|
|
385
|
+
class CustomMessageType(PrettyEnum, IntEnum):
|
|
386
|
+
SET_CSAD_ENABLE = opid
|
|
387
|
+
|
|
388
|
+
click.echo(f"Sending UISetCSADEnabled with op ID: {opid}; body: {req_body}")
|
|
389
|
+
|
|
390
|
+
asyncio.run(omnilogic._api.async_send(cast("MessageType", CustomMessageType.SET_CSAD_ENABLE), req_body))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/constants.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/exceptions.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/message.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/mock_api.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/api/protocol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/chlorinator.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/chlorinator_equip.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/__init__.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/backyard.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/bows.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/commands.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/csads.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/filters.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/groups.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/heaters.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/lights.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/pumps.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/relays.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/schedules.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/sensors.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/get/valves.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/pcap_utils.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/cli/utils.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/collections.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/colorlogiclight.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/csad_equip.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/heater_equip.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/__init__.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/const.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/mspconfig.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/models/telemetry.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/omnilogic.py
RENAMED
|
File without changes
|
{python_omnilogic_local-2.2.0 → python_omnilogic_local-2.3.0}/pyomnilogic_local/omnitypes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|