k-harker / hass-autelis-integration

Autelis Pool Controller integration for Home Assistant
MIT License
0 stars 0 forks source link

Any more info or steps for successfully integrating this in Home Assistant? #1

Open EagleAye opened 1 year ago

EagleAye commented 1 year ago

I am desperately trying to integrate into HA, and it is quite the uphill battle for someone with little familiarity. Could you go a bit basic and help me out with implementation? Once I have the basics running, I can reverse engineer for my needs, but getting initial setup done is a challenge on this end. ANY help or contact would be greatly appreciated!

k-harker commented 1 year ago

I'm be unreachable starting tomorrow and I'll be back after Jan 1 so I'll give you the best I can right now. If you can't get it working I can help you more once I'm back.

I think you might be the first person that's is using this other than me, so I would expect a few things might not work as expected. I'm happy to help fix them if we can determine what's going on. I've been using this integration since my first commit here without any issues. I would recommend that you make sure your pump and lights have labels in the Autelis webpage before you add the device in home assistant. This integration pulls the names for the devices from the Autelis.

In order to install it, what I did is follow the instructions for developing a custom integration. It says that home assistant looks for integrations in ‘/custom_components/‘. I put the files in ‘config/custom_components/autelis_pool‘.

If you're very new to home assistant, the easiest way to do this is the following.

  1. Download the files in this repo
  2. Install the File Editor plugin for home assistant.
  3. Create the directory ‘config/custom_components/autelis_pool‘
  4. Upload the files from this repo into that folder.
  5. Restart home assistant (not sure if this is still necessary)
  6. Go into home assistant settings > devices and integrations.
  7. Click add integration.
  8. Select "Autelis Pool Control"
  9. Enter the hostname/ip of your Autelis.
  10. Enter the password for your Autelis.
  11. Click on submit and it will create the device and hopefully all your pumps and lights will be added correctly as well.
  12. Go to any dashboards and add the devices and try it.
k-harker commented 1 year ago

For step 4 you need to make sure the folder structure is the same. You should need to modify any files unless you want to customize the names of the devices.

It looks like I have a separate branch that has changes to pull the names from the Autelis instead of using hard coded names that match my pool setup. You're free to try either the default branch or the branch called get-names-from-controller. You would need to change step one to grab the files from the desired branch in this repo. I believe both are in working order. I'll take a look at merging the branch back to default when I get back.

My setup is this:

EagleAye commented 1 year ago

Thanks SOOO much. I will bang on this today, and keep you posted. Have a great vacation and keep dry.

EagleAye commented 1 year ago

Hello Kevin, Karl here.

For a quick update. I tried every thing I could think of, but I am not that versed. The steps were followed exactly, folder naming and location double verified, cache refreshed, restarted, etc. I cannot find a way to make this appear on devices and services, and even tried forcing through HACS to no avail.

I did note something unrelated while browsing through files. In init.py there is a reference on the beginning that seems to reference monitoring an OctoPrint 3d Printer. I was going to remove that, but didn't know if I should delete lines 1-14 or go deeper, so I left it.

Any attempts to go through HACS returns an error of non compatibility when pulled from github. Just more I don't know.

Absolutely no rush, but if you get a chance, perhaps you could point me in the direction I am overlooking. I was thinking perhaps something needs to point to it from configuration.yaml or something.

Thanks for taking the time to respond earlier. It is most appreciated.

Karl.

Please note: message attached

