The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Power::Outlet::iBoot - Control and query a Dataprobe iBoot power outlet

SYNOPSIS

  my $outlet=Power::Outlet::iBoot->new(
                                       host => "mylamp",
                                       port => 80,        #sane default from manufacture spec
                                       auth => "PASS",    #sane default from manufacture spec
                                      );
  print $outlet->query, "\n";
  print $outlet->on, "\n";
  print $outlet->off, "\n";

DESCRIPTION

Power::Outlet::iBoot is a package for controlling and querying a Dataprobe iBoot network attached power outlet.

iBoot Protocol: The iBoot uses the TCP (Transport Communication Protocol) to communicate with the client system. To communicate with iBoot, establish a TCP connection using the Port as assigned in iBoot Setup. Once connected use the Send() function to send the commands to the iBoot and the Recv() function to receive the response. After sending a response iBoot will close the connection. The following outlines the commands and their responses.

Source: http://dataprobe.com/files/power/iboot_tcp.pdf

USAGE

  use Power::Outlet::iBoot;
  use DateTime;
  my $lamp=Power::Outlet::iBoot->new(host=>"lamp");
  my $hour=DateTime->now->hour;
  my $night=$hour > 20 ? 1 : $hour < 06 ? 1 : 0;
  if ($night) {
    print $lamp->on, "\n";
  } else {
    print $lamp->off, "\n";
  }

CONSTRUCTOR

new

  my $outlet=Power::Outlet->new(type=>"iBoot", "host=>"mylamp");
  my $outlet=Power::Outlet::iBoot->new(host=>"mylamp");

PROPERTIES

host

Sets and returns the hostname or IP address.

Manufacturer Default: 192.168.1.254

port

Sets and returns the TCP port

Manufacturer Default: 80

pass

Sets and returns the case sensitive password

Manufacturer Default: PASS

name

METHODS

query

Sends a TCP/IP message to the iBoot device to query the current state

on

Sends a TCP/IP message to the iBoot device to Turn Power ON

off

Sends a TCP/IP message to the iBoot device to Turn Power OFF

switch

Queries the device for the current status and then requests the opposite.

cycle

Sends a TCP/IP message to the iBoot device to Cycle Power (ON-OFF-ON or OFF-ON-OFF). Cycle time is determined by Setup.

Manufacturer Default Cycle Period: 10 seconds

BUGS

Please log on RT and send an email to the author.

SUPPORT

DavisNetworks.com supports all Perl applications including this package.

AUTHOR

  Michael R. Davis
  CPAN ID: MRDVT
  DavisNetworks.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