Monitoring Multiple Pipe Temps With ESPHome

I’ve had a HA server running about a year configured with a lot of stuff I own that has prebuilt integrations, and I’ve made some custom cards for some of my stuff, but now I’d like to move onto something a little more complex.

I’ve seen numerous posts about monitoring the temperature of water in pipes and the related issues (speed/sensitivity/space/etc), but none seem to address what I’m looking for directly so hopefully the community can help.

To begin, my goal is to have a means to monitor the temperature in multiple supply and return pipes that are part of my boiler system. I understand that the pipe temperature will not equate to water temperature directly and it will take time to heat up/cool down, which is fine as I’m not looking to use it for anything critical, I mainly just want to know its heating up, its cooling down, or its maintained the current temp for awhile, and the pipe temp as a rough gauge of how hot the water may be once the temp has stabilized.

The boiler has its own heat sensors which are basically these guys:
https://www.kele.com/product/temperature-sensors-and-transmitters/strap-on/tasseron-sensors/thtspa00?srsltid=AfmBOorajkMpjTFsK5z4jqO5TpauFwZHrX9eUXeCB1ig09Eclb4ZsC1t so to me it would make sense to use more of them so everything basically matches and since they seem to work well enough for the boiler to use them to control itself and are reliant enough that the boiler manufacturer uses them…

I’m thinking there has to be a way that I can wire a bunch of these (my count would be 14; 5 zones with supply and return pipes, the boiler main loop supply/return, and the indirect hot water supply/return) to some version of an ESPHome board and then use that to convert the analog signals into something I can pick up on the wifi network via HA?

So my biggest question is would this work with ESPHome and if so, aside from the sensors themselves, which ESP device would I need to attach them to (or would I need more than 1 due to the quantity or an expansion board or… etc)? I’ve done nothing with ESPHome yet but from the little reading I’ve done it seems like it would be my best bet?

I do have an outlet near where I’d mount the device so it doesn’t need to be battery powered, but outside of that I’m sort of stumbling in the dark.

Any help as to which device(s) I may need, or pointing me at other posts I may have missed would be appreciated!

10K thermistors? You will need a separate analog to digital converter port for each. Be aware their response curve may not be fully linear.

Consider using the Dallas DS18B20 as your temperature sensors instead.

They use the digital two wire interface (three wires actually needed as you will use a bunch of them) but you can connect them all to the single GPIO pin and read them all from the one ESP32 as each sensor has their own unique serial number built in.
A dropping resistor to support driving multiple DS18B20’s is recommended, and be aware of star wiring issues that are covered in the data sheet and application notes.
Bonus: Zip tie them in direct contact with the pipes and cheaper than your thermistor sensors. You can even buy them with waterproof cables of varying lengths. Commonly available.
Very accurate. Don’t be tempted to monitor to 12 decimal places - just because you can doesn’t mean you should!
Your boiler has a vast thermal lag. This is why commercial units only monitor temperature at one location - good enough is good enough. You may gather enormous reams of data to verify that, and eventually consolidate your monitoring to one sensor near the outlet connection at the top of your boiler as your understanding develops and you find your fancy graphs actually follow each other quite closely, or you examine the option of using the existing smarts in your boiler (you didn’t share any make and model) to import data into HomeAssistant directly. After all, your boiler vendor has already done this for their own temperature control functionality and you are duplicating their work.

Check the ready projects on ESPHome for your yaml code requirements. Use sensible descriptive choices for each sensor name, limit your stored data to one decimal point and it will make it easy to code your automations as required.

ESPHome or Tasmota? Look at your options and which is easier to configure and integrate.

Why?
What knowledge do you expect to gain?
What will you do with the data?

Now, if you just want to be a data hoarder, it is fairly straightforward. I agree with @IOT7712 the venerable DS18B20 is a good choice. I have some in place for over a decade. I use mine for freeze protection systems and to monitor my hot water recirculation system (to minimize energy use). Even with very good reasons for wanting the data, for the most part it is incredibly boring.

I now use thermowells on some of my pipes to get a better result of the actual water temperature to get better accuracy on my calculations of efficiency of my heat pump water heater. That data is also incredibly boring. So boring I stopped looking at it at all and haven’t bothered to fix it since I had some sensor failures.

If you are a dedicated data hoarder, first do some research on the DS18B20. Most of them will be fake, but they still give a decent indication. I put pipe insulation over mine to get a more accurate reading.

LOL: Spoken like a true data hoarder! I bet you initially configured you automation triggers to fire when the temperature (monitored to twelve decimal points) changed, and wondered why it was triggering constantly. [Hint: Filters will solve that at the yaml level]

Tucking the DS18B20 under any existing pipe insulation is good, but I would be considering pipe insulation for the heat loss savings rather than the sensor accuracy, which will be indicative, based on distance from outlet and water flow rate, something that will become self evident during experimentation.

Not for the first five minutes while the data (to twelve decimal points) is slowly being plotted on your newly minted dashboard. And after a week all you see is confirmation that the temperature goes up, comes down, and remains within a small range, exactly like it was designed to do by the manufacturer. You may even begin to wonder about hysteresis, a vital concept that is included in HomeAssistant temperature automations like opentherm, etc.

There are cost savings to be had if there are readily identifiable usage patterns that can be utilised to control the heating cycle for peak efficiency.

Knowledge is power.

Having said that, effective insulation of pipes as well as the boiler can make a greater difference to energy savings than most smart integrations. Each installation is unique, but they broadly follow well established industry norms.

nope, the original goal was freeze protection well before HA was a gleam in somebody’s eye. I had a custom system running on some custom hardware before even the esp8266 was a gleam in somebody else’s eye. I switched to Tasmota and NodeRED, which I still use. It checks every 30s and turns on the heater when the temperature is too low and off when it is too high or no longer too low (multiple sensors).

