Documentation ¶
Index ¶
- type Bridge
- func (b *Bridge) AdjustBrightness(id string, percentage float64) error
- func (b *Bridge) Authenticate(appName, instanceName string) error
- func (b *Bridge) GetConfig() (*Config, error)
- func (b *Bridge) GetLight(id string) (*Light, error)
- func (b *Bridge) GetLightByName(name string) (*Light, error)
- func (b *Bridge) GetLights() ([]Light, error)
- func (b *Bridge) SetColor(id string, c colorful.Color) error
- func (b *Bridge) ToggleLight(id string, on bool) error
- type Config
- type Light
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct { InstanceName string HostName string IpAddress net.IP // contains filtered or unexported fields }
func CreateBridge ¶
func DiscoverBridge ¶
func (*Bridge) AdjustBrightness ¶
func (*Bridge) Authenticate ¶
type Config ¶
type Config struct { Name string `json:"name"` DatastoreVersion string `json:"datastoreversion"` SwVersion string `json:"swversion"` ApiVersion string `json:"apiversion"` Mac string `json:"mac"` Bridgeid string `json:"bridgeid"` FactoryNew bool `json:"factorynew"` ReplacesBridgeId interface{} `json:"replacesbridgeid"` ModelId string `json:"modelid"` StarterKitId string `json:"starterkitid"` }
type Light ¶
type Light struct { ID string `json:"id"` IDV1 string `json:"id_v1"` Owner struct { Rid string `json:"rid"` Rtype string `json:"rtype"` } `json:"owner"` Metadata struct { Name string `json:"name"` Archetype string `json:"archetype"` } `json:"metadata"` On struct { On bool `json:"on"` } `json:"on"` Dimming struct { Brightness float64 `json:"brightness"` MinDimLevel float64 `json:"min_dim_level"` } `json:"dimming"` DimmingDelta struct { } `json:"dimming_delta"` ColorTemperature struct { Mirek int `json:"mirek"` MirekValid bool `json:"mirek_valid"` MirekSchema struct { MirekMinimum int `json:"mirek_minimum"` MirekMaximum int `json:"mirek_maximum"` } `json:"mirek_schema"` } `json:"color_temperature"` ColorTemperatureDelta struct { } `json:"color_temperature_delta"` Color struct { Xy struct { X float64 `json:"x"` Y float64 `json:"y"` } `json:"xy"` Gamut struct { Red struct { X float64 `json:"x"` Y float64 `json:"y"` } `json:"red"` Green struct { X float64 `json:"x"` Y float64 `json:"y"` } `json:"green"` Blue struct { X float64 `json:"x"` Y float64 `json:"y"` } `json:"blue"` } `json:"gamut"` GamutType string `json:"gamut_type"` } `json:"color,omitempty"` Dynamics struct { Status string `json:"status"` StatusValues []string `json:"status_values"` Speed float64 `json:"speed"` SpeedValid bool `json:"speed_valid"` } `json:"dynamics"` Alert struct { ActionValues []string `json:"action_values"` } `json:"alert"` Signaling struct { } `json:"signaling"` Mode string `json:"mode"` Type string `json:"type"` Effects struct { StatusValues []string `json:"status_values"` Status string `json:"status"` EffectValues []string `json:"effect_values"` } `json:"effects,omitempty"` }
Click to show internal directories.
Click to hide internal directories.