swilson / aqualogic Goto Github PK
View Code? Open in Web Editor NEWA python library to interface with a Hayward/Goldline AquaLogic/ProLogic pool controller.
License: MIT License
A python library to interface with a Hayward/Goldline AquaLogic/ProLogic pool controller.
License: MIT License
There is a key to toggle Pool/Spa, but the validation code will require adding some additional logic because Pool and Spa are separate LEDs.
Hi - did you ever get anywhere with the TriStar VS rs485 control? Would be interested to know if you investigated and found if the protocol was same/similar or complete different to the Ecostar pump documented here EcoStar
The tests don't run:
$ pytest tests
Test session starts (platform: linux, Python 3.9.2, pytest 6.0.2, pytest-sugar 0.9.3)
benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/fab/Documents/repos/aqualogic
plugins: asyncio-0.14.0, requests-mock-1.7.0, httpx-0.10.0, mock-3.3.1, benchmark-3.2.3, aresponses-2.0.0, forked-1.3.0, xdist-1.34.0, django-3.8.0, vcr-1.0.2, datafiles-2.0, pyfakefs-3.5.8, httpbin-1.0.0, sugar-0.9.3, aiohttp-0.3.0, cov-2.11.1, error-for-skips-2.0.2
collecting ...
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestAquaLogic.test_pool ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <tests.test_core.TestAquaLogic object at 0x7f6ab4039c70>
def test_pool(self):
reader = FileIO('tests/data/pool_on.bin')
> aq = AquaLogic(reader, None)
E TypeError: __init__() takes 1 positional argument but 3 were given
tests/test_core.py:16: TypeError
tests/test_core.py ⨯ 50% █████
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestAquaLogic.test_spa ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <tests.test_core.TestAquaLogic object at 0x7f6ab4039b20>
def test_spa(self):
reader = FileIO('tests/data/spa_on.bin')
> aq = AquaLogic(reader, None)
E TypeError: __init__() takes 1 positional argument but 3 were given
tests/test_core.py:33: TypeError
tests/test_core.py ⨯ 100% ██████████
====================================================================================================== short test summary info ======================================================================================================
FAILED tests/test_core.py::TestAquaLogic::test_pool - TypeError: __init__() takes 1 positional argument but 3 were given
FAILED tests/test_core.py::TestAquaLogic::test_spa - TypeError: __init__() takes 1 positional argument but 3 were given
Results (0.14s):
2 failed
- tests/test_core.py:14 TestAquaLogic.test_pool
- tests/test_core.py:31 TestAquaLogic.test_spa
Clean venv
with the latest commit.
The tests don't run:
$ pytest tests
Test session starts (platform: linux, Python 3.9.2, pytest 6.0.2, pytest-sugar 0.9.3)
benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/fab/Documents/repos/aqualogic
plugins: asyncio-0.14.0, requests-mock-1.7.0, httpx-0.10.0, mock-3.3.1, benchmark-3.2.3, aresponses-2.0.0, forked-1.3.0, xdist-1.34.0, django-3.8.0, vcr-1.0.2, datafiles-2.0, pyfakefs-3.5.8, httpbin-1.0.0, sugar-0.9.3, aiohttp-0.3.0, cov-2.11.1, error-for-skips-2.0.2
collecting ...
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestAquaLogic.test_pool ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <tests.test_core.TestAquaLogic object at 0x7f6ab4039c70>
def test_pool(self):
reader = FileIO('tests/data/pool_on.bin')
> aq = AquaLogic(reader, None)
E TypeError: __init__() takes 1 positional argument but 3 were given
tests/test_core.py:16: TypeError
tests/test_core.py ⨯ 50% █████
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestAquaLogic.test_spa ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <tests.test_core.TestAquaLogic object at 0x7f6ab4039b20>
def test_spa(self):
reader = FileIO('tests/data/spa_on.bin')
> aq = AquaLogic(reader, None)
E TypeError: __init__() takes 1 positional argument but 3 were given
tests/test_core.py:33: TypeError
tests/test_core.py ⨯ 100% ██████████
====================================================================================================== short test summary info ======================================================================================================
FAILED tests/test_core.py::TestAquaLogic::test_pool - TypeError: __init__() takes 1 positional argument but 3 were given
FAILED tests/test_core.py::TestAquaLogic::test_spa - TypeError: __init__() takes 1 positional argument but 3 were given
Results (0.14s):
2 failed
- tests/test_core.py:14 TestAquaLogic.test_pool
- tests/test_core.py:31 TestAquaLogic.test_spa
Clean venv
with the latest commit.
It seems that the tests are not terminating properly.
$ pytest
========================================================== test session starts ==========================================================
platform linux -- Python 3.9.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/fab/Documents/repos/aqualogic
collected 2 items
tests/test_core.py .F [100%]
=============================================================== FAILURES ================================================================
________________________________________________________ TestAquaLogic.test_spa _________________________________________________________
self = <tests.test_core.TestAquaLogic object at 0x7f086c5d04f0>
def test_spa(self):
> aq = AquaLogic()
tests/test_core.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aqualogic/core.py:70: in __init__
self._web.start(web_port)
aqualogic/web.py:37: in start
self._loop.run_until_complete(runner.setup())
/usr/lib64/python3.9/asyncio/base_events.py:618: in run_until_complete
self._check_running()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_UnixSelectorEventLoop running=True closed=False debug=False>
def _check_running(self):
if self.is_running():
> raise RuntimeError('This event loop is already running')
E RuntimeError: This event loop is already running
/usr/lib64/python3.9/asyncio/base_events.py:578: RuntimeError
======================================================== short test summary info ========================================================
FAILED tests/test_core.py::TestAquaLogic::test_spa - RuntimeError: This event loop is already running
====================================================== 1 failed, 1 passed in 0.84s ======================================================
^CException ignored in: <module 'threading' from '/usr/lib64/python3.9/threading.py'>
Traceback (most recent call last):
File "/usr/lib64/python3.9/threading.py", line 1428, in _shutdown
lock.acquire()
KeyboardInterrupt:
sys:1: RuntimeWarning: coroutine 'BaseRunner.setup' was never awaited
First: thanks for this library!
The library is able to read most of the bus messages (Display updates, LED updates, local wired key, etc) but is unable to change the state of the panel either via CLI or HASS.
After some debugging, I am seeing some differences in the protocol:
Wireless remote ("AquaPod") frame_type is 008c and not 0083 (?)
Lights key is apparently 0010 (? does not match AQ-CO-SERIAL manual)
local wired key event is 4 bytes instead of 2 (ex filter 8000000080000000) and followed by another transmission with the second key set to zero (maybe key release?) (ex filter 8000000000000000)
I changed the code locally to account for the different frame data, but it still does not work (requeues and fails eventually, sometime reports bad CRC). I can't figure out if somehow my transmission is just being ignored by the panel, if my wiring or RS485 converter is faulty or something else.
I am wondering if you have any ideas as to what is going wrong in this case, maybe there are some settings I missed in the RS485 web ui?
For a better description of the protocol differences here is my fork: https://github.com/mj-sakellaropoulos/aqualogic
My RS485 converter is from waveshare, but it's just a rebranded USRIOT one, same MAC vendor
My Panel PCB is model G1-011049D-1T, it looks like this one : https://www.inyopools.com/Products/07501352046539.htm
Main software revision is 4.10
I have the RS485 connected to the "remote display" screw terminal block
Hello Excellent code
I keep getting Bad CRC in the home assistant log. What is this? Is it a problem? It seems to be working
thanks
Bad CRC
6:30 PM components/aqualogic.py (WARNING)
Bad CRC
6:07 PM components/aqualogic.py (WARNING)
Bad CRC
6:03 PM components/aqualogic.py (WARNING)
Bad CRC
5:57 PM components/aqualogic.py (WARNING)
If the heater is in 'auto' mode and the heater isn't actually on, the heater LED won't switch states so the validation code will fail and retry the command. Need to parse the LCD text to figure out if the mode actually switched properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.