I’m probably not the best to assist but IIRC @aming-miyembro is running direct serial in his forked version. He had to make assorted changes to support the switches over serial.
Thanks again Adam. I just downloaded @aming-miyembro fork from the box link he provided in a prior post. Unfortunately still getting the same results…able to view status but not control switches.
@aming-miyembro, Any thoughts on specific code changes I should review?
I wish I had a definitive answer for you @mhmatttu, but I don’t really understand this protocol stuff - standing on the shoulders of giants. Your pool’s control panel is quite different than mine, so maybe things behind the scene differ too, including the Goldline protocol.
You’ve already got logging going that captures the command from Home Assistant. The log should also capture what the control panel sends – mine did. Compare the panel command’s successful byte string to the same command from HA (e.g. filter off or lights on). If they don’t match, you probably need to tweak the command formatting of the _get_key_event_frame
function in core.py.
Or maybe it’s a more profound change and you’ll need to adjust enums in the Keys class, but I doubt it.
Good luck, let us know how it goes.
Thank you @aming-miyembro. As a last ditch effort I decided to abandon the rs485 converter and try a USB rs485 converter and to my pleasure it worked! I had one of these on another project so robbed it for testing. I had tried a couple of the other converters and confirmed wiring multiple times…not sure why it wasn’t working. I am using your code and have a few tweaks to make so may be back for more questions. Thanks again!
@aming-miyembro Would you be willing to share your HA aqualogic dahsboard yaml code? I like the look and layout you have created…new to HA and having figured this piece out yet. Thanks!
I decided to abandon the rs485 converter and try a USB rs485 converter and to my pleasure it worked
Glad it became so easy for you @mhmatttu. I use a very similar USB RS485 device – the DSD Tech unit – I guess I got lucky starting with that unit, otherwise I might never have gotten the integration working hardwired!?!
Would you be willing to share your HA aqualogic dahsboard yaml code?
Absolutely. Note that my pool controller page has continued to evolve, e.g. some of the buttons became badges:
I have a field on my home page that toggles all the pool stuff on/off, using a dropdown “helper”:
Based on that helper, in the off season the pool page appears as:
The helper is referenced in the pool dashboard yaml.
The yaml code can be downloaded from this Box link. Note that it includes four files:
configuration
- the aqualogic segment of my configuration.yaml, including the thermostat entity, a number of template entities that are used in the dashboard, and the notify definition used in automations
dashboard
- the yaml that makes up my pool controller page
helpers
- six helper entities used in the dashboard and automations
automations
- some handy automations y’all might want to run
The helpers, dashboard and automations should all be established through the Home Assistant UI.
The automations include:
- Pool Filter: Turn on/off at Scheduled Times
- Pool Heater: Turn on at Scheduled Time
- Pool Salt Concentration: Warn if too Low
- Pool Status: Notify of Check System
- Pool Thermostat: Turn on if pool Heating
- Pool Thermostat: Turn off when pool Closed
Note that the dashboard uses some in-line template code to set colours based on entity states, employing the card-mod plugin, which needs to be installed separately.
Thank you very much. This is awesome!
This aqualogic panel has not been keeping time accurately. I’ve read on troublefreepools that this is a farily common issue and can be resolved with replacing some of the board components. I’m not quite ready to tackle that project but curious how I could capture the display and menu control buttons similar to how @b3nj1 did in the above post 330. This would allow me to update the time from the menu. I have attempted to import his dashboard yaml without success. I’m not sure I am pulling in all the right entities.
@mhmatttu , I wrote an mqtt interface for the status including the text from the panel and the button presses. For the display panel, I just have send the mqtt to a sensor. My system is a very round-about way of getting this working, so I wouldn’t recommend following. But in case it’s any value, the mqtt frontend is in my fork/branch: https://github.com/b3nj1/aqualogic/blob/b571079f5f57fd3c164bbd9de1056788a512b34c/aqualogic/mqtt.py
Thank you very much. I will check it out!
I decided to buy and try https://a.co/d/9XOrNTT (HF7211 / EW11) Wifi to RS485 before spending too much effort running wires and found (like others) that the 10ms Gap Time / UART free-frame gap time was causing horrible results in toggling switches, but tweaking the UI to allow setting the Gap time to 1 ms and forcing the post strangely did work and has resolved my issues allowing me to reliably toggle controller settings:
The javascript validation disables the submit button, but you can remove that disabled attribute in developer tools and hit submit.
Hello Felix,
could you please provide update on this solution if it reliably continue to work well over time? I currently have a USR-W610 like many others, and cannot control lights or pump due to the timing issue. Looking for something that works over wifi.
Thanks!
Hello Felix,
wow, what a discovery! I have replaced my USR-W610 today by Elfin EW11 RS485 to wifi adapter, changed the gap time to 1ms as per your trick above… and voilà!!! It works as well for me! I can now control filter, lights and aux switches over wifi! Timing issue no longer seems to be a problem. I’ll further test it the coming days and post an update here.
Thanks a lot!
Could you please describe in detail how to hack it so you can set the gap to 1. I’m not familiar with the Developer Tools. Thanks
I think I was able to figure out how to get the Gap Time to 1ms but I’m still not able to activate the switches, although their state is reporting correctly.
Could it have something to do with the old Aqualogic boards only toggling the switches rather than on/off?
My next step might be to abandon the EW11 and get an RS485 to Ethernet adapter. I’m guessing that it’s a 50 to 75 foot run from my board to the nearest Ethernet. Would it be better for me to run RS485 cable for that length or the Ethernet, if I’m concerned with latency?
I didn’t know what adapter tech would end up working, so I ran 50-ft of direct-burial ethernet from the pool panel to ensure all options were open. The cable terminates at an RS485-to-USB adapter, and works great. I did twist a couple of the wire pairs together at each end for the RS485 leads, no idea whether that was actually necessary.
Some updates regarding the hack shown above from Felix: still working after 2 weeks. However, not consistent response 100% of the time. And response time is not immediate. Usually take several seconds before the switch changes its state.
Altough not perfect, I am fine with this as I cannot run a network cable in my backyard. Wifi is still the only way to connect.
Mine is still working as well. I agree, sometimes its not immediate, but have not had instances of the toggle not taking after a few seconds.
Next weekend I’ll likely move the adapter outside at the actual pool controller (currently connected to a remote keypad I have inside my home), and will see if I can just leave the device in the controller enclosure and if that extra wifi distance + interference causes issues.
Sure, here’s the steps (in chrome but similar in other browsers)
- Set the gap time value to 1 (normally)
- Right click the submit button and click “Inspect”
- Expand the Elements section of Dev Tools to look like:
- Right click on the word “disabled” and click Edit Attribute:
- Press delete to remove “disabled”:
- Now you can click the Submit button
I’ve been reading this thread but haven’t seen anyone with this exact issue. Anyone have this issue… I purchased this adapter and i could see everything in HA but when i would toggle a switch it would end up toggling several buttons on the Prologic board at the same time.
I’m not sure if i maybe got a bad unit though because now it seems totally unresponsive even though i can see it on the DHCP lease still. I’ll probably try to return and replace it if i can’t get it back online but i was curious of other experience.
WOW! Can you share more details about this solution. Did you used the default AquaLogic integration? AquaLogic - Home Assistant
Then, if you have some photos of your wiring on panel
THANK YOU!