Device::Yeelight - Controller for Yeelight smart devices
Version 0.13
This Perl module implements local device discovery via Yeeling specific SSDP protocol and sending commands via control protocol in the JSON format.
Device::Yeelight module provides base class for detecting Yeelight devices.
use Device::Yeelight; use feature 'say'; my $yeelight = Device::Yeelight->new(); my @devices = @{$yeelight->search()}; foreach my $device (@devices) { my %props = %{$device->get_prop(qw/power/)}; say "The light is $props{power}"; $device->set_power('on', 'smooth', 1000); } ...
Creates new Yeelight controller.
Sends search request message and waits for devices response.
Parse response message from Yeelight device.
Jan Baier, <jan.baier at amagical.net>
<jan.baier at amagical.net>
Device::Yeelight::Light
Please report any bugs or feature requests via https://github.com/baierjan/Device-Yeelight
Copyright 2019 Jan Baier.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Device::Yeelight, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::Yeelight
CPAN shell
perl -MCPAN -e shell install Device::Yeelight
For more information on module installation, please visit the detailed CPAN module installation guide.