Power::Outlet::Config - Control and query a Power::Outlet device from Configuration file
my $outlet = Power::Outlet::Config->new(section=>"My Section"); print $outlet->query, "\n"; print $outlet->on, "\n"; print $outlet->off, "\n";
Power::Outlet::Config is a package for controlling and querying Power::Outlet devices registered in an INI file.
Configuration
/etc/power-outliet.ini [My Tasmota] type=Tasmota host=light-hostname relay=POWER [My SonoffDiy] type=SonoffDiy host=switch=hostname
Script
use Power::Outlet::Config; my $outlet = Power::Outlet::Config->new(section=>"My Section"); print $outlet->on, "\n";
Command Line
/usr/bin/power-outlet Config ON section "My Tasmota" /usr/bin/power-outlet Config ON section "My Section" ini_file ./my.ini
my $outlet = Power::Outlet->new(type=>"Config", section=>"My Section"); my $outlet = Power::Outlet::Config->new(section=>"My Section");
Returns a Config::IniFiles for the power-outlet.ini file.
Default: /etc/power-outlet.ini or C:\Windows\power-outlet.ini
Default: power-outlet.ini
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
Copyright (c) 2020 Michael R. Davis
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.