WattsUp-Daemon - Watt's Up Monitoring Daemon
Watt's Up Daemon is a simple Perl daemon to poll and log data from the Watt's Up meters. It was written with v4.42 of the specification, and a meter claiming HW v5.2, FW 4.55.200706090000.
Beyond the configuration data, the daemon does not do any special handling of the data at all.
At startup, it captures the version string, data headers, and calibration string, then enables all data fields, and starts external logging mode.
Entries are logged using a microsecond-accurate TAI64N timestamp, taken when the last byte of a packet is recieved. It would be better to take the timestamp when the first byte is recieved, but this complicates the input handling routines that block for the ';' seperator.
Edit the configuration in this file, and then run it at least once at with DEBUG set to 1, to ensure that it works for you.
You will need the following Perl modules to use this package: Device::SerialPort Time::TAI64 Time::HiRes They are available from CPAN, or your system package manager.
Robin H. Johnson, <email@example.com>
Copyright 2007, Robin H. Johnson
You can use and redistribute WattsUpDaemon under the same terms as Perl itself.