Hayward Omnilogic?

You will have to read the NDA or get legal advice.

Ok, so my understanding is that the NDA is just asking us not to make the API documentation public. Since this is an open source project, it makes sense to work off of a public repo. As long as we don’t post the API docs, we should be fine.

I created a repo with very basic starter code which basically just sets up the omnilogic integration, calls the API with your login details, and retrieves a token which you need to use to make subsequent calls. At this point, the code is still very early on so we probably just need devs right now. We’ll need to start making a list of tasks that developers can start picking from so we know who’s working on what. The next steps that I can quickly see is we need to close out the session (I’m getting a warning about that), get the UserID from the service, and get the site list from the service. I believe with that, we should be able to make all the other calls listed in the documentation.

I’ll need some help structuring all the entities and features that we’ll be using. We can start simple and work from there. Let’s get an MVP out the door and then we can add more things as we go along.

Here’s the repo for those interested. https://github.com/Oliver84/omnilogic

Feel free to open up PRs and contribute in any way you can. If someone else has some work that is farther along, let me know and I can close this out.

My problem is that surely by posting a python program that accesses the API, you effectively reveal the API. After all an API is just a list of url’s to access functionality. You publish the url’s, the so called secrets are revealed.

Your code forgets that you have to develop a python library to access the API and then a home assistant component. It is pretty clear in the developer docs.

All API specific code has to be part of a third party library hosted on PyPi. Home Assistant should only interact with objects and not make direct calls to the API.

The API portion of it is a simple class that can be extracted out. We can separate it now or later, it wouldn’t make a difference. I just wanted to get something going so people can start contributing.

@Oliver84 and @nickrout I have forked the original work on the integration for collaboration. I will gladly make the repo public once we get something working and can remove the API documentation.

@Oliver84 I have added you as a collaborator. @nickrout let me know your Git name and I’ll add you as well.

Perfect, thanks we can work off of this one. This is basically just the API portion, correct? We’ll need to later create the actual HA integration that consumes this.

Yes so far this is the API portion to get started.

Ok, I might just remove the API class in my repo and we can use that for the HA component that consumes yours

Feel free to fork and move as well. I don’t have the experience to be a lot of help on this one, just trying to facilitate getting some folks working together on it, selfishly because this is one of the last things in my house I can’t control through HA. :slight_smile:

2 Likes

I am with Tim. I cannot be of much help other than an active tester. I have the omnilogic system which also includes the Hayward Sense & Dispense system (HL-CHEM), Salt cell and a heater. Hoping it is possible long term to read: pool temp, water flow, salt cell info, PH & ORP info, and what valves are active vs off. Control things like: salt cell mv level, heater on/off, valve on/off, pump 1 on/off/speed, pump 2 on/off, water features on/off, enable/disable smart relays and lights on/off (colors would be cool). I am sure there are more items but figured I would at least start a list since someone mentioned earlier that we need a list of items for those collaborating to work on. I appreciate all the efforts on this! This would be a super nice addition to the automations that can be done with HA.

Just in case this helps, This company has a driver/integration for (I think Control4) OmniLogic. The PDF on this page describes the features they initially made available. Only sharing in case if helps to see how another company structure theirs.

same as my username here.

@nickrout I’ve added you as a collaborator.

I literally installed an omnilogic a month ago because I tought it was possible to integrate it with HA. I hope this project can go trough :slight_smile:

We’ve actually made really good progress already. Just yesterday Tim deployed the API that we’ve been working on to PyPi. With it, we’re able to display pump speed and water temp for each body of water in our Hayward system. Adding the other sensors and features will be fairly easy now since we can use those two as guides.

We’re going to continue adding other features this week and hopefully being sending commands to change settings as well. We’d love for more people to help as there’s still a lot of work.

2 Likes

@Oliver84 - A HUGE thank you for your efforts, along with everyone else who is contributing!!! I know it is still very early in development, but what features do you imagine we’ll be able to control? Don’t get me wrong - Sensors are amazing! But just curious - Will we be able to change the pump speed and temperature? How about turning lights on/off, and even changing light colors?

Yes, we’ll be able to do most of the things that we can do on their app but with more control and have historical data. Looking at the list real quick, we’ll be able to set the heater, turn features on/off, set spillover, set super/regular chlorinate settings, set light shows, and even groups. I’m not 100% sure how groups work, that might be what we have as themes where you can enter “spa mode” etc, but I haven’t looked too much into it yet.

At first we wanted to just get readings from all the sensors since that’s pretty straight forward. Once we can get all that showing up, we’ll add the functionality to actually change those settings as applicable.

2 Likes

I downloaded your files from Github finally. I placed them in the customer components folder, renamed it based on the readme. "config\custom_components\omnilogic_api" In this folder the root info lives (the level where the readme.md file is). Restarted HA and then added the component to the configuration.yaml file. I get the below error. Any idea what I did wrong ?
Component error: omnilogic - No module named ‘custom_components.omnilogic_api.omnilogic_api’

Try naming the folder “omnilogic” instead of “omnilogic_api” and let me know if that works.