Device::Osram::Lightify::Light - The interface to a single light
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.
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; }
This module allows basic control of an Osram Lightify light.
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.
Hub:lights()
Get the brightness value of this light (0-100).
Get the MAC address of this light.
Return the name of this light.
Return the current RGBW value of this light.
Is the light on or off ?
on
off
Get the temperature value of this light (2200-6500).
Get the firmware version of this light.
Set this light to be "on".
Set this light to be "off".
Set the brightness value of this light - valid values are 0-100.
Set the specified RGBW values of this light.
Set the specified temperature value for this light, in the range 2200-6500.
Convert the record to a string, suitable for printing.
Steve Kemp <steve@steve.org.uk>
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.
To install Device::Osram::Lightify, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::Osram::Lightify
CPAN shell
perl -MCPAN -e shell install Device::Osram::Lightify
For more information on module installation, please visit the detailed CPAN module installation guide.