Jump to content

Using NodeLink with 1wire and DS18B20 probes


blueman2

Recommended Posts

Posted

I am doing a first time setup of NodeLink on a Raspberry Pi.  I need a bit of help making sure I am understanding the guide correctly for 1-Wire setup.  Per the Raspbian Setup Guide, for the /etc/owfs.conf file, I commented out the "fake" line and then added the noted line, but was not sure if everything below that should also be entered.  Right now, I added ALL of this into the config file (I have pasted on the relevant area of the file):

#server: FAKE = DS18S20,DS2405
server: w1 = all
#
######################### OWFS ##########################
#
mountpoint = /mnt/1wire
allow_other
#

NOTE: above edited per io_guy's reply post

NOTE: above also edited with correct 'server: w1 = all' to make this work without i2c adapter.  I have 5 DS18B20 temperature probes connected directly to GPIO4 (pin 7) and it works great!

 

 

 

Posted

Thanks, @io_guy!!  Based on further reading, I sort of figured that. 

BTW, thanks so much for the software you created.  Very Cool!  I was going to use several 1 wire DHT22's to monitor several cooling units via a Raspberry Pi.  I see that it is possible to connect these directly to the GPIO pins of a RPi3, which avoids the need for an I2C converter.  Do you know if anyone has done that and, if so, what changes I need to make for OWFS to see the GPIO input?  

Posted

No idea, you'd need to search the OWFS/Pi forums for that.  Basically if OWFS sees it, NodeLink will see it.

I'd still go the I2C route though.  It uses a hardware 1wire chip which has much better performance/reliability than bit-banging GPIO.

Posted

I was able to get a set of 5 DS18B20's working great with OWFS and the NodeLink 1wire node using bit-banging technique.  I found the entry for the owfs.conf was "server: w1 = all".  I enabled 1Wire in the raspi-config menu, and it all worked fine!  I have all 5 of the DS18B20s working on a single GPIO 4 (Pin 7) with the 4K7 pull-up resistor.   They all show up on NodeLink and on my ISY.  VERY cool!!!  

I was also able to get the DHT11 and DHT22 temp/humidity probes to work with the Pi, but could not get them to be recognized by OWFS, so punted on those and went with the DS18B20s instead.

Thanks, @io_guy for this great piece of software!

 

Posted
19 minutes ago, blueman2 said:

I was able to get a set of 5 DS18B20's working great with OWFS and the NodeLink 1wire node using bit-banging technique.  I found the entry for the owfs.conf was "server: w1 = all".  I enabled 1Wire in the raspi-config menu, and it all worked fine!  I have all 5 of the DS18B20s working on a single GPIO 4 (Pin 7) with the 4K7 pull-up resistor.   They all show up on NodeLink and on my ISY.  VERY cool!!!  

Thanks, @io_guy for this great piece of software!

 

I had a lot of trouble with the WC8 bit-banging port. In the end I have determined it wasn't the software but rather the port output would switch way too fast with too low an impedance (high slew rate) that I would get massive reflections off the end of the transmission line. Absorbing the standing wave at the far end didn't work because it would kill the sensors before making a positive effect. An RC network on the WC8 end would have probably down it but I had suffered through so many weeks of trial I gave up and now don't need it. Also, a separate input that bypass the slew rate RC would probably need to be implemented. The firmware didn't allow that.
I believe the WC8 guy has this working well now. Hardware revisions? I don't know.

Many early CPU boards talked using bit banging ports quite successfully but the few hardware support components need to be there also. As io_guy posted, a hardware 1-Wire i/f is a usually a much better solution for the more "lay" people without all the fuss.

Posted

@io_guy and @larryllix,

After running for 2 days and logging all the temperature data from the 5 probes, I can say it seems to be running perfectly for me, even using bit banging on the GPIO4 pin.  My total run is rather short.  About 3 meters from the Raspberry Pi to the 'hub' connection, then 1 meter lengths from there to the 5 probes.  I have 2 refrigerators I wanted to monitor (1 for each freezer and 1 for each fridge section) and one for ambient.  I think the short run and keeping to only 5 probes allows me to run successfully.  And with 1Wire enabled in the Raspberry Pi configuration, and the "server: w1 = all" line in the owfs.conf file, the data is passing along to nodelink and my ISY just fine.  I still plan to get a USB to 1wire adaptor anyway, but for just $10 for the 5 DS18B20s from Amazon, and a spare Pi I had laying around, I have a great monitoring system for my refrigerators!

