DS18B20 dropping from domiticz

Moderator: leecollings

Post Reply
njlammerts
Posts: 139
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

DS18B20 dropping from domiticz

Post by njlammerts »

I have overcome the problem of DS18B20 and recognition by last address decimal. I ordered several DS18B20's by different sellers, so I have now 6 sensors that are recognized as separate sensors. Now I have the problem that sensors are dropping out of raspberry. With the command:

cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slave_count
Schermafbeelding 2023-01-28 om 12.47.04.png
Schermafbeelding 2023-01-28 om 12.47.04.png (34.95 KiB) Viewed 1721 times

I get the reply how much sensors are detected. After 2-48 hours of hard reset (power off) the reply is always less then 6. Sometimes it is 6 but after some time the sensors are dropping and are not recognized anymore. This means that the directory's are not present.
Schermafbeelding 2023-01-28 om 12.37.34.png
Schermafbeelding 2023-01-28 om 12.37.34.png (33.49 KiB) Viewed 1721 times

In below graph it shows that sensor stops working on Friday at 20:10 and spikes up after restart raspberry on Saturday at 12:xx

Schermafbeelding 2023-01-28 om 12.55.37.png
Schermafbeelding 2023-01-28 om 12.55.37.png (379.07 KiB) Viewed 1721 times

Only CV retour and Boiler Middle kept working over this period

I have read something about counterfeit/fake sensors, but also about a piece of 1wire software that is not working correct in the newest version. Does anyone recognizes this and has found a solution?
willemd
Posts: 621
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: DS18B20 dropping from domiticz

Post by willemd »

I am using 2 sensors without problems.

How is your wiring? Could this be a reason for them dropping out?
BartSr
Posts: 347
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.3
Location: Netherlands
Contact:

Re: DS18B20 dropping from domiticz

Post by BartSr »

I m using lots of DS18B20 sensors. All from Ali.
These are hooked up to ESP8266 with EspEasy.
Never had a sensor dropped.
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 espeasy
MQTT
njlammerts
Posts: 139
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: DS18B20 dropping from domiticz

Post by njlammerts »

BartSr wrote: Sunday 29 January 2023 17:40 I m using lots of DS18B20 sensors. All from Ali.
These are hooked up to ESP8266 with EspEasy.
Never had a sensor dropped.
Can you connect multiple DS18B20 to one ESP8266, or does every DS18B20 needs its own ESP8266?
njlammerts
Posts: 139
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: DS18B20 dropping from domiticz

Post by njlammerts »

willemd wrote: Saturday 28 January 2023 18:35 I am using 2 sensors without problems.

How is your wiring? Could this be a reason for them dropping out?
I have all DS18B20 connected to a piece of experiment print and from there i have about 40cm cable to the Pi. The pull-up resistor is also on the experiment board. All the wires from the experiment board are +- 1m long
pcb-experiment-print-single-sided-25x6cm-with-line.jpg
pcb-experiment-print-single-sided-25x6cm-with-line.jpg (66.61 KiB) Viewed 1688 times


Strange thing is that the sensors stay working somtimes for 1-2 days and sometimes drop after 1 hour.
To get the sensors back, i have to turn power off/on the raspberry and sometimes 1 or to are missing also and an other power/off/on is needed.
willemd
Posts: 621
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: DS18B20 dropping from domiticz

Post by willemd »

I am not on expert on electronics, but with that kind of unpredictable behaviour I would expect a hardware issue rather than software, such as maybe power below/above a certain threshold switching the sensors off. I would experiment with different setups, starting with a different power supply. Then, are the sensors connected to the 5V pin or 3.3V pins?
njlammerts
Posts: 139
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: DS18B20 dropping from domiticz

Post by njlammerts »

I have a degree in Electronics an can say that power is not the problem.
The problem is with both 3.3 an 5V power from the GPIO 1 and 2 pin. I use the original power supply that came with the Raspberry.
Also the sensors seem to drop at random. The 2 that are working now, may not be working tomorrow.
So its not a power problem
njlammerts
Posts: 139
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: DS18B20 dropping from domiticz

Post by njlammerts »

When the Pi is booted there are 6 directory's for 6 sensors, each wit the name of the specific 1-wire ID.
Schermafbeelding 2023-02-03 om 18.04.17.png
Schermafbeelding 2023-02-03 om 18.04.17.png (20.35 KiB) Viewed 1644 times
In this directory are lots of other files and dir's.
Schermafbeelding 2023-02-03 om 17.57.58.png
Schermafbeelding 2023-02-03 om 17.57.58.png (23.34 KiB) Viewed 1644 times
When the sensors are dropped, the specific directory's are also gone, so that's why there is no temperature info.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: DS18B20 dropping from domiticz

Post by waltervl »

This is probably a RPi or cabling issue.
Check internet, I came across this topic: https://forums.raspberrypi.com/viewtopic.php?t=25154
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
njlammerts
Posts: 139
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: DS18B20 dropping from domiticz

Post by njlammerts »

I am running stable now for 6-9 months now. The problem is/are not original DS18B20 sensors. I bought some from Amazone.nl and AlieXpress and they are not to be trusted. I have a different source of sensors and that goes well!!
I now have about 6-7 running on 1 PiZero and works fine.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests