PrePAN

Sign in to PrePAN

Device::Yeelight Controller for Yeelight smart devices

Good

Synopsis

use Device::Yeelight;
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);
}

Description

Recently I discovered some smart light bulbs from Yeelight which have pretty well documented API, unfortunately there is no Perl module to control them (similar, however not compatible, module is Device::Hue).

This Perl module implements local device discovery via Yeeling specific SSDP protocol and sending commands via control protocol in the JSON format.

Comments

Please sign up to post a review.