On Mon, May 7, 2007 21:29, Paul Alfille said:
> As far as I know, there have been no changes to ow.pm for quite a while.
>
> Tell us a little more for about your setup.

OK. Well, I have a bunch of devices on the serial dongle on the local
machine, and 2 1820 temp sensors on another machine on a serial dongle.
Both machines are running owserver on port 4304. I read the sensor values
out of the MySQL database. The data looks like:
(1, 'temperature', '10.B82347000800', 'Outdoor Temperature', 1, 0,
'bus.0', '127.0.0.1:4304 -F'),
(2, 'temperature', '10.6F3355000800', 'Attic', 1, 0, 'bus.0',
'127.0.0.1:4304 -F'),
(13, 'solar', '26.885922000000', 'Solar', 1, 0, 'bus.0', '10.0.0.32:4304'),
(11, 'temperature', '10.A27555000800', 'garage', 1, 0, 'bus.0',
'10.0.0.32:4304 -F --timeout_network 30'),
(12, 'temperature', '10.E11D49000800', 'solar heater', 1, 0, 'bus.0',
'10.0.0.32:4304 -F --timeout_server 30 '),
(3, 'wind_speed', '1D.C29801000000', 'Wind Speed', 1, 0, 'bus.0',
'127.0.0.1:4304'),
(4, 'wind_direction', '20.8FF100000000', 'Wind Direction', 1, 0, 'bus.0',
'127.0.0.1:4304'),
(14, 'aag_barometer', '12.02F331000000', 'Barometer', 1.001, 0, 'bus.0',
'127.0.0.1:4304 --timeout_network 20'),
(5, 'rain', '1D.F02005000000', 'Rain Gauge', 0.02, 0, 'bus.0',
'127.0.0.1:4304'),
(6, 'temp_humidity', '26.212215000000', 'Outdoor Humidity', 1, 0, 'bus.0',
'127.0.0.1:4304'),
(7, 'temperature', '10.845A55000800', 'Basement Temperature', 1, 0,
'bus.0', '127.0.0.1:4304 -F'),
(8, 'temperature', '10.E94709000800', 'Station Temp', 1, 0, 'bus.0',
'127.0.0.1:4304 -F'),
(9, 'lightning', '1D.CF3B05000000', 'Lightning', 1, 0, 'bus.0',
'127.0.0.1:4304'),
(10, 'temperature', '10.A65655000800', 'Front Bedroom', 1, 0, 'bus.0',
'127.0.0.1:4304 -F');


The last column is the address and any other parameters that would be passed.

To check if each device in the database is actually there, I run the code
(truncated)

while(my($sensorid,$sensortype,$serialnum,$name,$calibmult,$calibadd,$bus,$addr
ess)=$sth->fetchrow_array)
      {
        #Check to see if we really have the device, or if it's just in the DB
        if (OWNet::present("$address","/$serialnum"))
          {
            $sensors{$serialnum}->{sensorid}=$sensorid;
            $sensors{$serialnum}->{sensortype}=$sensortype;
            $sensors{$serialnum}->{name}=$name;
            $sensors{$serialnum}->{calibmult}=$calibmult;
            $sensors{$serialnum}->{calibadd}=$calibadd;
            $sensors{$serialnum}->{bus}=$bus;
            $sensors{$serialnum}->{address}=$address;
            logit('info',"Using $sensortype - $sensorid : $serialnum");
          }

This works with the CVS from Feb 16, but not the current.

Tim

--
Tim Sailer
Coastal Internet, Inc.
www.buoy.com
631-399-2910


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to