From: Kevin Harker @.> To: k-harker/hass-autelis-integration @.> Cc: EagleAye @.>, Author @.> Subject: Re: [k-harker/hass-autelis-integration] Any more info or steps for successfully integrating this in Home Assistant? (Issue #1) Date: Thu, 29 Dec 2022 00:42:14 -0800

k-harker commented 1 year ago

Ok, try the get-names-from-controller branch again following my instructions from above to copy the files to the custom_components directory. I was able to start up a new instance of Home Assistant in docker and it was able to connect to the Autelis and I was able to control it from there. I'm going to work on getting this merged to master since this seems to work well with pulling the names from the Autelis configuration. I'm not using this branch for my setup yet, but I plan to soon.

I haven't gotten familiar with everything needed to add a custom integration to HACS yet. I will work on that to make it easier for people to install and upgrade, but I'm not expecting to have many updates after this (it looks like Autelis is no longer around).

k-harker commented 1 year ago

I didn't make it clear in my last comment that there were some code changes needed for the latest version of Home Assistant. I had made those changes to my installation but I hadn't committed them here. You should be good if you try going through the steps again with the latest code.

EagleAye commented 1 year ago

I got it into HA and it 'Failed to set up' due to an issue on my end. My Autelis is fixed IP and different port (not 80). I pointed to the different port on initial setup. My error logs are pointing to the integration looking to port 80 for info, and not finding it. But the integration is in HA.

I will try and change my Autelis, ISY and a couple of other integrations to port 80 and it will probably work fine, just takes quite a bit of re-configuration. I am also looking at the code in your program to see if I can use my port instead of default 80. I probably won't have much luck in that aspect, but figured I would try.

Also, do you mind if I post this solution on the ISY forum? I know of quite a few people looking for something (anything) like this, and I am glad I happened across it. I just don't want to have you bombarded with not only my newbie questions, but a bunch from others as well.

I will keep you posted, and Thank You so much.

Please note: message attached

From: Kevin Harker @.> To: k-harker/hass-autelis-integration @.> Cc: EagleAye @.>, Author @.> Subject: Re: [k-harker/hass-autelis-integration] Any more info or steps for successfully integrating this in Home Assistant? (Issue #1) Date: Mon, 02 Jan 2023 18:42:55 -0800

k-harker commented 1 year ago

I know it's not the most elegant solution, but you could just add the port on to the end of the host entry. So for example if your port is 8080 and your autelis is at IP 192.168.1.20 you could put this in the host field.

192.168.1.20:8080

I was looking last night at getting this added to HACS. I think that would be the easiest way to have others install it. If you want to post it on ISY, I would be happy to have others use this and help maintain it. I don't have color changing lights or a variable speed pump so those are features in Autelis that I can't really test for example.

EagleAye commented 1 year ago

After re-configuring my Autelis and other items, the integration went in right away, no errors, and is showing 12 entities. I could NOT force it to work on a different port, integration errors out. I will chase logs and perhaps get more info.

I have a VF pump to play with and it integrates with Autelis fairly easy. All you really get from Autelis is pump info, but it is nice to know. Watts, RPM, GPM, Filter %. I can definitely test.

In the Autelis, I found a bug on pump details selection for VS and VF pumps. In setup, if VF pump, you can select VSF pump and all info populates. Since I don't have a VS, I don't know if selecting VS in pump type works. VF (my pump) selection would not work.

I will hit this later and play with it a bit.

This will be an excellent solution for quite a number of people desperately searching for ways to use their now defunct Autelis controller (which works well) and not depend on ISY/Vera receiving the info.

I will keep you posted.

k-harker commented 1 year ago

I just changed my Autelis to 8080 and it worked for me when setting the host like I mentioned above. You might need to delete your Autelis integration (which should delete all your Autelis devices and sensors) and try again. If it shows more than 4 entities for the device it is probably setup correctly.

I'm planning to upgrade my Pentair controller and pump to a variable speed later this year. It doesn't look too hard to add support for that in this integration but I haven't had a need for it yet.

EagleAye commented 1 year ago

I am currently reviewing videos on HA Templating, Integration, YAML, Custom Components, Dashboard, Visual Studio Code, Rules, etc.

Still an uphill battle. I was wondering how and what you used to make/edit this integration, and what works well for you. I am not computer illiterate, but never seriously coded. Looking at the integration and still learning and reverse engineering.

I will change some names, and make a half blind attempt to get the VF pump displaying. I just wanted to get a basic starting point.

This integration works, is simple, and opens up a lot of ways to integrate in HA, which is what a number of people have been searching for.

If you have any pointers on my quest, it is always helpful and welcome.

Thanks again!

Please note: message attached

From: Kevin Harker @.> To: k-harker/hass-autelis-integration @.> Cc: EagleAye @.>, Author @.> Subject: Re: [k-harker/hass-autelis-integration] Any more info or steps for successfully integrating this in Home Assistant? (Issue #1) Date: Tue, 03 Jan 2023 11:35:35 -0800

k-harker commented 1 year ago

@EagleAye Were you able to make the changes you wanted? If not, maybe you could create a separate issue describing what you want for your VS Pumps and include some status.xml or chem.xml or pumps.xml examples with different settings. If I had that, I could probably make the changes.

I'm going to make a few changes for supporting the battery, and I realized solar heat is not allowing me to differentiate between enabled and heating. It currently shows as Off in home assistant when it starts heating using solar, so I'm going to be making changes to this integration.

I use VS Code to edit the python files, and I use the home assistant docker image to help me test my code changes. I can add some basic instructions for how to develop and test. I use docker only for developing, and I have a separate home assistant install on a raspberry pi that I keep as my working system. On my "production" HA install I have the "file editor" plugin installed that lets me tweak files and configuration, but I don't do the majority of development that way.

HA does take a little bit of getting used to, but once you get the basics of creating dashboards and adding integrations, it gets much easier. I don't have much experience with python (but I am a developer professionally) and I have not liked the python I've used so far. Fortunately, this is the only integration I've needed that wasn't already built.