NAME

Device::Osram::Lightify::Hub - Communicate with an Osram Lightify Hub

DESCRIPTION

This module allows basic operation of the Osram lightify bulbs, via connections to the Osram hub.

SYNOPSIS

use Device::Osram::Lightify;

my $tmp = Device::Osram::Lightify::Hub->new( host => "1.2.3.4" );

# Turn all devices on
$tmp->all_on();

# Turn all devices off
$tmp->all_of();

DESCRIPTION

This module is work-in-progress and currently allows only global/broadcast actions to be carried out, along with the discovery of nodes.

In the future it will be possible to control the nodes we've discovered dynamically.

METHODS

new

Create a new hub-object, it is mandatory to provide a host parameter which will give the IP (and optional port) of the Osram hub.

all_on

Switch all known nodes on.

all_off

Switch all known nodes off.

lights

Return a new Osram::Lightify::Light object for each of the lights that could be discovered.

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.