NAME
Device::WH1091 - Access data from the WH1081/1091 weather station.
SYNOPSIS
use Device::WH1091;
my $weather=Device::WH1091->new();
$weather->getdata();
my $tindoor = $weather->{tindoor}; # Indoor Temp
my $toutdoor = $weather->{toutdoor}; # Outdoor Temp
my $hindoor = $weather->{hindoor}; # Indoor Humidity
$houtdoor = $weather->{houtdoor}; # OutDoor Humidity
$windspeed = $weather->{windspeed}; # WindSpeed (m/s)
$windgust = $weather->{windgust}; # Wind Gust (m/s)
$winddir = $weather->{winddir}; # Wind Direction Degrees
$winddirtext = $weather->{winddirtext}; # Wind Direction Text
$pressure = $weather->{pressure}; # Air Pressure
$raintot = $weather->{raintot}; # Total Rain
DESCRIPTION
Provides an interface to the WH1081/WH1091 weather stations (and others based on the same hardware).
Requires libusb to be installed so essentially limited at this stage to Linux/Unix platforms that have libusb. Currently, the usb code is inlined C, however this will bechanging to Perl USB at some stage so that this platform dependency is removed.
USAGE
Instatiate an instance by call WH1091->new();
Whenever you want data, call getdata() and the object variables mention in the SYNOPSIS will be populated. When you want more data, call getdata() again.
Be aware that the usb weather station only gets wireless updates from the weather head every 30 seconds, so polling more often than that would be pointless.
BUGS
I am still not 100% confident with the rain data. Your mileage may vary.
I have had this running a continuous loop getting data on an NSLU2 with openwrt for over three months now.
AUTHOR
David Peters
CPAN ID: DAVIDP
davidp@electronf.com
http://www.electronf.com
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
perl(1).