Reading OneWire DS18B20 sensor

1,286 views
Skip to first unread message

Martin Stiborský

unread,
Oct 16, 2014, 5:03:10 PM10/16/14
to node...@googlegroups.com

Hi guys,
I just installed Node Red on my Raspi and I'm quite impressed.
I'm trying to find out how to read data from a DS18B20 sensor connected to the RaspberryPi.

Is there any out-of-box solution? 

What about another "Input" node for such sensors? I'd like to do it, in case it's not bad idea…If I undertand correctly, I should create a new "Node" for this purpose. That sound like a good challenge :)


Thanks!

Nicholas Humfrey

unread,
Oct 16, 2014, 5:36:18 PM10/16/14
to node...@googlegroups.com
Hello,

I recently released a node to do this:

It uses the excellent owfs library to do the hard work. So the first step is to get owserver working. The node then talks to owserver over TCP. Use an inject node to specify the device you want to read from and trigger periodic reads.

I personally use this 1-wire adaptor with my Raspberry Pi:

But have also used a 'standard' DS9490R Usb host adaptor. I believe connecting directly GPIO is also possible but I have not tried it.

I have an update coming soon that allows you to read multiple devices at once and select them from the web UI.


Sent from my phone
--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Reed

unread,
Oct 16, 2014, 6:40:59 PM10/16/14
to node...@googlegroups.com
You could try openenergymonitor which I use to monitor internal and external temps using DS18B20's, and use MQTT to feed the data into node-red.
I'm using a Raspi too.

Paul

Martin Stiborský

unread,
Oct 18, 2014, 4:06:54 PM10/18/14
to node...@googlegroups.com
Hi guys,
here is my attempt for a node for the ds18b20 sensor: https://github.com/stibi/node-red-nodes/tree/master/hardware/ds18b20
It's no rocket science of course, just basic functionality, from where I can continue.
It was really easy, because the hardest part - how to read the sensor value - has been solved for me already, see this node.js module: https://www.npmjs.org/package/ds18b20



--
http://nodered.org
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/ZvoMb3d8gV8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
S pozdravem / Best regards
Martin Stiborský

Jabber: st...@njs.netlab.cz

Dave C-J

unread,
Oct 18, 2014, 4:29:37 PM10/18/14
to node...@googlegroups.com
Nice start.

Martin Stiborský

unread,
Dec 29, 2014, 7:16:03 PM12/29/14
to node...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages