You only need to set-up the pump at volume you want and take a measure, pumping simply tap water, of how much water it pumps in a minute. Afterwards you can control how much time the pump is running to feed the chloryne you need to the pool. Mine for exmaple is set to pump 300cc per minute and i push 1.2litres of chlorine therefore i make the pump to run 4 minutes.
In AliExpress you can find lot of different rubber seals. I used a rubber seal I had at handy from ip68 junction boxes that I normally use in the garden. Self fusing silicon tape is also an option.
Great, thanks! just got the tube, the HW218 and the new probes. Also bought a new inverter pump. Pool is now in the winter setup, but come spring I’ll be busy putting everything together.
Hi Yuanca, after spending my summer setting up my system, I stumbled on your post! I have the same chemical tester which has worked great for 3 years now, and wanted to replace the pH and ORP probes this year. It looks like I ordered the same as yours on the picture, and the ORP works great for me, but I can’t get the pH probe to read (value does not change). Did you need an adapter or modify anything in the tester itself for yours to work?
Also would love a link to where you got the saddles from. I 3d printed mine and after a huge amount of filament for print troubleshooting and a crazy collection of washers to find the right fitting, it is sort of ok but I have a feeling it won’t last more than 1 season, so I’d like to replace them for next year.
• I replaced the original pH probe twice: it worked fine for only a couple of days and then started giving inconsistent readings. That’s why I ended up buying these probes on AliExpress.
• At first I did everything with 3D printing, but every time I had to check or remove the probe the printed adapter would break. So I decided to buy the adapters I mentioned in the post I made on the forum in July 2025.
• I bought the collars from the link posted by Reunion974 in September 2024.
I bought the device some time ago, but I haven’t been able to plan the installation until now.
After reading the entire forum, I found your installation, which avoided the use of custom parts, very interesting. However, I have a couple of questions that, although you’ve explained them, I don’t quite understand.
What adapter did you use for the temperature probe?
And in the assembly where you use the plug to pass the probe through, that probe doesn’t have a BNC connector, does it? How did you manage to pass the probe through and seal it afterward?
I didn’t replace the original probe. What I did was use a 1/2” immersion sleeve to insert the original temperature sensor inside.
This way:
• The original probe is not in direct contact with the water
• It is inserted inside the sleeve
• And the sleeve is what gets threaded into the installation
This way you avoid passing cables through the plug or doing complicated sealing.
Title: [Share] Local 100% Offline Tuya W218 (8-in-1) Pool Monitor Integration via ESP32-C3 Super Mini
Hello everyone,
I would like to share my solution for integrating the Tuya W218 (8-in-1) water quality monitor locally into Home Assistant using the ESPHome ecosystem. The main goal was to replace the original Wi-Fi module (WB3S) with an ESP32-C3, completely eliminating cloud dependency and allowing for high-performance local monitoring.
1. Hardware and Pinout
The W218 monitor uses an internal microcontroller (MCU) that performs the analog reading of the sensors and communicates with the network module via the Tuya V3 serial protocol. The first step is to desolder the WB3S module and adapt an ESP32-C3 Super Mini.
Since pool equipment rooms are often shielded or far from the router, I used a version of the ESP32-C3 Super Mini with an external antenna (U.FL/IPEX connector) to ensure a flawless Wi-Fi signal.
2. The Reverse Engineering Challenge (The Tuya “Deadlock”)
The biggest technical difficulty of this project was overcoming the W218’s communication “deadlock”. Initially, the MCU ignored the connected Wi-Fi status (0x03) and remained completely silent. (I’ve worked a lot on this for more than a month)
To unlock the continuous sending of the 8 sensors, I implemented the following logic in the custom C++ code:
The Necessary “Lie” (Status 0x04): The secret is to report status 0x04 (Connected to Cloud). The W218’s MCU only releases sensor data if it believes the module has an active connection to Tuya’s servers.
Fallback Header (0x00): Regardless of the version the MCU reports (e.g., 0x03), it always accepts responses from the ESP using the version byte 0x00.
Proactive Heartbeat: The ESP32-C3 needs to send a Heartbeat command (0x00) every 10 seconds. This prevents the MCU from entering power-saving mode.
Time Sync: The device requires time synchronization (CMD 0x24). By injecting the correct time obtained via ESPHome’s SNTP component, the MCU stabilizes the sending of the pH and ORP DPs, which are the most unstable.
3. Critical Firmware Optimizations (YAML)
The ESP32-C3 is demanding. To avoid chronic socket exhaustion errors (ENFILE/errno 23) and connection drops, I adjusted the following settings in lab-piscina.yml:
Increased the lwIP socket table: CONFIG_LWIP_MAX_SOCKETS: "16".
Increased the API TCP backlog: CONFIG_LWIP_TCP_BACKLOG_SIZE: "8".
Disabled the web_server: The ESP32-C3 doesn’t handle API + Web Server + UART processing simultaneously very well. Removing it resolves abrupt disconnections (CONNECTION_CLOSED errno=128).
Disabled Wi-Fi power save mode (power_save_mode: none) to ensure zero-delay processing on encrypted handshakes.
4. Data Points (DP IDs) Mapping
If anyone is adapting the code, here are the native IDs of the W218:
pH: ID 106 (Multiplier 0.01)
ORP: ID 131 (Unit mV)
Temperature: ID 8 or 108 (Multiplier 0.1, °C)
TDS: ID 126 (Unit ppm)
EC: ID 116 (Multiplier 0.01, mS/cm)
Salinity: ID 121 (Unit ppm)
CF Factor: ID 136 (Multiplier 0.1)
To orchestrate all this cleanly, I developed a custom C++ header file (tuya_w218.h) that manages the serial input and output queue, communicating perfectly with the lambda components in the YAML file.
I hope this report helps anyone trying to use this Tuya pool equipment locally.
I also got the Ph-W218
and indeed with the official Tuya integration I still hit the issue you mentioned (only showing temperature)
but I was able to get all entities (temp, pH, ORP, EC, salinity, TDS…) by using the Tuya Local integration from make-all
Finally a hero! Just today I finished the plumbing for the sensors, and I faced the raw reality: the pool service room is way far from the router. Not to mention that I dislike the Tuya ecosystem due to privacy reasons.
I come here from time to time just to check, and today with the connection issue I came back to this thread again, just to find the most finest gold.
So I’m implementing your amazing solution right away this week, so I’ll get here asap to share my advance and give you feedback.
Many thanks for sharing, and keep up with the work.
I got too excited too soon. The fact is that, after checking your github in search of further info, I got stucked.
I’d need a little guidance about how to get your aproach working.
I have experience with ESP32, in fact I have a few spare C3 supermini at home, and programming them with ESPhome is not an issue. I also have no problem at all with soldering, I’m experienced at it.
But I don’t know how to start. I’d need to know which code use in ESPhome (I guess the yaml attached), and what to do with the C++ code in Home Assistant.
And once this is done, I also need to know how to get the data into Home Assistant (ESPhome device discover, mqtt autodiscover, wifi…?), assuming that the ID’s will be usable sensor for automations and cards.
But I really need help in putting all this together.
Many thanks in advance.
I can tell you the absolutely best swimming pool monitoring system but, not for free!!! Im thinking its worth atleast 2 days a week of free pool access and free swimming noodle use or atleast a blow up unicorn float at your house.....??? Take it or leave it bud, but my next offer is going to add free speedo rental from your personal wardrobe so........ ; )