wizzer

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	Mac     string `json:"mac,omitempty"`
	RSSI    int32  `json:"rssi,omitempty"`
	Src     string `json:"src,omitempty"`
	State   *bool  `json:"state,omitempty"`
	SceneId uint32 `json:"sceneId,omitempty"`
	Red     uint8  `json:"r,omitempty"`
	Green   uint8  `json:"g,omitempty"`
	Blue    uint8  `json:"b,omitempty"`
	Cool    uint8  `json:"c,omitempty"`
	Warm    uint8  `json:"w,omitempty"`
	Dimming uint8  `json:"dimming,omitempty"`
	Temp    uint32 `json:"temp,omitempty"`
}

type RequestEnvelope

type RequestEnvelope struct {
	Method string  `json:"method"`
	Env    string  `json:"env,omitempty"`
	Result *Params `json:"result,omitempty"`
	Params *Params `json:"params,omitempty"`
}

type Wizzer

type Wizzer struct {
	// contains filtered or unexported fields
}

func New

func New(ip string) (*Wizzer, error)

New returns a new wizzer instance.

func (*Wizzer) GetStatus

func (w *Wizzer) GetStatus(ctx context.Context) (*Params, error)

func (*Wizzer) SetBrightness

func (w *Wizzer) SetBrightness(ctx context.Context, v uint8) error

func (*Wizzer) SetCool

func (w *Wizzer) SetCool(ctx context.Context, v uint8) error

func (*Wizzer) SetLightOn

func (w *Wizzer) SetLightOn(ctx context.Context, on bool) error

func (*Wizzer) SetSceneId

func (w *Wizzer) SetSceneId(ctx context.Context, v uint32) error

func (*Wizzer) SetTemp

func (w *Wizzer) SetTemp(ctx context.Context, v uint32) error

func (*Wizzer) SetWarm

func (w *Wizzer) SetWarm(ctx context.Context, v uint8) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL