AHA
view release on metacpan or search on metacpan
=head1 NAME
AHA - Simple access to the AHA interface for AVM based home automation
=head1 SYNOPSIS
my $aha = new AHA({host: "fritz.box", password: "s!cr!t"});
# Get all switches as array ref of AHA::Switch objects
my $switches = $aha->list();
# For all switches found
for my $switch (@$switches) {
say "Name: ",$switch->name();
say "State: ",$switch->is_on();
say "Present: ",$switch->is_present();
say "Energy: ",$switch->energy();
say "Power: ",$switch->power();
# If switch is on, switch if off and vice versa
$switch->is_on() ? $switch->off() : $switch->on();
}
# Access switch directly via name as configured
$aha->energy("Lava lamp");
# ... or by AIN
$aha->energy("087610077197");
# Logout
$aha->logout();
=head1 DESCRIPTION
This module allows programatic access to AVM's Home Automation (AHA) system as
it is specified in L<AVM AHA HTTP Protocol
specification|http://www.avm.de/de/Extern/files/session_id/AHA-HTTP-Interface.pdf>.
Please note that this module is not connected to AVM in any way. It's a hobby
project, without any warranty and no guaranteed support.
Typical it is used to manage and monitor L<AHA::Switch>es. The following
operations are supported:
=over 4
=item *
Switching on and off a certain actor (switch)
=item *
Get the current state of an actor
=item *
Get the current power consumption and consumed energy of an actor (if
it is a plug like the Dect!200)
=back
=head1 METHODS
Many methods of this class take an 8-digit AIN (actor id) or a symbolic name as
argument. This symbolic name can be configured in the admin UI of the Fritz
Box.
If the argument (name or AIN) is not known, an error is raised (die). The same
is true, if authorization fails.
=over
=cut
package AHA;
use strict;
use LWP::UserAgent;
( run in 1.852 second using v1.01-cache-2.11-cpan-13bb782fe5a )