Skip to content
suapapaPublic

About

Go package for divoom APIs

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

go_divoom

example

Go client package for the Divoom Web API (for example Pixoo64).

Install

go get github.com/suapapa/go_divoom

Requirements

  • Device and host must be on the same LAN
  • Device must support Divoom HTTP/Web API

Quick Start

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)
	}
}

Examples

  • ./_example/basic_controls
  • ./_example/play_gif

MCP Server

This repository also includes an MCP server under ./cmd/divoom-mcp. See ./cmd/divoom-mcp/README.md for usage details.

Development

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

References

About

Go package for divoom APIs

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ 换网址