NAME
Device::Osram::Lightify::Light - The interface to a single light
DESCRIPTION
This module allows a single Osram lightify light to be manipulated.
Objects are not expected to be constructed manually, instead they are discovered dynmically via communication with the hub.
SYNOPSIS
use Device::Osram::Lightify;
my $tmp = Device::Osram::Lightify::Hub->new( host => "1.2.3.4" );
# Show all nodes we found
# (Stringification means we dump all the state here.)
foreach my $light ( $tmp->lights() ) {
print $light;
}
DESCRIPTION
This module allows basic control of an Osram Lightify light.
METHODS
new
Create a new light-object.
This is invoked by Hub:lights()
method, which will read a binary string containing all the details of the light - we must then parse it according to Device::Osram::Lightify::API.
brightness
Get the brightness value of this light (0-100).
mac
Get the MAC address of this light.
name
Return the name of this light.
rgbw
Return the current RGBW value of this light.
status
Is the light on
or off
?
temperature
Get the temperature value of this light (2200-6500).
version
Get the firmware version of this light.
set_on
Set this light to be "on".
set_off
Set this light to be "off".
set_brightness
Set the brightness value of this light - valid values are 0-100.
set_rgbw
Set the specified RGBW values of this light.
set_temperature
Set the specified temperature value for this light, in the range 2200-6500.
stringify
Convert the record to a string, suitable for printing.
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.