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
Note: default = 1
host
Sets and returns the hostname or IP address.
Note: Set IP address via DHCP static mapping
Default: mybridge
port
Sets and returns the port number.
Default: 80
username
Default: newdeveloper (Hue Emulator default)
name
Returns the configured FriendlyName from the Hue device
METHODS
query
Sends an HTTP message to the Hue device to query the current state
on
Sends a UPnP message to the Hue device to Turn Power ON
off
Sends a UPnP message to the Hue device to Turn Power OFF
switch
Queries the device for the current status and then requests the opposite.
cycle
Sends messages to the Hue 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.
Portions of the Hue Implementation Copyright (c) 2013 Eric Blue
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
WebService::Belkin::Wemo::Device, https://gist.github.com/jscrane/7257511