- COPYRIGHT AND LICENSE
Device::Osram::Lightify::Hub - Communicate with an Osram Lightify Hub
This module allows basic operation of the Osram lightify bulbs, via connections to the Osram hub.
use Device::Osram::Lightify; my $tmp = Device::Osram::Lightify::Hub->new( host => "184.108.40.206" ); # Turn all devices on $tmp->all_on(); # Turn all devices off $tmp->all_of();
This module will connect to an Osram Lightify hub, allowing the control of lights via Perl.
The communication with the hub is carried out by sending/receiving binary messages to the hub on port 4000. The specific bytes set have been documented in the Osram::Lightify::API module.
This module is responsible for:
- Identifying lights:
We can initiate a discovery of all the available lights, and create a suitable Osram::Lightify::Light object for each discovered light.
- Sending broadcast events:
We can send a broadcast event, which applies to all known lights, to instruct them to go on or off.
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.
Broadcast an "on" event to all lights.
Broadcast an "off" event to all lights.
Return a new
Osram::Lightify::Light object for each of the lights that could be discovered.
Steve Kemp <firstname.lastname@example.org>
Copyright (C) 2016 Steve Kemp <email@example.com>.
This library is free software. You can modify and or distribute it under the same terms as Perl itself.