Hayward Omnilogic?

Unfortunately I haven’t seen the sync option, but I will revisit once we get the light platform merged.

1 Like

Hi Tim,

I have a Hayward OmniHub which I understand is not currently supported by this integration…

I am willing to spend the time and effort to add it, would you be able to point me in the right direction and first steps to get started?

I guess I need to sign that NDA first?

According to THIS OmniHub does seem to work with this. Unless something has changed. I sure hope not because I’m planning on buying the pump with the OmniHub this summer lol

Mmm, I’ve seen several statements on the contrary (source), and Ive tried it myself last year before closing my pool with the same error as that issue linked, and again today with a slightly different error:

Logger: homeassistant.config_entries
Source: components/omnilogic/__init__.py:41
First occurred: 6:47:21 PM (1 occurrences)
Last logged: 6:47:21 PM

Error setting up entry Omnilogic for omnilogic
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/omnilogic/__init__.py", line 41, in async_setup_entry
    await api.get_telemetry_data()
  File "/usr/local/lib/python3.9/site-packages/omnilogic/__init__.py", line 1023, in get_telemetry_data
    if type(config_item["Backyard"]["Sensor"]) == dict:
KeyError: 'Sensor'

The telemetry data in the API responses probably include unexpected data specific to the OmniHub, given the developers of this integration do not have this system but a full Omnilogic one. They both use the same Omni Platform so it would just be a matter of someone who has it to add support for it…

@djtimca I do not have access to the API documentation yet but I found the problem, the OmniHub msp config data returned by the API does not include any sensor right inside the “backyard” node so an exception is thrown when trying to figure out the unite-of-temperature from it. But there is a sensor inside the sub-node “body-of-water” so I added a little bit of logic to get it from there instead…

I sent a PR to the omnilogic-api repo, I tested it and now the integration seems to work fine in my Home Assistant setup!

Actually, the OmniHub does not have an Air Temperature sensor so the telemetry always has a value of 255 for airTemp which results in an misleading sensor. I just cleaned the logic a bit and also added some extra logic to remove the airTemp from the resulting telemetry, that way the sensor in Home Assistant shows as “Unavaliable” which is a bit more accurate instead of showing a temp of 255f (124c).

Maybe you can completely remove that sensor if the value is not in the telemetry, but that is a change in the home assistant official integration and looks like PRs to that one take ages to get accepted…

I have now released the full OmniLogic integration in HACS friendly format. Add the custom library in HACS pointing to GitHub - djtimca/haomnilogic: Hayward Omnilogic integration for Home Assistant available through HACS and you can add the full integration there.

This doesn’t address the OmniHub item yet but I’m hoping to get to that in the coming week.

Thanks!

2 Likes

Excellent! Already verified my pool & spa lights are now entities, and they work!

Is this a separate install from the built-in Omnilogic integration?

Yes- unfortunately it was taking too long to get new platforms reviewed and merged to core so we opted to release it this way.

Not sure if I’ll have issues, but I didn’t delete my existing Integration when I added your HACS, and it apparently thinks they are the same because it said it couldn’t add a duplicate when I tried to add it. And yet 25 entities show. If I have issues I’ll just remove them all and start over with yours. Great work.

Yes it just overrides the built in integration

Hi @djtimca

Just installed and everything went well! Nice to see I can now control the waterfall and turn my colorlogic lights on and off.

I don’t seem to have the ability to set the pump speed, only option is on/off although I do see the current speed in the sensor - should I be able to adjust?

Also, with the lights I can only turn on/off (which is great!) should I be able to set any colours at this point?

Thanks for getting this up and running - let me know if there is anything I can test!
Bill

Once the lights are toggled on, you can click/tap on it and you’ll see a drop down with color options. They can also be controlled with yaml.

You can control the pump with yaml. There’s probably a card you can use too. But it defaults to a switch.

I’ve updated the documentation as well on the Repo to make it easier to use and so everyone has instructions on how to use the speed control service and the ColorLogic v2 light control service.

I will add some additional info in documentation in the coming days / weeks with some recommended additional things like helpers, cards, etc for UI that might be helpful to some.

Everything will be found at GitHub - djtimca/haomnilogic: Hayward Omnilogic integration for Home Assistant available through HACS

1 Like

Found it - fantastic - thanks all!

1 Like

Hi @djtimca,

Thanks for making the full set of omnilogic code available via HACS. I had scraped together my own version of the integration from various unreleased bits but this is obviously better and more complete.

However I have found that this version cannot control my Backyard Lights, which is a relay that is not associated with a BoW (Body of Water). I have a patch that worked around this problem in the old switch.py by passing 0 for the PoolID argument to api.set_relay_valve() when it’s not part of a BoW. Looks like a similar change would be needed unless I am overlooking something. I don’t have the API docs but it worked for me.

Please let me know if I am missing something but if this sounds right, and you don’t already have a fix in the works, I can submit an Issue or a patch for you to look at.

Thanks again for all your work on this integration!

Thanks for letting me know! If you’re able to open an issue on the repo and also include your telemetry with the issue (instructions are on the main repo page) I should be able to get it fixed for you. Thanks!

Hi,

Great work on moving this to HACS, and thanks so much for adding the code to support the OmniHub, works beautifully!

When I click configure I see this:
image

I believe the first option is the refresh rate in seconds (I had raised it from 6 back when I was using the core integration because I was getting some weird errors and this seemed to help), but, what is that second parameter for?

Also, the ? sign still points to the core integration documentation, maybe a good to link that to the new repo documentation…

Thanks! This one was a lagging issue. The second box is pH offset. The updated release from today will fix the dialogues. I highly recommend extending the polling interval to at least 15 seconds (but 30 seconds will be the default going forward).

The Hayward API is slow responding (and slow to update) so there isn’t really any benefit to faster updates than that, and by reducing the polling interval you should see less timeouts and “unavailable” sensors/switches etc.

Thanks @djtimca for pulling in my previous fix. I also have a thermal solar heater, which shows up fine but the rooftop solar temperature sensor is not visible in the integration. It is there in the MSP XML dump but not your telemetry json, as if your API is disregarding it. I thought I’d check with you before digging deeper.

XML for the sensors looks like this (within the BoW for the pool, similar for spa):

                                <Sensor>
                                        <System-Id>6</System-Id>
                                        <Name>WaterSensor</Name>
                                        <Type>SENSOR_WATER_TEMP</Type>
                                        <Units>UNITS_FAHRENHEIT</Units>
                                </Sensor>
                                <Sensor>
                                        <System-Id>25</System-Id>
                                        <Name>SolarSensor</Name>
                                        <Type>SENSOR_SOLAR_TEMP</Type>
                                        <Units>UNITS_FAHRENHEIT</Units>
                                </Sensor>

I can share more data or play with my own fix. Thoughts?