Ds18b20 wrong value if temperature is below 0 degrees

No, the update with restart have not solve the problem.

As a workaround until whatever is wrong with the pi s/w gets updated again, feed the value through a function node containing

if (msg.payload > 2048) msg.payload = msg.payload-4096
return msg;

That won't break if the s/w is fixed, because it should never be more than 2k anyway.

1 Like

Thank you!!! That's work.

Hi,

it seems, that I have the same problem as You described here. I am running 6 Raspis for various cooling devices. Suddenly 4 of the freezers were showing values above 4000 degrees celsius. It seems, that the sensors are faulty. I replaced the raspi with another one to make sure the installation is not to blame.

Its has nothing to do with Node-RED. I just posted this here, so You know that there are others with these faulty readings.

Gonna replace the sensors.

Bye, Torsten...

Hi, with the function from Colin is all ok. The sensor is ok. Possible is with an udpate the problem start.

Yes, but... my setup is running for over a year now. And suddenly SOME of the freezer sensors are showing these values above 4000. There are still sensors that show the correct values below 0.

I even installed a new raspi node with the most recent raspian on it to make sure it has nothing to do with it. So the same problem on old raspians versions and the most recent ones. So I am pretty sure its an HW issue with the sensors.

I will report the results for the new sensors, when I replaced them.

/sys/bus/w1/devices/28-01143bb438aa
4073.93
/sys/bus/w1/devices/28-02159245cb05
4075.81
/sys/bus/w1/devices/28-01143b87deaa
4076.31

I've try with 3 new sensors and all have the same issue. I think it's a software problem. But not node-red.

Are you saying you have some sensors that are failing and some that are not, on the same Pi? Are they all on the same bus?

Hello Speedy and Colin. You are absolutely right.

I just checked a node which was still showing the correct value below zero. Then I did an update/dist-upgrade and after the reboot the negative values were beyond 4000.

It definitely is a software issue.

Further googling brought me here:
https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=303036&p=1819347&hilit=ds18b20#p1819347

The "full-upgrade" didn't help. Nor the most recent version of raspian. But for now, please accept my apology for the confusion.

Bye, Torsten...

1 Like

Following the GitHub threads, I came across this workaround

The thermometers always overreport by 4096Ā°C and by subtracting 4096 if the temperature is over 100Ā°C correct readings can be obtained.

You could try doing this in the flow

UPDATE:

Says a `rpi-update has a fix for this.

See reply #42 :slight_smile:

It seems there is a fix if you run rip-update.

@Colin oops, missed #42 :thinking:

I think you have to be careful running rpi-update as (I believe) it installs the latest pre-release kernel etc. If I had a 'production' system with this problem I might be inclined to stick with the workaround for the moment and wait till it makes its way through the system to full release.

[Edit] Otherwise @zenofmud's typo above might become remarkably perceptive.

1 Like

Well, the rpi-update helps with the problem. But let's see what other "wonders" lie ahead of me, now that I updated the kernel.

But for the time being, thanks for all the infos. The freezer alerts are quiet now.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.