/yeelight

Golang library to integrate with Yeelight smart LED products.

Primary LanguageGoMIT LicenseMIT

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 {
        // ...
    }
}