Automated Pool Controller - Anyone interested?


#1

Let me know if anyone is interested in working with me on this. I could use someone to write the iPhone App. I can handle the Android piece, but I don’t have a Mac to write and test iPhone Apps, nor the knowlede. If someone knows of a good cross compiler for simple apps like this that will let me deploy the app to either platform - That would be groovy. I don’t really care what language I have to write in, preferably not Objective C - that’s ugly. I tallied up the cost to implement, it’s about $300(gave myself a buffer, probably won’t be that much) and the wife has blessed my expenditure.

The plan is now Contactor for Pool pump and another for pool cleaner accessory pump. ORP sensor for Chlorine level, Ph Sensor, Analog pressure sensor to detect backpressure. Sensors will be connected to ESP8266 running on 5V DC input. Sensor data/Motor control and settings changes will be proxied via wifi to a python controller on a Pi sitting in a DMZ subnet. Readings and settings changes will be accessible from that controller via XMPLRPC to get/set. I’ll write an Android App to control it from my phone - which will interface with controller via authenticated XMLRPC. I’ll NAT that IP/Port to the internet in pfSense and be able to check/change settings for my pool from anywhere. The controller will also have a separate Scheduler thread to turn pumps on/off according to specified settings. The controller will be event driven (inspired by @Draco 's RFID Keymaster) and when settings go out of bounds it will send a text message to me telling me service is needed and/or send a notification to the Android App. I’ll also create a PHP web interface for the controller using the same XMLRPC interface to allow management from a web browser.

Let me know your thoughts.


#2

If someone knows of a good cross compiler for simple apps like this that will let me deploy the app to either platform - That would be groovy

Look at Xamarin. Now owned by Microsoft. Does exactly what you ask.


#3

Awesome, exactly what I needed, and I would much rather do this with C# than run Objective C for iOS or Swift (which breaks every new version) and Java for Android and have to match features and maintain multiple codebases.


#4

Just curious, is there any particular reason you are using XMLRPC as opposed to RESTful JSON? Not a criticism, just curious because RESTful JSON is much more popular (although the “cool kids” are starting to push gRPC).


#5

Honestly there’s not a strategy involved in that choice. I know XMLRPC so I was going to use it. I haven’t looked in a while to see what other options are out there. I’ll check out the ones you mentioned.


#6

IMO gRPC is a bit of a PITA to work with since it’s a binary format (protocol buffers) making it tougher to see what is happening at times, but that also makes it extremely optimized (particularly for size but also for serialization and de-serialization in most situations).

If you go RESTful JSON, don’t go overboard with the REST mindset. People try to get strict with the HTTP verbs and how your paths should be done etc, but just figure out what makes sense for you.

BTW, closing on the sale of my house with a pool soon. This is the type of project I always had in the back of my mind, but never got around to. Guessing my next house will not have a pool though. I have too many hobbies as is :laughing:.


#7

I wouldn’t mind helping with some design assistance and planning the overall project. Here’s a start. For overall power and load control of a pool controller you will need some way to accommodate two or three 24vac valve actuators, two or three pumps, a pool light, a blower, and a heater control circuit. The valve actuators require 24vac and triac control from the microcontroller. Then the pump, blower, and light contactors can be driven from the same for only about $15 each vs at least $40 for scr/triac based electronic relays. Since you will have already designed 24vac controls from the microcontroller, you might as well control the heater with a 24vac relay module. If you use 24vac contactors for the pumps you are already saving $125 while using a power source and microcontroller/triac design that is required for the valve actuators anyway.

Bottom line is that you will need twelve 24vac control channels off the microcontroller that can be exactly the same, cut-n-paste circuit. Then selection of the appropriate 24v contactor/relay where needed. All while saving $125 over alternatives.


#8

We can simplify I don’t have a pool heater and only one backflush valve