The ordered weather sensors arrived so I ... / 2011-04-30

2011-04-30 The ordered weather sensors arrived so I ...
The ordered weather sensors arrived so I want to test them using w1retap. Time for rounds of configure / fix missing stuff. The resulting logging will be to postgres / rrdtool but I want to test with filebased logging first just to make sure the sensors work.

The configure script of w1retap insists on libxml2-dev and I don't see an easy way to disable this test. On the planned low-power, running from ramdisk weather station computer I won't allow for unused libraries, but for now the easy solution is just installing that library. Even ./configure --without-applet --disable-xml or ./configure --without-applet --disable-xml2 or other variants show:
checking for xml2-config... no
configure: error: missing program 'xml2-config'; is 'libxml2' or
'libxml2-devel' installed?
Fixed by installing libxml2-dev. The next thing it insists on is pkg-config and gmodule-2.0. The gmodule library is needed for dynamic loading of modules. This comes from ubuntu package libglib2.0-dev. The last bit is libusb-dev. Now I can build the package. First everything needs to run as root, but I fixed that later with
# chmod 666 /dev/bus/usb/001/002
Later improvement will be to find an udev rule which does this automatically for device:
Bus 001 Device 002: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1 Fob, 1-Wire adapter
With the humidity, temperature, solar sensor and the barometer I see:
# w1find DS2490-1
(1) 108FB1130208003E    18S20:high precision digital thermometer
(2) 26C1E0F1000000ED    2438:smart battery monitor
(3) 26BD60B50000002D    2438:smart battery monitor
(4) 81AF632F00000067    :Serial ID Button
With just the barometer:
# w1find DS2490-1
(1) 26BD60B50000002D    2438:smart battery monitor
(2) 81AF632F00000067    :Serial ID Button
The general config is by default in ~/.config/w1retap/rc, where I have:
init = w1file
log = w1file=/tmp/w1log
altitude = 2
device = DS2490-1
It took a bit of browsing in the documentation, but the first three sensors were easy to set up in ~/.config/w1retap/sensors:
# w1retap sensors
26BD60B50000002D:HB-BARO:Pressure:PRES:hPa::
108FB1130208003E:DS1820:Temperature:TEMP0:⁰C::
26C1E0F1000000ED:MS-TH:Humidity:HUMI:%::
And the results:
Pressure=986.59 hPa
Temperature=32.25 ⁰C
Humidity=29.06 %
udate=1304169061
date=2011-04-30T15:11:01+0200
It took a bit more to get the Solar sensor working. The DS2438 is used for both the humidity and the solar sensor according to the hobby-boards documentation for the Humidity / Temperature / Solar sensor. Browsing the samples suggests I should configure it as a DS2438 sensor with dual measurements, like
26C1E0F1000000ED:DS2438:Solar:Solar (Vsens):mV:VTMP:Temperature GHT2:⁰C::
And indeed I get a reading:
Solar=0.49 mV
VTMP=33.34 ⁰C
Switching the light in the shed back off makes the readout drop to 0, so I believe I am looking at the right value.

And now the logging works too, after waiting a bit:
2011-04-30T15:42:00+0200 Pressure 986.591492 hPa
2011-04-30T15:42:00+0200 Temperature 31.312500 ⁰C
2011-04-30T15:42:00+0200 Humidity 29.057188 %
2011-04-30T15:42:00+0200 Solar 0.000000 mV
2011-04-30T15:42:00+0200 VTMP 32.531250 ⁰C
2011-04-30T15:44:00+0200 Pressure 986.369263 hPa
2011-04-30T15:44:00+0200 Temperature 31.312500 ⁰C
2011-04-30T15:44:00+0200 Humidity 29.373028 %
2011-04-30T15:44:00+0200 Solar 0.000000 mV
2011-04-30T15:44:00+0200 VTMP 32.531250 ⁰C

Update 2011-05-01: Found the udev rule in the w1retap documentation:
root@metcalfe:/etc/udev/rules.d# cat 45-local-usb-special.rules 
#
SUBSYSTEMS=="usb", GOTO="usb_w1_start"
GOTO="usb_w1_end"
LABEL="usb_w1_start"
ATTRS{idVendor}=="04fa", ATTRS{idProduct}=="2490", GROUP="w1retap",
MODE="0666"
LABEL="usb_w1_end"

Tags: ,

IPv6 check

Running test...
, reachable as koos+website@idefix.net. PGP encrypted e-mail preferred. PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers

RSS
Meningen zijn die van mezelf, wat ik schrijf is beschermd door auteursrecht. Sommige publicaties bevatten een expliciete vermelding dat ze ongevraagd gedeeld mogen worden.
My opinions are my own, what I write is protected by copyrights. Some publications contain an explicit license statement which allows sharing without asking permission.
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews
This page generated by $Id: newsitem.cgi,v 1.57 2022/02/15 21:48:18 koos Exp $ in 0.006348 seconds.