yeelight

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 9 Imported by: 0

README

Yeelight Golang

A simple Golang library to control Xiaomi Yeelights device over LAN with TCP.

This solution offers a 1:1 implementation of the official docs from Xiaomi.

Installation

go get github.com/LordAur/yeelight

Usage

import "github.com/LordAur/yeelight"

func main() {
    y := yeelight.New(&yeelight.Config{
        IpAddress: "192.168.0.0",
        Port:      55443,
    })

    defer y.Close()

    r, err := y.GetProps("bright", "power", "ct")
    if err != nil {
        // ...
    }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discovery

func Discovery(cidr string) ([]