Documentation ¶
Overview ¶
Library functions for working with HUE
Index ¶
- Variables
- func AllOn()
- func ConvertJsonToMap(b io.Reader) (m map[string]interface{}, ok bool)
- func Delay(millis int64)
- func DoPut(url string, data io.Reader)
- func DoStep(min, max, step int, action Action)
- func GetHueIp() string
- func GetStatus() (string, error)
- func LightLoop(reps int)
- func SetGroupState(s interface{})
- func SetLightState(lightnum int, s interface{})
- func Show()
- func ToggleLight(lightnum int)
- func TurnLightOn()
- type Action
- type LightAction
- type LightMessage
- type LightState
- type SetProperty
- type StatusMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAction = LightAction{ LightState: LightState{On: true}, Transition: 1, }
View Source
var DefaultState = LightState{ On: true, }
Functions ¶
func SetGroupState ¶
func SetGroupState(s interface{})
func SetLightState ¶
func SetLightState(lightnum int, s interface{})
func ToggleLight ¶
func ToggleLight(lightnum int)
func TurnLightOn ¶
func TurnLightOn()
Types ¶
type LightAction ¶
type LightAction struct { LightState Transition int `json:"transitiontime,omitempty"` }
func SetHue ¶
func SetHue(val int) LightAction
type LightMessage ¶
type LightMessage struct { State LightState Name string }
type LightState ¶
type LightState struct { On bool `json:"on"` Bri int `json:"bri,omitempty"` Hue int `json:"hue,omitempty"` Sat int `json:"sat,omitempty"` Xy []float64 `json:"xy,omitempty"` Alert string `json:"alert,omitempty"` Effect string `json:"effect,omitempty"` Colormode string `json:"colormode,omitempty"` Reachable bool `json:"reachable,omitempty"` }
func GetLightStatus ¶
func GetLightStatus(lightnum int) LightState
func SetBri ¶
func SetBri(val int) LightState
func SetSat ¶
func SetSat(val int) LightState
func (LightState) GetHSB ¶
func (l LightState) GetHSB() color.HSB
func (LightState) GetRGB ¶
func (l LightState) GetRGB() color.RGB
type SetProperty ¶
type SetProperty func(val int) LightAction
type StatusMessage ¶
type StatusMessage struct { Config map[string]interface{} Lights map[string]LightMessage Groups map[string]interface{} Schedules map[string]interface{} Scenes map[string]interface{} }
func GetStatusMsg ¶
func GetStatusMsg() StatusMessage
Click to show internal directories.
Click to hide internal directories.