Power::Outlet::iBootBar - Control and query a Dataprobe iBootBar power outlet
my $outlet=Power::Outlet::iBootBar->new( host => "mybar", outlet => 1, community => "private", ); print $outlet->query, "\n"; print $outlet->on, "\n"; print $outlet->off, "\n";
Power::Outlet::iBootBar is a package for controlling and querying an outlet on a Dataprobe iBootBar network attached power outlet.
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"; }
my $outlet=Power::Outlet->new(type=>"iBootBar", "host=>"mylamp"); my $outlet=Power::Outlet::iBootBar->new(host=>"mylamp");
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
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
Sets and returns the outlet number as labeled on the back of the device.
Default: 1
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"
Sends a TCP/IP message to the iBootBar device to query the current state
Sends a TCP/IP message to the iBoot device to Turn Power ON
Sends a TCP/IP message to the iBoot device to Turn Power OFF
Queries the device for the current status and then requests the opposite.
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
Please log on RT and send an email to the author.
DavisNetworks.com supports all Perl applications including this package.
Michael R. Davis CPAN ID: MRDVT DavisNetworks.com
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.
To install Power::Outlet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Power::Outlet
CPAN shell
perl -MCPAN -e shell install Power::Outlet
For more information on module installation, please visit the detailed CPAN module installation guide.