NAME
Power::Outlet::Hue - Control and query a Philips Hue light
SYNOPSIS
my $outlet=Power::Outlet::Hue->new(host => "mybridge", id=>1, username=>"myuser");
print $outlet->query, "\n";
print $outlet->on, "\n";
print $outlet->off, "\n";
DESCRIPTION
Power::Outlet::Hue is a package for controlling and querying a light on a Philips Hue network attached bridge.
USAGE
use Power::Outlet::Hue;
my $lamp=Power::Outlet::Hue->new(host=>"mybridge", id=>1, username=>"myuser");
print $lamp->on, "\n";
CONSTRUCTOR
new
my $outlet=Power::Outlet->new(type=>"Hue", host=>"mybridge", id=>1);
my $outlet=Power::Outlet::Hue->new(host=>"mybridge", id=>1);
PROPERTIES
id
ID for the particular light as configured in the Philips Hue Bridge
Default: 1
host
Sets and returns the hostname or IP address.
Default: mybridge
port
Sets and returns the port number.
Default: 80
username
Sets and returns the username used for authentication with the Hue Bridge
Default: newdeveloper (Hue Emulator default)
name
Returns the configured friendly name for the device
METHODS
query
Sends an HTTP message to the device to query the current state
on
Sends a message to the device to Turn Power ON
off
Sends a message to the device to Turn Power OFF
switch
Queries the device for the current status and then requests the opposite.
cycle
Sends messages to the device to Cycle Power (ON-OFF-ON or OFF-ON-OFF).
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
Copyright (c) 2013 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.
SEE ALSO
http://www.developers.meethue.com/philips-hue-api, http://steveyo.github.io/Hue-Emulator/