milight

package module
v0.0.0-...-930e016 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZoneAll int = iota
	Zone1
	Zone2
	Zone3
	Zone4
)

Zone constants are used to declare the target zone

Variables

This section is empty.

Functions

func DiscoMode

func DiscoMode() []byte

DiscoMode turns on disco mode for lights in the currently selected zone. Running this more than once will cycle to the next disco mode, of which there are many (built into the bulbs, apparently).

func DiscoModeFaster

func DiscoModeFaster() []byte

DiscoModeFaster makes disco mode run faster on lights in the currently selected zone.

func DiscoModeSlower

func DiscoModeSlower() []byte

DiscoModeSlower makes disco mode run slower on lights in the currently selected zone.

func Send

func Send(addr string, values ...[]byte) error

Send sends the command to the light controller

func SetBrightness

func SetBrightness(brightness float64) []byte

SetBrightness sets the brightness for the lights in the currently selected zone

func SetColorRGB

func SetColorRGB(r, g, b int) []byte

SetColorRGB sets the color using int 0-255 as the RGB values for lights in the currently selected zone

func SetColorRGBFloat

func SetColorRGBFloat(r, g, b float64) []byte

SetColorRGBFloat sets the color using float64 0..1 as the RGB values for lights in the currently selected zone

func SetColorRGBHex

func SetColorRGBHex(rgb string) []byte

SetColorRGBHex sets the color using #000000 as the RGB values for lights in the currently selected zone

func SetNight

func SetNight(zone int) []byte

SetNight sets the lights in the selected zone to night mode and selects this zone for future actions

func SetWhite

func SetWhite(zone int) []byte

SetWhite sets the lights in the selected zone to full white and selects this zone for future actions

func TurnOff

func TurnOff(zone int) []byte

TurnOff turns off the lights in the selected zone and selects this zone for future actions

func TurnOn

func TurnOn(zone int) []byte

TurnOn turns on the lights in the selected zone without changing their in-bulb values and selects this zone for future actions

Types

This section is empty.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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