How to get DS9490R adapter and DS18B20 sensors working (automated)

This how-to has multiple pages. This page is about automated configuration. Previous, manual configuration page with explanations is available here

This page is about configuring DS9490R adapter automatically e.g. doing all actions what were discussed on configuration page with script. Additionally, automated configuration will create some sudo rules, cron jobs etc.

First thing you need is to download few kilobytes of code:  wire_1.0.tar.gz

After that put the file to your Raspberry Pi (should work on PC also), unpack and run configuration as shown below. Don’t forget to connect DS9490R adapter.

tar -xzvf wire*.tar.gz
cd wire/
sudo ./configure.sh configure
reboot

Reboot is required to make sure all UDEV rules are loaded and working. You can reload udev rules also without reboot if you have skills. Currently this setup has no UDEV rule to unmount OWFS when adapter is disconnected. It’s tricky to do and not essential.
Test adapter and OWFS with command below, it should list temperatures of all DS18B20 sensors:

for f in `ls /wire/|grep 28.`; do echo -n "Sensor ${f} temperature is "; cat /wire/${f}/temperature; echo ; done

Scripts in this page were tested on:

  • Raspberry Pi Model B 512MB RAM. OS: Raspbian Wheezy, released in 2014-01-07. All updates installed on 1. september 2014.

Thats it about DS9490R and configuration. You should now be able to read information from all connected 1WIRE devices, not just DS18B20 sensors.

If you found this useful, say thanks, click on some banners or donate, I can always use some beer money.

Next topic will be about how to read sensor values, put them to database and aggregate.