1-wire => stdout?

Hi,

The Meteohub data logger is in the process of adding a new feature to allow 'plug-in' extensions. Here's an extract from the manual describing the currently experimental feature

start extract
The generic Plug-in weather station allows to connect Meteohub to an alien weather data logging program. When Meteohub starts data logging, the specified program gets started as well and Meteohub listens to stdout of the alien logger program. When the logger has reported a line of data (terminated by a LF and/or CR character) this line of data is given a Meteohub time stamp and is included into Meteohub's raw data file ("/data/weather/YYYYMM/raw"). The format of the data has to be compatible to Meteohub's raw data format (Appendix C). Example: When the alien program returns "th17 209 52 0110" Meteohub adds a line "20090131120034 th17 209 52 0110" to the raw data, which means: Sensor th17 has reported 20.9 °C, 53% relative humidity and a dew point of 11.0°C at 12:00:34 31th Jan 2009.
end extract


Meteohub runs on the NSLU2 (SlugOS/BE 4.8) and on a variety of x86 platforms (debian etch-n-a-half). I'm using an ALIX 1D miniITX computer.

In terms of coding abilities, I'm familiar with C++ on the Windows platform (nowadays I use Qt from Trolltech, I started out with FORTRAN on mainframes...). I have little Linux experience (but not none at all). I have been know to write a little, very poor, Perl. I don't have a lot of spare time for the project...

Any thoughts on how to approach implementing such a 'plug-in'?
 
Googling around a bit I think that owperl might be part of a basic solution, but I'm not clear if it requires FUSE or not? I think not?

SSH'ing into the Meteohub, I know that gcc is already in there, and libusb, but autoconf doesn't seem to be part of the standard install, so (with my level of Linux experience) I can't just follow the standard OWFS install procedure.
 
On what distro is Meteohub based? If it's Debian based then a simple apt-get install autoconf should suffice. HTH --Hans

Googling around a bit I think that owperl might be part of a basic solution, but I'm not clear if it requires FUSE or not? I think not?

SSH'ing into the Meteohub, I know that gcc is already in there, and libusb, but autoconf doesn't seem to be part of the standard install, so (with my level of Linux experience) I can't just follow the standard OWFS install procedure.
 
On what distro is Meteohub based? If it's Debian based then a simple apt-get install autoconf should suffice.
Thanks Hans.
I believe it's a recent etchnhalf Net Install plus some extra packages.
I'll give your suggestion a go next chance I get. :)
 
I know my way around Debian based distro's even though I'm not a programmer. If you need more help send me a PM via coccontech or weather-watch. --Hans

On what distro is Meteohub based? If it's Debian based then a simple apt-get install autoconf should suffice.
Thanks Hans.
I believe it's a recent etchnhalf Net Install plus some extra packages.
I'll give your suggestion a go next chance I get. :)
 
I had a look at integrating 1-Wire sensors with meteohub a couple of months back. My concept was basically as outlined in the start of this thread. In the end I did it differently, but I did learn a few things along the way. I installed the meteohub evaluation package on a baby diskless PC. It is Debian etch-and-a-half with a bunch of customisation to suit the meteohub appl. I wantd to use owserver (part of OWFS) to scan the 1-Wire devices. To get owserver running I needed to install a few deb packages (apt-get ....) as prereqs. They were:

autoconf automake autotools-dev m4 libtool libusb-dev fuse-utils libfuse-dev swig python2.4-dev tcl8.4-dev

(actually, I can't remember why I installed python and tcl ? chances are they are not needed).

There is no deb for OWFS, you have to compile it yourself. There are pretty good instructions on its home site. or I can probably send you what I did if needed. The PERL module comes with OWFS. Once installed there is a bit of customisation to do, and then you need a script to scan the bus and format the data. I pinched a few ideas from the scripts in OWFSWS, but this was a bit heavy duty for my hardware, it logs into MYSQL. My intent was just to pump the data into a file suitable for meteohub (which is where this all started out!) But in the end I grew the project a bit more and pumped the data into RRDTool instead. Then wrote a couple of CGI scripts to graph it. Bottom line tho ... I found the debian packaged in with meteohub was a really nice compact self contained base to start from on my minimalist hardware. I ended up deleting the meteohub applictions completely, and replaced with OWFS and my own logging script. Not quite what this thread is trying to do, but I can confirm that owserver and perl are a fine combination to generate the log data.

In case anyone is curious, here's the end result ... www.daveysbayweather.com
 
There are pretty good instructions on its home site. or I can probably send you what I did if needed.
The home site instructions seem to have a few little "gotcha's" that wouldn't bother an experienced user, but have had me running to HansF for help (for which I am very grateful). I'm making progress, but not there yet. If you have notes handy and it would not be any trouble I'm sure they would be useful.
I can be e-mailed via the Contact Us link in the footer at the bottom of www.isleofskyeweather.org.uk/24elgol/

But in the end I grew the project a bit more and pumped the data into RRDTool instead. Then wrote a couple of CGI scripts to graph it.
I'm more tied to Meteohub, because I'm already using it to collect data from a range of OS sensors. I'm looking to use the new plug-in feature to "blend" 1-wire sensor data in with the existing OS stuff.
 
With help from HansF and Geoff (thank you both) I now have OWFS installed on my ALIX 1D based Meteohub and it is successfully communicating with the USB attached 1-wire sensors.

Now to start thinking about a small application to poll the sensors and report back to Meteohub... :)
 
Back
Top