watchdog

package
v0.0.0-...-aeed1ae Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2015 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watchdog

type Watchdog struct {
	Client *golifx.Client
	// contains filtered or unexported fields
}

Watchdog monitors the messages coming over the LAN and keeps information about all of the Lights it hears. It also acts as client, and allows interaction with lights on the LAN.

func NewLifxWatchdog

func NewLifxWatchdog(c *WatchdogConf) *Watchdog

NewLifxWatchdog creates a new watchdog and starts it monitoring the LAN.

func (*Watchdog) GetConf

func (w *Watchdog) GetConf() *WatchdogConf

GetConf returns the current configuration of the Watchdog

func (*Watchdog) SetConf

func (w *Watchdog) SetConf(nc *WatchdogConf)

SetConf will set a new conf object.

func (*Watchdog) Shutdown

func (w *Watchdog) Shutdown()

Shutdown stops the watchdog and closes all resources.

type WatchdogConf

type WatchdogConf struct {
	RescanSeconds          int // How many seconds between each full re-scan of the network. (Discovers new lights)
	BulbUpdateStateMillis  int // How many milliseconds between each request to the bulb to update it's state
	BulbUpdateOtherSeconds int // How many seconds between re-fetching all non-state information from the bulb

	MQTTServer      string // The URL of the server to connect to
	MQTTTopicPrefix string // Prefix all of our channel names with this
	MQTTDeviceID    string // What should this device call itself?
}

Jump to

Keyboard shortcuts

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