Swimming Pool Chemical Dispenser

Yes, REPL over USB in my case. I think there is a way to use REPL over WiFi, too, which could allow OTA updates to the code, but I haven’t gotten it to work.

1 Like

Nice!!
webREPL was stupid simple to get working even for me
In REPL
import webrepl_setup
Answer questions to start on boot, Done

Thanks for the link. I’ll check it out. I’m sure I can get it to work, I just didn’t spend a lot of time on it yet. It could come in handy for updating the software without having to go out to the pool equipment with a laptop and USB cable!

Nice to read this thread. I was looking ar raspipiol the other day and wondering abour an esp32 implementation. I have found an esphome ezo implementation. It is now being pulled into esphome.

Hope that helps someone.

1 Like

@smurry How does the Appdaemon work just add the pool_fc.py to the appdaemon folder under apps?
Then add

free_chlorine:
  module: pool_fc
  class: free_chlorine

To the apps.yaml folder then I get a sensor.pool_fc in Home Assistant with the data or am I doing that all wrong?

@DrJeff, you are correct. Note, however, that the sensor won’t actually show up until it gets data over MQTT. If you don’t have the electronics set up yet, you can send a message over MQTT on the appropriate topic to simulate a sensor reading. Once you do this, you should be able to see sensor.pool_fc.

ok thanks, I have appdaemon for many years but just mainly copy paste code and edit to my liking.

No problem. Let me know how it goes…

you are talking about the sensor.pool_ph and the sensor.pool_orp is there anything else I’m missing?

Sorry if I confused you. What I mean is that you can publish some ORP value to the MQTT topic defined in your config.txt file (orp_topic_pub). Whatever value should then show up in your sensor.pool_orp in HA. Basically, you’re manually sending what the ESP32 would normally be sending. This will allow you to test that the appdaemon part is working.

1 Like

I didn’t think AppDaemon needed to be restarted but that did the trick!
Ok I have a confession I redid it using your hard work and put it in espHome but you definitely gave me the push I needed, Thanks

Now to move everything over my relay board is on Arduino mega connected to a Pi but I’m going to use the ESP32. I got it running with probes on the bench with ESP8266 and a Arduino Pro mini as a port expander

What is the chart_loader.py used for?

I probably should have excluded chart_loader.py from the repo. It isn’t necessary now. In order to calculate the Free Chlorine from the Ph and ORP measurements, I digitized this chart from the RaspiPool site. Once I had the curves digitized (in .csv format), I wrote chart_loader to import the data into a Python dictionary so I could use it as a look-up table. Once I loaded the data, I just pasted the resulting dictionary into pool_fc.py, so you don’t need chart-loader anymore.

1 Like

How easy is it to bypass “thingspeak” and do it in home assistant?

You can even do it via esphome and connect to HA

Got it working this way also!

I also just recently added support for all EZO devices (except the pump which I need to add) to Tasmota for those who prefer that firmware. The next release should have those included or you can venture and try a bleeding edge build. For less adventurous folks who don’t want to create a custom PCB, you can instead buy a cheap Sonoff Dual R2 device, Flash something like Tasmota and control everything via Home Assistant or what have you.

My pool is currently working off of such a device and I can control my light & pool pump remotely with the Tasmota UI or HA. There’s also enough pins to connect a cheap temp sensor so you don’t have to go and buy the quite expensive EZO device. So I also have my pool & outdoor temperature being reported over MQTT.

Really nice work, @DrJeff and @tichris0. Lots of great options now for this pool control task.

@smurry What peristaltic pump & enclosure are you using? I was looking at possibly using the EZO ones, but they seem to be a tad expensive compared to what else is out there. I’m also curious if you did anything to counter the pool pump pressure going into the peristaltic pump? How did you connect the tubing to your PVC pipes? I’m wasn’t sure if an EZO would be able to handle the pressure generated by the pool pump or not (both the tubes and the pump itself).

Thanks!

Does this mean tasmota will work on this?
Bare-Bones Wi-Fi Pool Kit | Atlas Scientific (atlas-scientific.com)

Also, if you start withEZO Circuit boards, are you stuck with their probes? or can you switch to the cheap AE with BNC cable later?

I haven’t tested it, but in theory yes. That setup is basically an ESP8266 with the carrier board, electrical isolation etc all built into it.

The probes can come from anywhere. You don’t have to buy their probes. That said, most probes that you’ll find online aren’t really rated for the precision that this will need. For instance, you can find a treasure trove of cheap Chinese probes on Alibaba (and I bought one of them), but the precision was rated as +/- 0.25 which isn’t good at all for a pH probe. I tested it and sure enough it’s not very precise.

Fair warning however: I’d first make sure to read troublefreepool’s forums about using ORP for your pool. The short version of it all is that unless your CYA is < 30 at all times you’re just not going to get meaningful readings from your probe as the CYA interferes with the measurements. If your pool is indoor, it’s the perfect kind of conditions for it. Outdoor pools are more of a struggle due to the CYA levels.

1 Like

Nice, thanks! That bare-bones box would be perfect, and I love tasmota. :grinning:

I’ll also read up on CYA levels. House isn’t finished yet, so very early in the planning stages. Still learning about pool maintenance.