Great work! There are many good tips, but it’s not state of the art to place pipes above the distribution board.
@Reunion974 I am impressed with the project and the information shared byYou I’m not a professional on this topic, so I have some silly questions. Why did you decide to measure water in the circuit instead of in the swimming pool? Is it safer because no one (especially kids) can manipulate the probes, or is the water level more stable in the circuit? Or do you want to have the device indoors?
I found another project (more expensive, but faster to install) for the PH-803: Printables Do you think it is okay to put the probes into the swimming pool?
Thanks @donpablos
I connected the probes on the pipe because my goal is to automate the pool management process as much as I can.
The water analisys process is automatic and allow an automatic regulation or trigger automaticaly alerts indicating how much product I should add into the water.
I have also a floating bluetooth thermometer in the pool but sometimes it goes into the skimmers, sometimes the kids play with it… I think the probes directly connected to the pipe in the technical box will last longer and need less attention.
If you imerge your probes directly in the swiming pool, your probes will get the information at the source, so it will be even better. The downside is just that you will have to make sure that no one play with it and damage the system and you may have some cables visible.
I’m still waiting. I’ll let you know
Perfect, thank you!
Thank you all for your experience and information; I have been able to easily integrate it into my home assistant. I just need to buy the collars and print the pieces to adapt it to my pool circuit.
Regarding my pool data, I am quite a novice, and I have little idea of what each sensor does and what information it provides me. My pool has a sand filter, and I treat it manually with chlorine.
Does anyone know of any existing documentation or have a brief explanation of what each sensor is and what information it provides about the state of the water?
Thank you all.
First check that the sensors value is correct.
Take a bucket of water from the pool and immerge the probes.
The pH and ORP probes should never be dry.
I have only experience with salt pool someone or google should be able to give you more info for your chlorine pool.
The pH value should be between 6 and 8
The ORP value should be between 500 and 700.
The ORP value combined with temperature and pH will give you the chlorine level.
If those values are completely out of this range you may have a problem. Otherwise you can do a calibration to adjust the value. Follow the manual for that.
pH value will help you to add pH solution into your pool
ORP value will hep you to add chlorine.
There is a lovelace custom card for swiming pool that display all the values with color indicators (green, yellow, red).
Thank you for your detailed answer
Hello Everyone,
I am checking this interesting thread about the device that @Reunion974 owns. I also decided to purchase the same device and I am testing it since yesterday. So far, the device behaves quite well, although I had to calibrate the ORP probe for the values to be more consistent.
I was also interested in having a Free Chlorine sensor that I can add into my HA dashboard, so I managed to get and adjust a table which contains all ORP values for usual pH (6.5 - 8) and FC (0,1 - 4) for the purpose of getting some formulas which allow to get a pretty accurate FC value, with the help of some Excel options. I am sharing the below information just in case someone else needs it.
Basically, this is the formula to get the FC value that Excel managed to get for the logarithmic curve that the table values generates for a specific pH value:
Values 665.01 and 108.61 are for reference only, as they change depending on pH value. The sample above is the specific formula to get FC when pH is pH 8.
I am still checking how the FC value behaves. So far it is quite fine for the purpose of having the idea of how chlorine level is.
To implement this in HASS, I created the following template sensor for getting the right FC value according to current pH:
sensor.sonda_piscina_ph
is the sensor entity with device’s pH value
sensor.sonda_piscina_orp
is the sensor entity with device’s ORP value
- platform: template
sensors:
sonda_piscina_cl:
friendly_name: 'Sonda Piscina Cloro (con valores negativos)'
unit_of_measurement: 'ppm'
value_template: >
{% set e_number = 2.71828 %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) < 6.5 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -740.04)/141.14)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 6.5 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -740.04)/141.14)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 6.6 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -734.99)/139.02)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 6.7 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -729.97)/136.8)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 6.8 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -725.01)/134.64)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 6.9 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -720.04)/132.43)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 7.0 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -714.99)/130.28)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 7.1 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -710.02)/128.09)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 7.2 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -704.95)/125.88)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 7.3 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -700.03)/123.72)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 7.4 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -695.18)/121.41)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 7.5 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -689.94)/119.47)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 7.6 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -685)/117.25)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 7.7 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -680)/115.1)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 7.8 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -675.03)/112.91)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 7.9 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -670.03)/110.75)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) == 8.0 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -665.01)/108.61)) | round(1) }}
{%- endif %}
{% if states('sensor.sonda_piscina_ph') | float | round(1) > 8.0 -%}
{{ (e_number**((states('sensor.sonda_piscina_orp') | float -665.01)/108.61)) | round(1) }}
{%- endif %}
However, this template sensor will return a negative value when ORP is out of range on the lower side, so I also created the following sensor to display FC 0 ppm if the previous sensor returns a negative value:
[...]
sonda_piscina_cl_ok:
friendly_name: 'Sonda Piscina Cloro'
unit_of_measurement: 'ppm'
value_template: >
{{ 0 if states('sensor.sonda_piscina_cl') | float < 0 else states('sensor.sonda_piscina_cl') }}
I guess there is a better/cleaner approach for joining both sensors in just one sensor, and perhaps for the first part as well (some sort of loop according to pH values so the template not to be so long?). However, my Jinja2 knowledge is limited, but I guess it will help. For me is enough for the purpose and I am just sharing for others reference in the same way that this thread helped me to find a device with a good value for the money. I got it in Amazon for 40 EUR.
Apart from all this, may I ask you @Reunion974 to check whether the following 3D items amount are correct? I will have to ask a local 3D printing shop to build your models for me, and I would like to make sure that the order is right. Thanks!
Salut @Reunion974 super projet!
I bought the same tuya device than you did and I was planning to do a similar setup than yours.
I live in Quebec and I was not able to find an equivalent to the colier de prise en charge (pipe saddle in english) and the website you have used do not deliver in Canada. The best approximation I could find is PVC pipe tee with one of the 3 outlet threaded (example on amazon)
Do you think it’s a good replacement?
The only ones I could find were either a 1" threaded or 1" 1/2 not the 1" 1/4 that you had in your original post. Do you think that If I redesign the holders for 1" pipe it will be solid enough or I’m better off using the 1" 1/2 and either up-size the holders or use a reducer?
I never used 360 but I have experience in FreeCAD and OpenCAD. Is it easy for you to change the diameter of the plugs or I am better off starting from scratch?
If it’s easy I would really appreciate If you could send me the modified files (or a way for me to modify them)
Thanks in advance and I really appreciate any help you can provide.
Very nice work @sesardelaisla
Your list is correct except for “porte sonde”, you will need only 3 and not 4 (the 4th one is for the temperature probe).
Don’t forget to add the o-ring before mounting.
My design was adapted to perfectly fit the support collars that I had.
Yours may be 1mm longer or shorter. In that case we would need to adjust:
- porte sonde.stl
- base.stl
So you can take the risk or print only one porte sonde and test it.
If you need an adjustment I can do it for you or send you my fusion360 files so you can modify it.
Hello @Zork22,
The pipe saddle I use have a part advancing inside the thread, so can use an o-ring between it and my printed piece to make it watertight, see the picture:
Sorry for my uggly drawing.
I’m afraid the pieces you found don’t have that shape and instead present a right pipe with a thread at the extremity. In that case the thread will need to be watertight and that’s very difficult with 3d printed parts.
Sorry, I made a mistake this is not a 1 1/4 thread but a 3/4 thread. This info was correct in pintables.com but wrong in my message at the beginning of this discussion. I corrected it. Sorry for this mistake. To share the full story, I initialy had a different design in mind and ordered 1 1/4. But the supplier shipped me 3/4 by mistake. And the I found a better design with 3/4.
Did you try to make a google lens/ picture search with the image of the “collier de prise en charge”? That would be easier to find a shop delivering it in Canada.
Here, the plumbing material shops don’t sell that kind off items. But you can find it in irrigation / agriculture shops.
I can share my designs with you, I guess fusion360 fill be easy for someone with your background. If it’s a small mod, I can do it for you.
Hi @apsilva, did you solve your low value issue ? I abandoned my problem of measurement during this summer but I would like to come back on it.
I might buy a new probe but I don’t know if it will help.
Thanks for your feedback and offer to modify the design for me! For the moment, it won’t be necessary. My pool is currently a temporary above-ground one, so I just inserted the probes directly into the water. For the pH- doser, I drilled the output hose and inserted the tube.
When I have a “serious” pool with a permanent setup, I will consider to use your adapters.
Apart from this, I am also having wifi connectivity issues with this device. It is quite close to the AP, so I guess the problem is not related to wifi coverage, but with any sort of device or Tuya problem. Were you able to solve this problem finally? I also have Local Tuya and issue persists. Drops are sudden and short (usually, just about 2-3 minutes), but it is annoying.
The device is ESP8266 based and those devices are know for their very poor wifi quality.
My pool is very far away from the AP, but I solved the wifi signal issue adding the antenna as shown in my earlier post. I use a small semi directional antena.
But this issue being resolved, I still have random short wifi disconection issues.
This is not a big deal as the value change very slowly so I fixed it using template sensors like this:
- trigger:
- platform: state
entity_id: sensor.analyseur_d_eau_salinity
not_to:
- unknown
- unavailable
sensor:
- name: Piscine Salinité
unit_of_measurement: ppm
state_class: measurement
state: >
{{ states('sensor.analyseur_d_eau_salinity') }}
- trigger:
- platform: state
entity_id: sensor.analyseur_d_eau_ph
not_to:
- unknown
- unavailable
sensor:
- name: Piscine pH
unit_of_measurement: pH
state_class: measurement
state: >
{{ states('sensor.analyseur_d_eau_ph') }}
I prefer not to measure values when the water is not circulating.
So this device is powered off when the pump is off.
→ This template also allow me to keep last value when the device is off.
It’s not a big deal for me either. I was just wondering whether you finally fixed it or not. I also wanted an updated feedback to see whether it was worth it to buy another unit, but I understand that this is a problem related with the model itself. I can live with it though.
Cheers!
@Reunion974 Merci beaucoup pour le tuyau! (dsl il fallait que je la fasse…)
Your drawing was super clear and I see how having an o-ring sitting between the saddle and the 3d printed part will help.
Thanks for telling to look at irrigation/ agriculture shops, I think I found a suitable part and they offer it in 1.5" x 3/4 so I will be able to use the part you have designed as is.
For those like me who were confused about pipe size this site cleared things up for me and I’m now pretty that in North America the ID is advertised whereas in Europe (or at least on the website Reunion974 shared before) The OD is advertised…
@starpom My setup is obviously not finished but I bought some conductivity solution to calibrate the probes. Mine came as a bundle with the PH-W218 but I’m sure you could find them sold separately. Hopefully it’s just a calibration problem but I don’t know much about that stuff.
id also like a copy of these 3d printed models if possible for the glans
I turned the Yieryi device back on after several months of being off. The probe remained in contact with the water as it stayed in the probe holder.
o my great surprise, it seems to be working well now. It just needs calibration to ensure the displayed value is accurate. I am around 500-550mv, but my test strips indicate that the chlorine level is correct.
It’s interesting to see the impact of the cover opening and the sun radiation on the pool. The ORP value rapidly dropped by 50mV and then increased again as the solar radiation diminished in the afternoon. My electrolyser was operating continuously.
so now, I know that it’s working. next step is to make a calibration and try to regulate the electrolyser by the orp measurement.
Actually, my electrolyser is running at 100% when the cover is opened and 20% when the cover is closed. It’s adjustable values but I need to do it manually depending manual strip measurement.
Next step is to drive the electrolyser depending the water quality
The Yieryi I bought was equipped with relays (230v) driven by the measurement results. I modified the cabling inside the box to have a potential-free contact that i will use to connect my electrolyser.
Hi @starpom , sorry for the delay… i disconnect everything and i’m figuring it how to install the probes into the pipe… i try with the 3d parts but the printing i got is not watertight… i see water drops after running for a few minutes…
I see that the readings are ok for you now… i will connected it later to see if i got the same surprise!!
@Reunion974 by change do you have the link for the pipe thread you used?
My first attempt:
Thanks.