I have a sonoff th16 connected to a hot water tank. As well as turning on and off the electric heater, I have connected 7 DS18B20 temperature sensors in parallel via the 1-wire bus to monitor the temperature at various heights on the tank.
This has been working well for approx 1 year but 2 days ago one of the sensors died. I rebooted the sonoff and checked the logs, only 6 were showing during initial discovery.
So I put it down to a broken sensor or cable and replaced it. All working fine after I reassigned the address.
But then 1 day later the new sensor in the exact same position died at 2am. No one touching it, no heating in progress, no automations etc. Multiple restarts, it seems the new sensor is completely dead.
I am looking for ideas… how could the sensor be working fine for so long then die twice in quick succession, and all others connected in parallel are completely fine? What made that particular one die?
Sure, there could be bad soldering/wiring to that sensor. But in that case why would it work then die with no one touching it?
When I replaced the sensor it changed from sensor.temperture3 to sensor.temperature3_2 in home assistant…
Strangely this did not take effect until several hours afterwards, so I got a period of normal operation out of the new sensor before it got renamed.
Maybe 2am is a time when homeassistant does some housekeeping.
What is that adapter they sell ?
May I connect the DS18B20 directly to my ESP32 ? I now used a resistor of 4,7KΩ between the red and yellow wire…or is the adapter replacing this ?
The protocol needs a weak pull-up which is what the resistor does. Keep it short if you can to maximise reliability. Total length of my setup is about 2m to the last sensor.