Group
Extension

Matches 2

Device-Yeelight ( J/JB/JBAIER/Device-Yeelight-0.14.tar.gz, JBAIER, 2024; MetaCPAN )
Device-Yeelight/lib/Device/Yeelight.pm ( view source; MetaCPAN )
ice 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 Dev
Device-Yeelight ( J/JB/JBAIER/Device-Yeelight-0.14.tar.gz, JBAIER, 2024; MetaCPAN )
Device-Yeelight/lib/Device/Yeelight/Light.pm ( view source; MetaCPAN )
package Device::Yeelight::Light;

use 5.026;
use utf8;
use strict;
use warnings;

use Carp;
use JSON;
use IO::Socket;

=encoding utf8
=head1 NAME

Device::Yeelight::Light - WiFi Smart LED Light

=head
my $json    = encode_json(
        {
            id     => $id,
            method => $cmd =~ s/^${package}:://r,
            params => \@params,
        }
    );
    $self->connection->send("$json\r\
uffer;
    while ( not $self->connection->recv( $buffer, 4096 ) ) {
        my $response = decode_json($buffer);

        # Ignore notification messages
        next if not defined $response->{id};
  

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.