Different systems/locations have different behavior, but very simple bang-bang control works well enough.

For the most part it is very boring and just works.

Hysterisis can be kind on your relay contacts and other hardware.

My main desire isn’t data hoarding, nor is it to monitor the boiler output alone; its to be able to see when each of those zones are running since the zone valves themselves don’t appear to be readily adaptable to something I can tie into HA (and I want to verify they are running independently of the thermostat calling as the thermostat cant tell if a zone valve has failed and isn’t opening but measuring pipe temps sure can), and also to see what kind of temp differentials I’m getting between supply and return on each section (not perfectly accurate but a reasonable estimate) as that absolutely would help in dialing things in since we have a mix of forced air over heat coil and in-floor radiant spread over those 5 zones. I certainly won’t be tracking data to 12 decimal places. 1 decimal is probably overkill.

I have a Weil Mclain Ultra boiler but it doesn’t appear to have any automation/connection built in as its probably around 12 years old at this point.

Aside from just having the data so I can display it, I’m also hoping to fix one specific issue that my HVAC techs (I own an HVAC company but am not a tech myself; long story involving big family business and a few mergers) can’t pin down. It only happens 3-4 times an entire heating season and everytime it does I rush to fix it by restarting the furnace before I think to myself I should troubleshoot so even the techs dont have anything to look at and we can’t seem to reproduce it on demand; but what happens is at times the air handler with a heat coil for two rooms of the house stays on even when the thermostat stops calling for heat, so the blower stays on, and it continues telling the zone valve to stay open, so then anytime anything in the other 4 zones calls for heat, its also heating that zone, resulting in those two rooms getting up into the 80s or low 90s before we notice and I have to restart the furnace. We have a couple ideas of what it could be but all the options are not very cheap and I don’t want to just spend money guessing.

So I figure a) I can modify the furnace power switch to be remote controlled if I get notified it’s happening; but I need to know the temp of the pipes for the heat coil because the upstairs room is basically a small room made entirely of floor to ceiling windows so it acts like a greenhouse and if the outside temp is just right and the sun is just right, it can get into the upper 80s naturally without the furnace being stuck even when its fairly cold out and b) It will give me peace of mind knowing I can see it and remotely toggle it in the future even if we do eventually track the problem down.

One thing I still don’t see in the above is, even if I go with the DS18B20 sensors, I see ESPHome and Tasmota but not what to run them on. What kind of device would I be pushing this to? From what I glean there’s a handful of premade chipsets out there similar to Arundino (which is also something I’ve read of but not played with), so what should I be looking to actually wire these into? Is there a site with premade boards to choose from? Do they directly state they have GPIO pin or do some not have that since it sounds like that’s what I’d plug all of them into a single pin in on? A dropping resistor is mentioned, what even is that and where does it go in the wiring scheme? So many questions I feel more lost :grimacing:

You are correct. It depends on the time constant of the system. My function supports a hysteresis value, but I have places where that makes the control worse. It all depends on the goals/requirements.

Okay there are many choices, probably too many for someone starting out.

Do you know how to solder?
If not you might want to stick to one of the boards that use connectors so you don’t have to.

Shelly makes some. Sonoff and m5stack are other companies that have esp32 based controllers.

In my experience, yes, distrust of existing system seems to be a common driver for need to monitor.

A cheap ESP32 will suffice for running ESPHome or Tasmota as your hardware platform. Get one with whatever connectivity you need to talk to your HomeAssistant server, whether it be Thread/Matter, ZigBee, BlueTooth, Ethernet, RS485, or WiFi. MQTT optional and easy to integrate. After you have debugged your HVAC issues, you can repurpose it for something else. Some come with screw connectors and others on a breadboard you can plug into. Various vendors supply them pre-built - check which ESP32 they come with to support the connectivity you need.

Beware as there are countless DS18B20 projects out there, but LLMs like ChatGPT will often serve up solutions that just don’t work.
Search these forums, ask on Discord, and do a bit of reading. YouTube tutorials are often out of date.

I do but not well. Certainly prefer screw down connectors if possible. Am I understanding that something as (visually) simple as a Shelly 1 Gen 3 as an example is an ESP32? I guess that may be part of the problem I’m having in looking is I guess I’m expecting something to look like a breadboard or PCB or something, and I presumed things like those Shelly 1’s hook into it; am I completely wrong in my understanding and the Shelly 1 etc is the brain?

m5stack doesn’t have a DS18B20 to try out, but it does support using it (I have several different designs from them and it is easy to get a DS18B20 to work, once you have a little experience, but the first time can be very hard).

The Shelly pill appears sold out (I think it is new). It appears to use a standard DS18B20 so just getting the sensor(s) from them might be good.

The Tasmota DS18B20 is special as I recall, so might not be the best for your application.

I would start with a single sensor and an esp32 device getting set up with esphome and probably Home Assistant. That is going to be quite the learning curve.

Don’t be frazzled - it is one of the most often lashups used for temperature monitoring for hobbyists as well as industry. If you can wire up a standard HVAC controller, this should be simple.

A bit of light reading for you:

Some of the reasons why you may want to go with one GPIO pin and the sort of issues you may stumble over and some sample code.

One DS18B20, many DS18B20’s - same thing. You can start with one or more. The resistor is to add a bit more current so more than one can work reliably. The firmware in ESPHome or Tasmota will take care of the polling, device serial number decoding and all the other behind-the-scenes stuff needed to get the data off each sensor.

The Tasmota page has useful diagrams and discussions that are also applicable to ESPHome. Same wiring, same resistor, same port assignments should work.

The standard Shelly devices don’t expose low voltage connections. The plus line has an extra thing you can add.

This is a different choice

That should be enough to get started.