NAME
Power::Outlet::Osram - Control and query an Osram Lightify light
SYNOPSIS
my $outlet=Power::Outlet::Osram->new(host => "192.168.1.10", name=>"hall");
print $outlet->query, "\n";
print $outlet->on, "\n";
print $outlet->off, "\n";
DESCRIPTION
Power::Outlet::Osram is a package for controlling and querying a light on an Osram Lightify network attached bridge.
USAGE
use Power::Outlet::Osram;
my $lamp=Power::Outlet::Hue->new(host=>"mybridge", name=>"hall");
print $lamp->on, "\n";
CONSTRUCTOR
new
my $outlet=Power::Outlet->new(type=>"Osram", host=>"192.168.10.136", name => "Hall" );
my $outlet=Power::Outlet::Osram->new(host=>"mybridge", name="kitchen");
PROPERTIES
name
Name for the particular light as configured on the Osram Lightify bridge.
METHODS
query
Return the current state of the specified device, as a string.
on
Sends a message to the device to Turn Power ON
off
Sends a message to the device to Turn Power OFF
_call
Implementation method to send an on/off message to the given device.
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).
AUTHOR
Steve Kemp <steve@steve.org.uk>
COPYRIGHT AND LICENSE
Copyright (C) 2016 Steve Kemp <steve@steve.org.uk>.
This library is free software. You can modify and or distribute it under the same terms as Perl itself.