Power::Outlet::Osram - Control and query an Osram Lightify light
Using power-outlet shell script from Power::Outlet distribution
power-outlet Osram ON host 192.168.1.10 name hall
Using Power::Outlet API
my $outlet=Power::Outlet->new(type=>"Osram", host => "192.168.1.10", name=>"hall"); print $outlet->on, "\n";
Using Power::Outlet::Osram directly
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";
Power::Outlet::Osram is a package for controlling and querying a light on an Osram Lightify network attached bridge.
use Power::Outlet::Osram; my $lamp=Power::Outlet::Osram->new(host=>"mybridge", name=>"hall"); print $lamp->on, "\n";
my $outlet=Power::Outlet->new(type=>"Osram", host=>"192.168.10.136", name => "Hall" ); my $outlet=Power::Outlet::Osram->new(host=>"mybridge", name="kitchen");
Name for the particular light as configured on the Osram Lightify bridge.
Return the current state of the specified device, as a string.
Sends a message to the device to Turn Power ON
Sends a message to the device to Turn Power OFF
Implementation method to send an on/off message to the given device.
Queries the device for the current status and then requests the opposite.
Sends messages to the device to Cycle Power (ON-OFF-ON or OFF-ON-OFF).
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.