Thanks both of you for your help!

Posted
20 minutes ago, blueman2 said:

@io_guy and @larryllix,

After running for 2 days and logging all the temperature data from the 5 probes, I can say it seems to be running perfectly for me, even using bit banging on the GPIO4 pin.  My total run is rather short.  About 3 meters from the Raspberry Pi to the 'hub' connection, then 1 meter lengths from there to the 5 probes.  I have 2 refrigerators I wanted to monitor (1 for each freezer and 1 for each fridge section) and one for ambient.  I think the short run and keeping to only 5 probes allows me to run successfully.  And with 1Wire enabled in the Raspberry Pi configuration, and the "server: w1 = all" line in the owfs.conf file, the data is passing along to nodelink and my ISY just fine.  I still plan to get a USB to 1wire adaptor anyway, but for just $10 for the 5 DS18B20s from Amazon, and a spare Pi I had laying around, I have a great monitoring system for my refrigerators!

Thanks both of you for your help!

Links and details  would be nice at some point.

I am thinking of recouping my old RPi1 for monitoring my hydronic heating system later this year. This would be a good project to make use of it.

Posted
On 6/27/2018 at 8:58 PM, blueman2 said:

I was able to get a set of 5 DS18B20's working great with OWFS and the NodeLink 1wire node using bit-banging technique.  I found the entry for the owfs.conf was "server: w1 = all".  I enabled 1Wire in the raspi-config menu, and it all worked fine!  I have all 5 of the DS18B20s working on a single GPIO 4 (Pin 7) with the 4K7 pull-up resistor.   They all show up on NodeLink and on my ISY.  VERY cool!!!  

I was also able to get the DHT11 and DHT22 temp/humidity probes to work with the Pi, but could not get them to be recognized by OWFS, so punted on those and went with the DS18B20s instead.

Thanks, @io_guy for this great piece of software!

 

Ah, you won't have issues with that small network.  Mine is 12 sensors each 30-75' in a star topography.  

  • 4 months later...
Posted

@io_guy I have been trying to setup 1wire temp sensors.  I can read the temps on them locally but cannot figure out how to setup the 1wire node server.  I also don't think I have OWFS working correctly and can't seem to figure out how to get that working after reading and doing several different methods.  Any help you can give would be great.

Posted

@io_guy I found and copied a python program on my pi that tells me the temps of 2 sensors I have connected in parrallel.  I run this at the pi's command prompt.  Beyond that I am stuck on trying to get anything that will take that to ISY.

For hardware I have connect 2 x 1wire waterproof temp sensors to a breadboard which ultimately connects them to the GPIO 1wire pin.

I have tried multiple guides on setting up OWFS but none of them seem to work, most of them seem to have steps I my pi will not complete not sure if it is due to old guides.

Posted

@dinostop I just got this stuff going yesterday, so I may be able to help you.

If you can see the temperature sensors, (see steps 2 and 3 here: https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/temperature/ to verify that) then the hardware is probably set up fine.

The next thing you need to do is enable OWFS in raspi-config.

Then you probably want to: sudo apt-get install owfs

to make sure it's all there.

Edit the /etc/owfs.conf file as listed above and reboot the pi.

At that point, you probably can go into the web interface of OWFS and see your temperatures. (By default the http server is on port 2121 see /etc/owfs.conf)

At this point, everything was working for me except owfs was not showing up at /mnt/1wire

It turns out that the default install enables the web and ftp interfaces, but not the fs part.  Manually running /usr/bin/owfs would bring that to life.

After that, you need to add a script to init.d which starts /usr/bin/owfs at boot time and all should work.

I have a script called "startowfs.sh" in /etc/init.d with the following contents:

#!/bin/sh

### BEGIN INIT INFO
# Provides:          owfs
# Required-Start:    $remote_fs $network $syslog $named
# Required-Stop:     $remote_fs $network $syslog $named
# Should-Start:      owfs
# Should-Stop:       owfs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: 1-wire file system
# Description:       Start and stop an anonymous FTP server for 1-wire control.
### END INIT INFO
/usr/bin/owfs

exit 0

then you need to: update-rc.d startowfs.sh defaults

to make it part of the init sequence.

Now, owfs should auto-mount at /mnt/1wire on each reboot.

Once that is working, the items will show up in nodelink, and from there you export them to isy.  The only thing you need to do in the ISY admin panel is rename the temperature sensors from their hex values to friendly names and start using them in programs.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...