AHA::Switch - Object representing an AHA managed switch/actor
# Parent object for doing the HTTP communication my $aha = new AHA("fritz.box","s!cr!t"); # Switch represented by the $ain which can be a name or a real AIN my $switch = new AHA::Switch($aha,$ain) # Obtain all switches from a list operation for my $switch (@{$aha->list()}) { say $switch->name(),": ",$switch->is_on(); }
This module represents an actor/switch for the AVM home automation system. It encapsulated an actor with a certain AIN and provides all methods as described in "AHA" with the difference, that not AIN is required, since this has been already provided during the construction of this object.
Create a new switch object. The first object must be an "AHA" instance, which is responsible for the HTTP communication. The second argument Many must be an 8-digit AIN (actor id) or a symbolic name. This symbolic name can be configured in the admin UI of the Fritz Box.
Get the AIN which this object represents.
Same as the corresponding method in "AHA" with the exception, that no $ain argument is required since it already has been given during construction time
$ain
To install AHA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AHA
CPAN shell
perl -MCPAN -e shell install AHA
For more information on module installation, please visit the detailed CPAN module installation guide.