I have been trying to get another set of Dallas temp sensors to work consistently on a new installation with a WeMOS D1 Mini. I have another D1 Mini with two Dallas sensors connected to one pin that has been working fine for months no errors. This install has been plagued.
I’ve read a lot of issues others have had and made changes trying to track this down, but am starting to wonder if these things are just too finicky?
Today I made some changes, switched to 5V and used Cat-5 twisted pairs wired up like this:
Blue wire: Data
Blue-White: Ground
Orange wire: 5V
Orange white: Ground
I read that it was preferable to keep the pairs twisted and run ground on the other wire like this. Before this change I was just using Blue: Data, Orange: 5v, Brown: Ground.
When I first made these changes the three sensors all reported fine and there were no errors for about 30 minutes, and then the dreaded Scratch pad checksum invalid! errors started occurring on the 2 sensors at the end of the line.
As I’m writing this the first and last just reported correctly, but the middle one failed. Then on the next update interval both of the last 2 sensors failed.
Some Info:
- HomeAssistant 2024.11.3
- ESPHome 2024.12.4
- one_wire on D2 GPIO 4 (have not tried another pin)
- 2.2k pullup resistor (after trying 4.7k)
- powering the dallas sensors with 5v (after trying 3.3V)
- Total cable length from WeMOS to last sensor: 3 meters
Each of the sensors is soldered to a proto board and connected to screw down terminals for the Cat-5 wire coming in and out. So 6 screw down connections: Ground, Signal, 5V coming in and the same going out to get to the next sensor.
(My other WEMOS D1 with two sensors I just soldered the sensors directly to the Cat-5 cable, but that cable is only 2 meters long going from ceiling to floor. This new installation is under my porch and cabin and I had issues with the wire breaking while trying to run it). Tested voltage at the last sensor and 5V shows up.
Here’s my current config. I did try and set different update_intervals for each sensor to see if that made a difference if they were not all trying to update at the same time. Did not seem to make a difference.
# Dallas 1-wire setup
one_wire:
- platform: gpio
pin: D2
sensor:
- platform: dallas_temp
name: "Porch Low Temp"
address: 0x340624a2055a7728
filters:
- filter_out: nan
- platform: dallas_temp
name: "Under Cabin Temp"
address: 0x8c0624a1fc3d4928
filters:
- filter_out: nan
- platform: dallas_temp
name: "Water Heater Temp"
address: 0x520624a1c71e7a28
filters:
- filter_out: nan
Here are the errors
[16:52:44][D][dallas.temp.sensor:054]: 'Porch Low Temp': Got Temperature=5.2°C
[16:52:44][D][sensor:093]: 'Porch Low Temp': Sending state 5.18750 °C with 1 decimals of accuracy
[16:52:49][W][component:170]: Component dallas_temp.sensor cleared Warning flag
[16:52:50][W][dallas.temp.sensor:139]: 'Under Cabin Temp' - Scratch pad checksum invalid!
[16:52:50][W][component:157]: Component dallas_temp.sensor set Warning flag: scratch pad checksum invalid
[16:52:51][W][dallas.temp.sensor:139]: 'Water Heater Temp' - Scratch pad checksum invalid!
[16:52:51][W][component:157]: Component dallas_temp.sensor set Warning flag: scratch pad checksum invalid
I have not tried adding 150 Ohm or 100Ohm resistors in series on the Signal line. I suppose that is my next test. But after 2 days of crawling around under the house and bringing things back to the bench, I’m starting to wonder if the one_wire protocol is too finicky for use with Home Assistant / ESPHome???
Seems like most other Topics I read about this issue were solved by one of the things I have tried, or by that update back last summer to get around the one_wire bug.
Hoping someone else has some good advice.
thanks,
-kai