Golang API for Yeelight
Yeelight is simple command line tool and Golang implementation API of Yeelight protocol with notification listening support
Make sure you have a working Go environment. See Golang install instructions
To install, run:
go get github.com/akominch/yeelight
import (
"github.com/akominch/yeelight"
t "github.com/akominch/yeelight/transitions"
)
func main() {
config := yeelight.BulbConfig{
Ip: "192.168.1.24",
Effect: yeelight.Smooth,
}
bulb := yeelight.New(config)
transitions := t.Alarm()
flow := yeelight.NewFlow(3, yeelight.Off, transitions)
_, _ = bulb.StartFlow(flow)
}
Yeelight API Specification [can be found here] (https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf)
yeelight is distributed under the MIT license
Yeelight® is a registered trademark of Yeelight.