Git Product home page Git Product logo

node-red-contrib-sensor-ds18b20's People

Stargazers

 avatar  avatar

Watchers

 avatar

node-red-contrib-sensor-ds18b20's Issues

Calibration / offset implementation

Can you add an offset field?

I have 3x ds18b20 on the same water system. So if no heating is working, all should read the same value.
But that is not the case. So instead off adding an extra function to add an offset, can you implement this in the library?

Thank you

Usage of DS1820

I testet you code with two different sensores: DS18B20 (what it is designed for) and DS1820.
Found different values:
DS18B20 leads to values around 25.5 whats correct.
DS1820 leads to values around 3.18 what seems to small for roomtemperature.

Next i had a look at the code where you get the data from sensors :

fs.readFile('/sys/bus/w1/devices/' + sensor + '/w1_slave', 'utf8', function (err, data) {
if (err) {
return callback(err);
}
var arr = data.split(' ');
if (arr[1].charAt(0) === 'f') {
var x = parseInt("0xffff" + arr[1].toString() + arr[0].toString(), 16);
var output = -((~x + 1) * 0.0625);
return callback(null, output);
} else if (arr[1].charAt(0) === '0') {
var output = parseInt("0x0000" + arr[1].toString() + arr[0].toString(), 16) * 0.0625;
return callback(null, output);
} else {
return callback(new Error('Can not read temperature for sensor ' + sensor));
}

my "w1_slave" files look like this:

  • for DS18B20

94 01 4b 46 7f ff 0c 10 26 : crc=26 YES
94 01 4b 46 7f ff 0c 10 26 t=25250

  • for DS1820

33 00 4b 46 ff ff 07 10 0b : crc=0b YES
33 00 4b 46 ff ff 07 10 0b t=25312

I am not really uset do java but it looks like you are calculating the value and you dont use the "t=" to find the value.

Could you maybe have a look on this?

TOPIC is missing

Topic is missing in produced message. Even if Name/Topic is filled.

Fails to read negative temperatures!! (Any more!!)

Hi

This node has stopped reading negative temperatures - I've tried 3 different sensors and 2 different pi (a Pi 4 2gb and Pi 4 4gb). The same sensors display negative numbers on my sonoff with tasmota so I don't believe there is anything wrong with the sensors.
What is really strange is that the node was able to report negative temperatures several weeks ago. I've run various updates on the pi's since that time but that shouldn't have broken this. Any ideas - (I can obviously fix it with a function block!)

If you need any other info - let as know.

Thanks in advance

Data:

Probes placed outside monitoring the temperature dropping)

Sonoff | Pi
0.7 | 0.7
0.6 | 0.6
0.5 | 0.5
0.4 | 0.4
0.3 | 0.3
0.2 | 0.2
0.1 | 0.1
0 | 0
-0.1 | 4095.9
-0.2 | 4095.8
-0.3 | 4095.7
-0.4 | 4095.6

Node red v1.2.9 running in docker (IOTstack build)

Pi 4 2gb & 4gb
Versions:
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.