Pool Assitant

I’ve begun work on a system that will send pH, ORP (oxidation/reduction potential), and water temperature data from my pool to my Home Assistant instance at regular intervals, inspired primarily by “raspipool” (GitHub - segalion/raspipool: Swimming Pool Automation Systen with Raspberry Pi + Home Assistant). I went a different way with the primary hardware and have an Arduino Uno Wifi rev2 board instead of another RPi. To test the setup of communication between the Uno and Home Assistant, I set up MQTT sensors, input_number helpers, an automation to translate the MQTT values to the input_numbers, and a dashboard in HA, and wrote a “mock” service that sends randomized data (within specific parameters so it’s not all over the place) from the Uno to the MQTT topics.

A full write-up of the configurations I found necessary, as well as the Arduino code is at:

I already have all the other components - the “Whitebox T2” shield, the EZO circuits, and related probes, but just ordered still need an enclosure and some other support hardware in order to flip the EZO circuits to I2C mode (they come factory-programmed for UART and the T2 only allows for I2C), and of course I need to build the plumbing necessary for the probes to actually do their job reading the pool water. But I’m glad to have the proof-of-concept already running. For the next iteration, I will attempt to tackle all of the “future vision” bullet points:

Future Vision

3 Likes

Hey just reading this, and wondering how you plan to calculate the Free Chlorine. I pool sensor kit that has Temp, ph,and ORP??

Take a look at this wiki Home · segalion/raspipool Wiki · GitHub

Edit: the formula is in this code raspipool/fc.yaml at 1834e490b5a977efe0c389213b8ce8b69f3fa70f · segalion/raspipool · GitHub

Yeah had a look, cant see how a sensor was calculated for the FC?

Ahhh didnt look hard enough! Thanks see how i go understanding this

Hey, im just abit confused on how the 'input_number.e_fc_adjust works.

yes, so am I.

oh thank god! cause i ahve no idea what the estimate free chlorine, thats what this sensor is supposed to calculate

did you create the mean sensor for ORP or just use the live sensor?

The input number looks like an offset you would configure on the dashboard.

I haven’t yet, keeping a watching brief. However I’ll point you here RaspiPool. A DIY Swimming Pool Automation System and here RaspiPool (Pool Automation System with Raspberry pi + Home Assistant) | Page 2 | Trouble Free Pool. The latter forum has a lot of info (along with the contrary views of “experts”, just like every forum :slight_smile: )

hey, sorry im not after the lovelace stuff. Thanks though

mmmm no straight answer tbh

You are not looking for lovelace stuff… that is where the input number is being setup.

just do the calculation in the earlier fc.yaml with a constant to replace the input number.

eg. the user using raspipool would input 78 on the dashboard.

so the input number would be 78%

so do you calc as

78 x orp x pH or whatever the calc is doing

but i dont know what the number is tbh?? thats whole point of this sensor i thought was to give me the Free Chlorine amount?

I can only think that it is some sort of “fudge factor”.

This looks great, but I thought ORP and consumer level PH sensors were notoriously unreliable… am I missing something?

You may well be right, but I would put the Atlas Scientific sensors somewhere above consumer level, they have pro ones, but that raises the price considerably.

I found this pH/Cl ppm/ORP conversion chart a while back. The original seems to have gone missing, but the wayback machine never forgets: https://web.archive.org/web/20180713135327if_/http://poolrx.com:80/wp-content/uploads/2013/07/PRx_pH-ORP_Conversion_Chart.pdf

As for the FC sensor - I plan to implement the calculation on the Arduino instead of in HA, and just have an MQTT topic that it will be sent to. That way the separation of concerns will allow someone to implement the Arduino side of the equation and use whatever system that can leverage MQTT on the other side.

Similar chart is here from one of the earlier links

https://github.com/segalion/raspipool/wiki/FC-vs-ORP-and-pH

Biggest problem with those charts is they only work in a strict pH range ~7-8pH. So outside of that it needs a different calc or an outside pH range(error) check. Presumably it’s because it’s some wild exponential calculation.