Thanks for working on this! For what it’s worth, I’m finding that the wired key event type works more reliably for my system than the wireless key type.
Will look into adding an option to select one or the other.
If you @swilson or anyone else could possibly add toggling the heater ON/OFF to the code.
That would be awesome!!
We have frequent power outages where I live and the default state for the Hayward controller is to turn the heater OFF. So the water gets cold from time to time when I forget to turn it back on.
Thanks in advance
The latest code has a heater on/off switch, but it currently has some issues: https://github.com/swilson/aqualogic/issues/5
@swilson I have an OmniLogic now. My old controller bit the dust last year.
I’ve gotten my USR-TCP232-410S reading data from my OmniLogic. The protocol looks similar to that of the AquaLogic, but not 100% I have the right Baud Rate, etc …
I’m using 115200,8,N,2. I see the following:
What do you think? Do I have the right settings?
Any idea on what everything means?
As of writing, my Pool temp is 77F, its 58F outside. The chlorinator is 3003ppm, Pump is running at 1035rpm and the heater is off. Hopefully those stats help decoding.
Ian.
The Omnilogic is a totally different controller. I doubt it is compatible, especially for things like key-presses. The low-speed bus probably has the VSP pump data on it though (at 19200,n,8,2).
I kinda figured as much from the testing I’ve done today. I reached out to Hayward, but they only offered the API documentation for the web front end. That is how I plan on writing the plugin.
It was fun wiring it up and seeing the code.
@swilson you absolute champion. Your efforts have saved me a very costly upgrade for my pool control system.
Let me know if you’re ever in Tampa, I think I owe you a beverage of your choice.
Sean, thanks for all your work on this project. I finally got it up and running using a NodeMCU and a Serial to RS 485 board and esp-link, with much tinkering. What I would like to do is emulate the wireless remote control I have (Aquapod v1) in order to access the Menu and submenu functions. Probably over my head but WTF.
I see that the Menu and Arrow keys commands are listed in core.py but how would I go about making them Switch entities in HA?
The HA code is currently just set up to modify states via set_state() (which handles queuing the key event, checking the state and re-queueing the key if the state change failed). To just send key events you can use the send_key() method (probably tied to a momentary switch in HA).
Wow, this thread is extremely interesting… and I’ll likely be putting in an Amazon order for an RS-485 adapter soon…
For anyone that has this working, my question currently is about the physical connection to the AquaLogic panel… did you:
- Put the ethernet to RS-485 adapter inside the pool controller box (with a wall wart)? and then run cat5/6 cable back to your router/switch?
Or…
- Put the RS-485 adpater next to your router/switch (where plugging in a wall wart is much easier, and it will run cooler indoors, etc.) and then just use a looooong cat5/6 cable run to connect the RS-485 communication to the pool controller?
I don’t know what the wire distance limitations is for the RS-485 data over a cat6 cable is, but this second option seems to be the beset for temp control of the adapter, wall wart plug, etc. since it’ll just be another small network device I can drop into my network closet…
Thoughts?
RS-485 is designed to run long distances; the installation manual says 500 ft max. I already had a wired controller (AQL-WW-P-4) in my house connected via a 200 ft Cat5 cable; I just daisy-chained the RS-485 adapter into it.
My wireless solution is a NodeMCU (https://www.amazon.com/gp/product/B07HF44GBT/ref=ppx_yo_dt_b_asin_title_o08_s00?ie=UTF8&psc=1) that connects to my WiFi network via esp-link (https://github.com/jeelabs/esp-link) Serial to wifi bridge software. I have an RS485 to TTL adapter (https://www.amazon.com/gp/product/B082Y19KV9/ref=ppx_yo_dt_b_asin_title_o09_s01?ie=UTF8&psc=1) that connects the Node MCU to the RS485 bus on the pool. Both of these modules are soldered onto perfboard. Instead of a wall-wart power supply, I tapped into the 10V DC from the pool’s COM header through a buck converter (https://www.amazon.com/gp/product/B00VWL41TM/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1) soldered to a second perfboard. These connectors (https://www.amazon.com/gp/product/B07Q39N3T9/ref=ppx_yo_dt_b_asin_title_o09_s00?ie=UTF8&psc=1) link my interface boards via a 4 conductor cable to the pool control board. At the moment, it’s all inside the pool control box. Now that I finally have this up and running, I plan to 3D print an enclosure that will hold the stacked perfboards an mount outside the pool control box.
@swilson, perfect that’s what I was wondering . . . I can def. run cat5 out of my network closet to that end of my house and drop down to the panel . . . it’ll be a pain, but I’ll be doing other things in the attic at the same time.
I didn’t know that the remote panel option even existed… I’d much rather get this in HomeAssistant anyhow, but that’s nifty in case my display ever goes out in the panel box
I think that on longer runs of RS485 they recommend using grounded cable to minimize noise and interference.
@ronkmd, yeah that makes sense… in my case, it will be about ~60-65 ft through the attic. So good-ole cat5 should work well I expect.
I’ve already re-wired my LED light to use Lutron Caseta switch that control via HomeAssistant has been great!
But, my goals are as follows once I’m able to get my Goldline ProLogic communicating with HomeAssistant (leveraging this awesome integration):
- Set up some Lutron Caseta Pico remote to control the Filter, & Aux conveniently from the Kitchen that overlooks the pool… that way my wife can turn the Fountain on/off to enjoy (but not run the pump unnecessarily as it can turn off after 30 mins if manually turned on).
- Control the pump (and fountains) via Alexa.
- Provide tracking of runtime and last filter pump turn-on/turn-off time to help keep an eye on energy.
- Provide a nifty run for 30 minutes button for when I add any chemicals
- Provide more advanced scheduling of the AUX1 timing that controls my Polaris vacuum, which currently is limited to only one schedule time per day.
- Help with overall energy tracking and minimum energy consumption/costs
I’m sure additional valuable uses will come to mind soon!
Ok, ran some cat6 from my network closet to the pool controller today. Thankful for a cloudy/rainy day reprieve from the heat in the attic…
The RS-485 to ethernet adapter (USR-TCP232-304) will be delivered on Sunday (Prime shipping from Amazon).
I haven’t been this excited about getting an integration working since I got my Lutron Caseta Pico remotes working!
Awesome…it took some tinkering but everything is working great now!
Thanks for posting the screenshots @stoehrmark! His post from Jan. 2019 (#21 above) really helped!
I haven’t found any clear/consolidated instructions on proper setup of the USR-TCP232-304, but the critical details are in the screenshots and in the notes from @swilson in github here…
As well as the manual for the USR-TCP232-304 which is located here…
The screenshot finally helped me understand that there is a TCP Server working mode that I had not fully gleaned from the online manual, and that then related fields for TCP Client get disabled while another critical field get enabled…
It needs to be set to TCP Server mode so that clients like HomeAssistand can connect to it using TCP; which the manual documents as the robust/reliable method of maintaining a connection with minimal risk of data packet loss (vs UDP).
After selecting the server mode then the Local Port Number field is visible and enabled but defaulted to 0 (zero)!
The manual states that a port Value of 0 (zero) means that it will use a random port number, so we need to set a specific port value here where I used 4328 (the reversed characters of 8324; the default port for TCP Client Mode):
So after assigning a specific port number in the Local Port Number with TCP Server working mode and then using the USR-TCP-Test software I was able to finally connect successfully, and validate the data streaming from the Hayward Pool Controller using my Windows PC as a TCP Client to test. The software runs on windows and allows testing of connectivity to help isolate any issues with either the device configuration or with with HomeAssistant configuration.
And of course then the HomeAssistant AquaLogic integration instructions made more sense as to what port it needed configured in the configuration.yaml so that HA can successfully connect as a client:
Once HomeAssistant is configured and running – no errors in logs, etc. You can validate that a client has connected in the Web UI of the USR-TCP232-304 (see highlighted IP of connected client and data being transmitted):
And Voila! My HA entities appeared and were finally reporting data. The sensors and switches both immediately started working for me…
Thanks for the excellent work @swilson, I def. owe you a beer / coffee for going the extra mile and adapting the shared knowledge of the Hayward protocols into a HomeAssistant integration!
And I hope these additional details will help the next person
Update:
For posterity I’ve also added this quick tutorial to a GitHub Wiki here:
Could you explain this a bit more, or please point me towards some relevant info? I don’t get it. Thanks!
Hi, thanks for all the work you have done. I have HA running on a virtual box and would like to use a raspberry pi with a USB RS495 adapter for connecting to my PL4. Can this be done? I assume i would need to configure ser2net on the pi, but what do i need to do on my HA vm machine? Any help would be appreciated.