limitlessled

package module
v0.0.0-...-53b187e Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2013 License: MIT Imports: 4 Imported by: 1

README

LimitlessLED

This is a small library for controlling LimitlessLED lightbulbs. These bulbs operate via a small wifi bridge, which translates UDP packets (control sequences are documented in control.go) into 2.4GHz RF commands which are sent to the bulbs.

Limitations

Currently, only a subset of the controls are implemented -- notably, there is no support yet for the current bulb (because I don't have a spare socket to put mine in!) or controlling individual zones. The library will evolve to support these.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ALL_ON          = []byte{0x35, 0x00, 0x55}
	ALL_OFF         = []byte{0x39, 0x00, 0x55}
	BRIGHTNESS_UP   = []byte{0x3C, 0x00, 0x55}
	BRIGHTNESS_DOWN = []byte{0x34, 0x00, 0x55}
	WARMER          = []byte{0x3E, 0x00, 0x55}
	COOLER          = []byte{0x3F, 0x00, 0x55}
	ALL_ON_FULL     = []byte{0xB5, 0x00, 0x55}
	ALL_NIGHTLIGHT  = []byte{0xB9, 0x00, 0x55}
)

Functions

This section is empty.

Types

type Bridge

type Bridge struct {
	*net.UDPConn
}

func Dial

func Dial(host string) (*Bridge, error)

func (*Bridge) SendCommand

func (bridge *Bridge) SendCommand(command []byte)

func (*Bridge) Set

func (bridge *Bridge) Set(bulb, other Bulb) Bulb

type Bulb

type Bulb struct {
	Brightness  int
	Temperature int
	IsOn        bool
}

func (Bulb) String

func (bulb Bulb) String() string

type Repeat

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

func (Repeat) Times

func (repeat Repeat) Times(do func())

Jump to

Keyboard shortcuts

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