Swimming Pool Controller Project

After a long break doing HG & RPi projects, as my HG systems at home have been working flawlessly for the last couple of years, I decided to replace my broken swimming pool controller with a home made HG solution. It was fun to do designing, building and programming again

I build a split system, with all the high voltage stuff in one box and all the low voltage stuff in another box. The two are electrical separated by optical isolated relays.

It is still a work in progress. The low voltage side will get a second board with 6 relays, and a 8 channel AD converter for analog sensors. hence that big bundle of wires sitting there patiently waiting for the additional hardware to arrive.

Behind the RPi are the 5, 12 and 24 volt power supplies.

I use 1wire temperature sensors for the various temperature measurements which drive the solar heater.

First picture is the high voltage part of the controller I build, controlling pool pump, spa blower etc.

Second picture is the RPi controller with relay board etc, controlling the water valves, temperature sensors and the high voltage relays.

Third picture is a screenshot of one of my HG control screens.

Very impressive indeed.

Had you considered using some of the more regularly maintained home automation systems like Home Assistant for this project or do you find HG meets all your needs.

The ability to create what ever functionality you need using the build-in web based compiler, and being able to test your changes/additions on the fly remains the strongest point of HG. I played with others, but HG is just better at this. So in my opinion, if you are comfortable with C# , HG is still the most flexible to your needs.

It’s a bit of a shame that HG is not well maintained as the potential is very high. I’ve been using it for many years, and am still very happy with it. I do use HG exclusively on RPi. The only time I have some issues is when a micro SD card starts to go bad, but that is an easy fix, I always have 2 SD cards ready programmed ready to go for when this happens.

I have considered starting my own fork of HG, so I have control over the software and some protection for this project being completely abandoned. I have all the source code from github on my HDD, just missing the Android app code.

Yes I agree it’s a powerful tool as far as home automation is concerned. Unfortunately a number of others have also attempted to fork the project but have abandoned further development for one reason or another. The danger is that the further new development falls behind the competition the less likely new users are to adopt it.

It would be great to see someone seriously develop HG further and maybe with a bit more input from other interested parties HG could be taken on to a more vibrant platform. Your current project is one classic example of this. Here’s hoping you get the time to achieve this.

Bench testing the almost completed swimming pool controller. Will replace my prototype with this version in the next day or 2.

  • 14 relays
  • 2 digital inputs
  • 8 analog inputs
  • 16 GPIO via I2C
    5vdc, 12vdc, 24vdc, 24vac to accommodate any type of pool and garden equipment

Before finalising your project it might be worth checking out the latest release of HG. It’s now building in .Net Core 3.0 and may be a useful addition to your setup. https://github.com/genielabs/HomeGenie/releases

Tried the new version as per your previous post. Both the GPIO and the MCP3008 apps stopped working with the following error.

Specified argument was out of the range of valid values.
Parameter name: processor

Reverted to previous version and all works fine again.

That’s strange. You didn’t mention what model Pi you were using. I do know that support for GPIO was added in Stable-13 for the latest version of Raspbian for the Pi 4. Not sure how that would affect you.

I tried it with a 3 B+, I’ll grab one of my RPi 4 and see if that works.

Update: Yes RPi 4 works great. Guess i need to upgrade the operating system on my RPi 3 B+

Yes Raspbian Buster and HG 1.3 v17 are fairly solid now.

@enterprised Just trying to figure out did you ever get GPIO working successfully on the RPI 3b+. @bkenobi is currently experiencing difficulties with GPIO and the 3b+ and the latest Raspbian Buster and HG. For the life of me I can’t see where the problem lies.

@enterprised I IM’ed a couple times but wasn’t sure if that was best method. @Petediscrete and I have been working on getting the GPIO sorted on my setup for about a week now and seems nothing is working outside of an ancient setup. You posted success here so I’m hoping you can provide even a tidbit of details on your configuration so I can try something known to work at some point.

Never got GPIO to work with the 3B+ and the latest version of HG, so running RPi 4 now where it seems to work fine for me. I have been a bit absent from the community, been too busy doing some remodelling in the home.

Great to see you have GPIO working with RPI4 and latest version of Raspbian and HG. Hopefully you can guide @bkenobi through the process as he’s trying to get GPIO up and running.

Seems to be a problem with both the RPI2 and RPI3 boards using GPIO but it would be helpful if you could possibly confirm this.

I really can’t recall if I did something special. After having issues with RPi 3B+, I switched over to a RPi 4 which I was planning to configure as NAS. This RPi4 has been running my swimming pool for several months now, no issues.

Attached are the boot\config.txt of the RPi4 and a backup of HomeGenie, it is currently running Gene’s last release.

config.txt (1.6 KB)

homegenie_backup_config.zip (828.1 KB)

Thanks for the backup file. I can compare with my config to see if the HG setup makes a difference. I dont have a RPi4 but if that fixes things without breaking other things it would be worth the upgrade.

It certainly looks like support for GPIO on the RPI 2 and RPI 3 was problematic. At least we have confirmation that it’s working on RPI1 and now RPI4 @bkenobi

Thanks for that @enterprised and don’t be a stranger :joy: The forum needs you.

Sounds like Gene may have skipped straight form RPi1 to RPi3 and left the others in between unsupported. That’s what I was guessing but was reading confusing posts that suggested maybe it does and maybe it doesn’t work. It’s nice to have at least one input suggesting that after working with different configurations some work and others don’t. I don’t know what I’ll do with the RPi3 if it doesn’t work, but will probably just source an RPi4 if that’s the best option to get it working again.

I looked at Gene’s code for the GPIO I found a link to in the old forum backup and unfortunately it makes no sense to me. It appears to be working with hardware addresses that are above my head.

Yes I had a similar issue with the onboard CSI camera module. Worked in HG on the Raspbian Wheezy distro and for no apparent reason never worked again in later distros. Shame really as it was an ideal integrated camera notification system. Nobody managed to get to the bottom of the problem either. On board Raspberry Pi Camera not working with Raspbian Stretch

I imagine Gene is at the mercy of users who own equipment he does not and is trying to add support in HG for it. He relies on the correct feedback and a good working knowledge of this equipment from the user. I imagine that is quite difficult at the best of times.

I did think there was quite a few HG users tinkering with GPIO projects using HG on their Raspberry PIs that may have picked up on this problem on the Pi2 and Pi3. Clearly not.

Hopefully with the introduction of HG support for GPIO in the PI4 and the work carried out by @enterprised you’ll finally resolve this mystery. Looking forward to this :+1: