Go client package for the Divoom Web API (for example Pixoo64).
- Package docs: https://pkg.go.dev/github.com/suapapa/go_divoom
go get github.com/suapapa/go_divoom- Device and host must be on the same LAN
- Device must support Divoom HTTP/Web API
package main
import (
"log"
divoom "github.com/suapapa/go_divoom"
)
func main() {
devs, err := divoom.FindDevice()
if err != nil {
log.Fatal(err)
}
if len(devs) == 0 {
log.Fatal("no divoom device found on LAN")
}
c := divoom.NewClient(devs[0])
if err := c.SetBrightness(50); err != nil {
log.Fatal(err)
}
if err := c.SelectChannel(divoom.ChannelFaces); err != nil {
log.Fatal(err)
}
}./_example/basic_controls./_example/play_gif
This repository also includes an MCP server under ./cmd/divoom-mcp.
See ./cmd/divoom-mcp/README.md for usage details.
Run these checks before committing:
gofmt -w *.go _example/basic_controls/main.go _example/play_gif/main.go
go test ./...
go vet ./...
golangci-lint run