The firmware supports up to 8 sensors on one line. If you didn’t specify the sensor ID in the settings, the firmware sends values from all auto-detected sensors to one endpoint with a description field like “C,00-00-00-00-00” (unit, comma, device ID). The high-level system should analyze incoming data and place a sensor’s value in the necessary place.
![Multiple sensors on one endpoint](https://ptvo.info/wp-content/uploads/2023/11/ds18b20-autodetect.png)
If you have multiple sensors on one bus, it is better to specify the sensor ID in the firmware settings and link it to a specific endpoint. For this, you should specify the same pin, sensor type, and your unique sensor ID on different endpoints (see an example below). In this case, the firmware will send the sensor value to the corresponding endpoint. So, the sensor will be hard-linked to one endpoint.
![Multiple sensors on one bus but with fixed ID](https://ptvo.info/wp-content/uploads/2023/11/ds18b20-fixed.png)
If you can connect one sensor per pin, it will give you more flexibility. You can replace broken sensors without re-flashing a device.
![Single autodetected sensor on pin](https://ptvo.info/wp-content/uploads/2023/11/ds18b20-autodetect-single.png)
Here is the great tutorial with four DS18B20 sensors and HA integration.
Glenn
Thanks for making this available. I’ve followed the linked tutorial and have it working, reading three sensors. However, one of the sensors reads very low. Eg. currently it is reading 2.625 while the others are reading 21 degrees. i.e. very close to 1/8 of the correct temperature.
For extra context — this sensor was bought years ago, and I suspect is an older variant.
Why it matters is because I need to read older sensors that are already emplaced in my floor (and I have tried reading them with this firmware, they also read 2-3 degrees).
I know with these sensors you used to be able to read the temperature in one of three resolutions, the highest resolution read 3 more bits. Is that what needs to happen here?
Owner
If you used this DS18B20 sensor in other projects. It can be configured to use a non-standard (non-default) precision settings. My firmware does not change the sensor configuration (precision), and you can get a wrong value. You can use Arduino and simple sketch to change precision.
Fernando
Hello, I have only one ds18b20 connected, the problem is that the temperature is not automatically renewed, in order for it to take a new reading I have to turn off the light and turn it on again.
Has anyone had the same ????
Owner
It seems you disabled periodic reports in the firmware settings on the Expert tab. Or your higher level system changes the interval of these reports.
Fernando
problem solved, set StatusLED P00 Periodic 5 seconds,
Input1 P01 GPIO Pull-UP On/Off,
with Input 01 connected to negative for about 10 seconds until the connected LED P00 stops flashing, I disconnect the negative from Input 01 and when the LED starts flashing quickly every 1 second, I reconnect input 01 to negative for about 10 seconds. and with that it starts giving me readings from the 2 DS18b20 probes connected to Output1 P07 and Output2 P06..
Destman
Is it possible to make a thermostat logic with this sensor?
Owner
No, the firmware does not have these features.
Daniel
Hi. in the description you write that there can be up to 4 sensors on a bus. in the comment you write but there can be up to 7 sensors. are 7 sensors allowed on one pin or do i have to put 4 sensors on one pin and the other 3 on another pin? I am a bit confused. thank you.
Owner
Yes, you can add up to 8 sensors on one pin. I’ve changed the information on the page.
Ken
Hi
I am a little confused.
Why are you configuring the sensors as outputs, should it be input on the CC2530?
Owner
Input/output does not matter for sensors. It is just a place for the settings.
Thomas
Hi, i would like to build 3 devices with 6 sensors and 1 with 4 sensors. Is that possible or do only 4 sensors always work?
I once designed a PCB and presented it in the ioBroker forum
https://forum.iobroker.net/topic/49755/ds18b20-mit-cc2530
Owner
You can add up to seven DS18B20 to your configuration.
Thomas
But I need the premium version for the number of devices and then 4 times, right?
Owner
No, the free version allows you to add 7 sensors too. Please note, that all sensors should be on one bus, or you should specify the sensor ID in the settings for each channel.
Gabriel
Hi. I’m using Home Assistant with ZHA instead of Zigbee2Mqtt. Using the firmware as proposed here, device is connected (message received in log) but there is no “Entity” showing the Actual Value. Do you think I’m doing something wrong?
Owner
It seems that ZHA has limited support for DIY devices, and I cannot help here.
Tomas
Hi, I try connect 6 sensors like inputs, each sensor on own pin, but i receive data only from first sensor. I chose this solution because I want change sensor time to time so can’t set sensors IDs and use one pin (bus).
Is this configuration possible/supported?
Anyway, thank you a lot for great work, Tomas
Wacsy LEE
Can DS18B20 used in the PSM, please?
Owner
Yes, you can. But you should connect the VCC line of the sensor to P10 or P11 pins and configure External power control for this sensor.