NAME
Power::Outlet::iBootBar - Control and query a Dataprobe iBootBar power outlet
SYNOPSIS
my $outlet=Power::Outlet::iBootBar->new(
host => "mybar",
outlet => 1,
community => "private",
);
print $outlet->query, "\n";
print $outlet->on, "\n";
print $outlet->off, "\n";
DESCRIPTION
Power::Outlet::iBootBar is a package for controlling and querying an outlet on a Dataprobe iBootBar network attached power outlet.
USAGE
use Power::Outlet::iBootBar;
use DateTime;
my $lamp=Power::Outlet::iBootBar->new(host=>"mybar", outlet=>1);
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=>"iBootBar", "host=>"mylamp");
my $outlet=Power::Outlet::iBootBar->new(host=>"mylamp");
PROPERTIES
host
Sets and returns the hostname or IP address.
Manufacturer Default: 192.168.0.254
Note: Set IP address via telnet User Name: admin, Password: admin then "help network"
set ipmode dhcp
OR
set ipmode static
set ipaddress 192.168.0.254
set subnet 255.255.255.0
set gateway 192.168.0.1
community
Sets and returns the SNMP community.
my $community=$outlet->community("private"); #read/write
my $community=$outlet->community("public"); #read only features
Note: Set SNMP community via telnet User Name: admin, Password: admin then "help snmp"
set snmp writecommunity private
set snmp readcommunity public
set snmp 1 enable yes
outlet
Sets and returns the outlet number as labeled on the back of the device.
Default: 1
name
Returns the name from the iBootBar outletName via SNMP
$ telnet iBootBar
iBootBar Rev 1.5d.275
User Name: admin
Password: *****
iBootBar > help outlet
...
set outlet <1-8> name <name>
...
iBootBar > set outlet 1 name "Bar 1"
METHODS
query
Sends a TCP/IP message to the iBootBar 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.