There is some weird data on the bus (00 E0 18 00 E6 00 18 1E E0 1E), but it should get ignored because it isn’t framed correctly. Do you see multiple retries in the log when you try to toggle a switch from HA?
Here below is another run of the HEX from my controller
I removed all the 10 02 01 01 00 14 10 03 to make it shorter for the post here
Just after starting the recording of the HEX I toggled the pool light in HA but nothing no lights.
I did do some testing with USR-TCP232-Test V1.4.exe and if I keep sending over and over the below HEX The pool light will turn on and off.
(This hex I found in the comments at http://www.desert-home.com/p/swimming-pool.html#Protocol)
Lights
10 2 0 5 20 0 20 0 7F 0 D6 10 3 On
10 2 0 5 0 20 0 20 7F 0 D6 10 3 Off
I think its some type of timing issue? I’m certainly a rookie at RS485
HEX
10 02 01 03 20 20 20 20 20 20 20 20 46 61 6E 20 20 20 20 20 20 20 20 20 20 20 20 20 47 72 6F 75 70 20 41 63 74 69 76 65 20 20 20 20 00 08 D4 10 03
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 20 20 20 20 46 61 6E 20 20 20 20 20 20 20 20 20 20 20 20 20 47 72 6F 75 70 20 41 63 74 69 76 65 20 20 20 20 00 08 D4 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 20 20 20 20 46 61 6E 20 20 20 20 20 20 20 20 20 20 20 20 20 47 72 6F 75 70 20 41 63 74 69 76 65 20 20 20 20 00 08 D4 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 01 03 20 20 20 20 46 69 6C 74 65 72 20 53 70 65 65 64 20 20 20 20 20 20 20 20 20 20 20 20 34 30 25 20 20 20 20 20 20 20 20 20 00 08 36 10 03
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 46 69 6C 74 65 72 20 53 70 65 65 64 20 20 20 20 20 20 20 20 20 20 20 20 34 30 25 20 20 20 20 20 20 20 20 20 00 08 36 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 46 69 6C 74 65 72 20 53 70 65 65 64 20 20 20 20 20 20 20 20 20 20 20 20 34 30 25 20 20 20 20 20 20 20 20 20 00 08 36 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 01 03 20 20 20 20 20 20 20 46 72 69 64 61 79 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 39 BA 30 38 41 20 20 20 20 20 20 20 00 07 B1 10 03
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 20 20 20 46 72 69 64 61 79 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 39 BA 30 38 41 20 20 20 20 20 20 20 00 07 B1 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 20 20 20 46 72 69 64 61 79 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 39 BA 30 38 41 20 20 20 20 20 20 20 00 07 B1 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 01 03 20 20 50 6F 6F 6C 20 54 65 6D 70 20 20 38 32 5F 46 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00 07 D5 10 03
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 50 6F 6F 6C 20 54 65 6D 70 20 20 38 32 5F 46 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00 07 D5 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 50 6F 6F 6C 20 54 65 6D 70 20 20 38 32 5F 46 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00 07 D5 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 01 03 20 20 41 69 72 20 54 65 6D 70 20 20 20 36 34 5F 46 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00 07 77 10 03
10 02 0C 01 00 28 00 47 10 03 10 20 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 2C 20 00 00 20 00 00 00 00 81 10 03
10 02 01 02 2C 20 00 00 20 00 00 00 00 81 10 03 10 02 01 03 20 20 41 69 72 20 54 65 6D 70 20 20 20 36 34 5F 46 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00 07 77 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 41 69 72 20 54 65 6D 70 20 20 20 36 34 5F 46 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 00 07 77 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 01 03 20 20 50 6F 6F 6C 20 43 68 6C 6F 72 69 6E 61 74 6F 72 20 20 20 20 20 20 20 20 20 20 31 35 25 20 20 20 20 20 20 20 20 20 00 09 80 10 03
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 50 6F 6F 6C 20 43 68 6C 6F 72 69 6E 61 74 6F 72 20 20 20 20 20 20 20 20 20 20 31 35 25 20 20 20 20 20 20 20 20 20 00 09 80 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 50 6F 6F 6C 20 43 68 6C 6F 72 69 6E 61 74 6F 72 20 20 20 20 20 20 20 20 20 20 31 35 25 20 20 20 20 20 20 20 20 20 00 09 80 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 01 03 20 20 20 20 20 53 61 6C 74 20 4C 65 76 65 6C 20 20 20 20 20 20 20 20 20 20 20 33 36 30 30 20 50 50 4D 20 20 20 20 20 20 00 08 58 10 03
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 20 53 61 6C 74 20 4C 65 76 65 6C 20 20 20 20 20 20 20 20 20 20 20 33 36 30 30 20 50 50 4D 20 20 20 20 20 20 00 08 58 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 04 07 00 1D 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 20 53 61 6C 74 20 4C 65 76 65 6C 20 20 20 20 20 20 20 20 20 20 20 33 36 30 30 20 50 50 4D 20 20 20 20 20 20 00 08 58 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 01 03 20 20 20 20 46 61 6E 20 20 20 20 2D 43 6F 75 6E 74 44 6E 20 20 20 20 32 BA 34 37 20 72 65 6D 61 69 6E 69 6E 67 20 20 20 00 0B 24 10 03
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 46 61 6E 20 20 20 20 2D 43 6F 75 6E 74 44 6E 20 20 20 20 32 BA 34 37 20 72 65 6D 61 69 6E 69 6E 67 20 20 20 00 0B 24 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 46 61 6E 20 20 20 20 2D 43 6F 75 6E 74 44 6E 20 20 20 20 32 BA 34 37 20 72 65 6D 61 69 6E 69 6E 67 20 20 20 00 0B 24 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 01 03 20 20 20 20 20 20 48 65 61 74 65 72 31 20 20 20 20 20 20 20 20 20 20 20 41 75 74 6F 20 43 6F 6E 74 72 6F 6C 20 20 20 20 00 09 DA 10 03
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 20 20 48 65 61 74 65 72 31 20 20 20 20 20 20 20 20 20 20 20 41 75 74 6F 20 43 6F 6E 74 72 6F 6C 20 20 20 20 00 09 DA 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 20 20 48 65 61 74 65 72 31 20 20 20 20 20 20 20 20 20 20 20 41 75 74 6F 20 43 6F 6E 74 72 6F 6C 20 20 20 20 00 09 DA 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 01 03 20 20 20 20 20 20 20 20 46 61 6E 20 20 20 20 20 20 20 20 20 20 20 20 20 47 72 6F 75 70 20 41 63 74 69 76 65 20 20 20 20 00 08 D4 10 03
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 20 20 20 20 46 61 6E 20 20 20 20 20 20 20 20 20 20 20 20 20 47 72 6F 75 70 20 41 63 74 69 76 65 20 20 20 20 00 08 D4 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 20 20 20 20 46 61 6E 20 20 20 20 20 20 20 20 20 20 20 20 20 47 72 6F 75 70 20 41 63 74 69 76 65 20 20 20 20 00 08 D4 10 03
00 E0 18 00 E6 00 18 1E E0 1E
10 02 01 03 20 20 20 20 46 69 6C 74 65 72 20 53 70 65 65 64 20 20 20 20 20 20 20 20 20 20 20 20 34 30 25 20 20 20 20 20 20 20 20 20 00 08 36 10 03
10 02 0C 01 00 28 00 47 10 03 10 02 00 0C 00 00 28 01 51 00 98 10 03
10 02 01 02 28 20 00 00 20 00 00 00 00 7D 10 03 10 02 01 03 20 20 20 20 46 69 6C 74 65 72 20 53 70 65 65 64 20 20 20 20 20 20 20 20 20 20 20 20 34 30 25 20 20 20 20 20 20 20 20 20 00 08 36 10 03
I often get an error in HA history “Pool Bridge Comm” that may be the 00 E0 18 00 E6 00 18 1E E0 1E. Hayward has that error in their manual I am gong to look at the wireing again.
Maybe you can help. Currently I have my pump and the rs485 adaptor connected to the main Hayward prologic board at the remote display connector. The Ethernet rs485 adaptor is connected A B Ground. And the pump is just A B. Maybe I should add ground to the pump. Does that sound correct?
The plug on the main prologic board from top to bottom is marked Red = 12 v? Not used. Black = A. Yellow = B. Green = ground.
Thanks in advance for any help
Do you get the error when you try to send a command from HA, or does it just happen randomly? IIRC my Tristar VS is just connected with two wires (it’s -10 Celsius here so I’m not going out to the pool shed to double check ).
Note the aqualogic code uses the 00 03 command to toggle switches as that’s what my system uses; it is pretty old though so the protocol may have changed. You may want to capture the log while toggling the lights from the main control panel. That should show you what toggle command your system is using.
The 00 E0 18 00 E6 00 18 1E E0 1E is constant without any HA commands sent. Strange?
Here is so far what I was able to get out of the RS485 test software. I was able to send all the HEX below back with the test software to the system to make each button turn on and off. I had to send it back constantly, clicking many times and after a while, it would switch.
Filter 10 02 00 02 80 00 00 00 80 00 00 00 01 14 10 03
Lights 10 02 00 02 00 01 00 00 00 01 00 00 00 16 10 03
Heater 1 10 02 00 02 00 00 04 00 00 00 04 00 00 1C 10 03
Valve 3 10 02 00 02 00 00 01 00 00 00 01 00 00 16 10 03
Valve 4 10 02 00 02 00 00 02 00 00 00 02 00 00 18 10 03
AUX 1 10 02 00 02 00 02 00 00 00 02 00 00 00 18 10 03
AUX 2 10 02 00 02 00 04 00 00 00 04 00 00 00 1C 10 03
AUX 3 10 02 00 02 00 08 00 00 00 08 00 00 00 24 10 03
AUX 4 10 02 00 02 00 10 00 00 00 00 10 00 00 00 00 34 10 03
AUX 5 10 02 00 02 00 20 00 00 00 20 00 00 00 54 10 03
AUX 6 10 02 00 02 00 40 00 00 00 40 00 00 00 94 10 03
Left Arrow 10 02 00 02 04 00 00 00 04 00 00 00 00 1C 10 03
Right Arrow 10 02 00 02 01 00 00 00 01 00 00 00 00 16 10 03
Menu 10 02 00 02 02 00 00 00 02 00 00 00 00 18 10 03
Also here are my firmware versions.
Filter VSC Software r1.13
Filter Bridge Software r2.70
Display Software Local-08 r4.00
Main Software Revision 4.1
Oops didn’t post all the buttons
Service
10 02 00 02 08 00 00 00 08 00 00 00 00 24 10 03
Pool Spa Spillover (could not test this one)
10 02 00 02 40 00 00 00 40 00 00 00 00 94 10 03
Filter
10 02 00 02 80 00 00 00 80 00 00 00 01 14 10 03
Lights
10 02 00 02 00 01 00 00 00 01 00 00 00 16 10 03
Heater 1
10 02 00 02 00 00 04 00 00 00 04 00 00 1C 10 03
Valve 3
10 02 00 02 00 00 01 00 00 00 01 00 00 16 10 03
Valve 4
10 02 00 02 00 00 02 00 00 00 02 00 00 18 10 03
AUX 1
10 02 00 02 00 02 00 00 00 02 00 00 00 18 10 03
AUX 2
10 02 00 02 00 04 00 00 00 04 00 00 00 1C 10 03
AUX 3
10 02 00 02 00 08 00 00 00 08 00 00 00 24 10 03
AUX 4
10 02 00 02 00 10 00 00 00 00 10 00 00 00 00 34 10 03
AUX 5
10 02 00 02 00 20 00 00 00 20 00 00 00 54 10 03
AUX 6
10 02 00 02 00 40 00 00 00 40 00 00 00 94 10 03
L Arrow
10 02 00 02 04 00 00 00 04 00 00 00 00 1C 10 03
R Arrow
10 02 00 02 01 00 00 00 01 00 00 00 00 16 10 03
Plus
10 02 00 02 20 00 00 00 20 00 00 00 00 54 10 03
Minus
10 02 00 02 10 00 00 00 00 10 00 00 00 00 00 34 10 03
Menu
10 02 00 02 02 00 00 00 02 00 00 00 00 18 10 03
So, unfortunately, I am stuck with seeing the output in HA but no control. I have looked at core.py but I am not a python guy so it is hard to follow.
Thank you for all your work on this code. At least I’m half way there.
Another Idea
It would be awesome to add control of the heater Off/Auto and maybe ability to change temperature. When there is a power failure the controller always defaults the heater to OFF. This could allow HA to switch it back into auto mode.
Interesting that your control panel uses 00 02 to send commands. Will try that on my system at some point. If you change:
FRAME_TYPE_KEY_EVENT = b'\x00\x03'
to
FRAME_TYPE_KEY_EVENT = b'\x00\x02'
it will use those commands instead. The issue with the heater is there is no simple command that can be issued to alter it; everything is done by navigating through the menus, which would be complicated (though not impossible) to automate.
That awesome i will try that.
But sorry i’m a rookie when it comes to this. I was looking for core.py on my Pi and can’t find it. Is that a file that was compiled. (don’t even know if that makes sense) Is it in another file? Thanks for your help.
So I moved the 3 aqualogic.py files to custom_components so I can play with them for my needs. I’m going to try to add the heater to the mix. In that folder they are working as expected. But can’t figure out where or how to move the core.py file. Any insight on how to do this would be greatly appreciated. Thanks
So i finally wrapped my head around where the files are located.
/srv/homeassistant/lib/python3.5/site-packages/aqualogic
I have now edited the core.py file but still are having problems. My HEX to turn on AUX1 is the following
10 02 00 02 00 02 00 00 00 02 00 00 00 18 10 03
So i changed the FRAME_TYPE_KEY_EVENT to 00 02. That’s no problem.
But I also need the 00 00 after tIe 00 02 so i added FRAME_TYPE_KEY_EVENT2
This works and will turn AUX1 ON but now HA does not see that the button is on and cannot turn it OFF
So I need to add something to remove the extra 00 00 for the code to see the status
I add this to core.py
FRAME_TYPE_KEY_EVENT = b’\x00\x02’
#FRAME_TYPE_KEY_EVENT = b’\x00\x03’
FRAME_TYPE_KEY_EVENT2 = b’\x00\x00’
and
self._append_data(frame, self.FRAME_TYPE_KEY_EVENT)
self._append_data(frame, key.value.to_bytes(2, byteorder=‘big’))
self._append_data(frame, self.FRAME_TYPE_KEY_EVENT2)
self._append_data(frame, key.value.to_bytes(2, byteorder=‘big’))
self._append_data(frame, self.FRAME_TYPE_KEY_EVENT2)
My aqualogic is turned off for the winter so I won’t be able to look into this for a while.
Does anyone know if this works with the Hayward OmniLogic system?
Alright, I do have it working now. Still working on adding the heater.
Thankyou @swilson for creating this code and the help you provided me.
I will continue to work on the heater. Would be great as when there is a power failure the Hayward controller always defaults to off. When done HA could turn it back on after checking the system itself.
Thanks Enjoy the snow.
Don’t know about Hayward OmniLogic system. You would have to look at the RS485 output and see if it is the same.
We haven’t even built the pool yet. But we’re considering the OmniLogic. I found this, which seems to suggest it does have an option for RS485 Controlled Mode (and candidly, I don’t know what that means).
Is that sufficient, or would I need to know more to know if it is compatible with this component?
You need to see the data output of the RS485. I have a similar unit to the creator of the code and I had to modify it to work on my system. It’s not a plug it in and it works code.
But excellent work @swilson
Will this work with both the Hayward PL-PLUS and the Hayward PL-PLUS-16V? Or just the Hayward PL-PLUS-16V?
Really excited to try and get this working but I have not been successful. I have the serial connector wired into the Goldline connector and I can see it on my network and access its web interface. I created a custom_components folder and aqualogic sub folder and included all the .py files I could find related to this project. I restarted Hassio and I see the switches but none of the sensors are working nor the switches. I do not see anything in the system logs of note. Where and how can I confirm that I have installed this correctly and that the RS485 is properly communicating? Many thanks for the help.
I am eager to try this setup, and I just purchased the USR-TCP232-304 serial to Ethernet bridge, but for the life of me I cannot find any documentation on how this is supposed to be wired. The serial bridge has 3 pinouts: A, B and Ground. The RS-485 on prologic board has 4 pinouts: Red 1, Blk 2, Yel 3 and Grn 4. (unless I am completely looking at the wrong connector, but according to the board manual this is the RS-485 connection and it says “remote display” so I believe that’s it)
Can anyone shed some light on how the A and B of the bridge connect to the board? Thanks