Power::Outlet::Hue - Control and query a Philips Hue light
my $outlet=Power::Outlet::Hue->new(host => "mybridge", id=>1, username=>"myuser"); print $outlet->query, "\n"; print $outlet->on, "\n"; print $outlet->off, "\n";
Power::Outlet::Hue is a package for controlling and querying a light on a Philips Hue network attached bridge.
use Power::Outlet::Hue; my $lamp=Power::Outlet::Hue->new(host=>"mybridge", id=>1, username=>"myuser"); print $lamp->on, "\n";
my $outlet=Power::Outlet->new(type=>"Hue", host=>"mybridge", id=>1); my $outlet=Power::Outlet::Hue->new(host=>"mybridge", id=>1);
ID for the particular light as configured in the Philips Hue Bridge
Default: 1
Resource for the particular object as presented on the Philips Hue Bridge
Default: lights
Currently supported Resources from https://developers.meethue.com/documentation/core-concepts
lights - resource which contains all the light resources groups - resource which contains all the groups config - resource which contains all the configuration items schedules - which contains all the schedules scenes - which contains all the scenes sensors - which contains all the sensors rules - which contains all the rules
Sets and returns the hostname or IP address.
Default: mybridge
Sets and returns the port number.
Default: 80
Sets and returns the username used for authentication with the Hue Bridge
Default: newdeveloper (Hue Emulator default)
Returns the configured friendly name for the device
Sends an HTTP message to the device to query the current state
Sends a message to the device to Turn Power ON
Sends a message to the device to Turn Power OFF
Queries the device for the current status and then requests the opposite.
Sends messages to the device to Cycle Power (ON-OFF-ON or OFF-ON-OFF).
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
Thanks to Mathias Neerup manee12 at student.sdu.dk - https://rt.cpan.org/Ticket/Display.html?id=123965
Copyright (c) 2018 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.
http://www.developers.meethue.com/philips-hue-api, http://steveyo.github.io/Hue-Emulator/, https://home-assistant.io/components/emulated_hue/
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.