Versions in this module Expand all Collapse all v0 v0.1.0 Feb 11, 2018 Changes in this version + const Cold + const DeviceEndpoint + const GatewayEndpoint + const GroupEndpoint + const No + const Normal + const NotificationEndpoint + const PrioCritical + const PrioForced + const PrioNormal + const PrioRequired + const SceneEndpoint + const TypeLight + const TypeMotionSensor + const TypeRemote + const Warm + const Yes + type Accessory struct + Alive YesNo + DeviceInfo *DeviceInfo + LastSeen int64 + Lights []*Light + OTAUpdate YesNo + Plugs []*Plug + Sensors []*Sensor + Switches []*Switch + Type DeviceType + func (a *Accessory) IsAlive() bool + func (a *Accessory) IsLight() bool + func (a *Accessory) IsRemote() bool + func (a *Accessory) LastSeenTime() time.Time + func (a *Accessory) Light() *Light + func (a *Accessory) SetColor(c color.Color) + func (a *Accessory) SetColorCold() + func (a *Accessory) SetColorNormal() + func (a *Accessory) SetColorTemp(c string) + func (a *Accessory) SetColorWarm() + func (a *Accessory) SetDim(dim int) + func (a *Accessory) SetName(name string) + func (a *Accessory) SetOn(on bool) + func (o *Accessory) Observe(callback ObservableCallback) + func (o *Accessory) ObserveFilter(filter []ObserveFilter, callback ObservableCallback) + func (o *Accessory) OnChange(change []*ObservedChange) + type BaseType struct + CreatedAt int64 + InstanceID int + Name string + func (b *BaseType) CreateTime() time.Time + func (b *BaseType) GetInstanceID() int + type DeviceInfo struct + Battery int + Firmware string + Manufacturer string + Model string + Power int + SerialNumber string + func (d *DeviceInfo) IsRGBModel() bool + type DeviceType uint8 + type Dimmable struct + Dim *uint8 + On *YesNo + func (d *Dimmable) DimInt() int + func (d *Dimmable) DimPercent() float64 + func (d *Dimmable) IsOn() bool + type DiscoverCallback interface + OnNewAccessory func(d *Accessory) + OnNewGroup func(g *Group) + OnNewScene func(g *Group, s *Scene) + type Gateway struct + CommissioningMode int + Field9060 int + Field9062 int + Field9072 int + Field9073 int + Field9074 int + Field9075 int + Field9076 int + Field9077 int + Field9078 int + Field9079 int + Field9080 int + Field9081 string + ForceCheckOTAUpdate string + NTPServer string + Name string + TimeSource int + Timestamp int64 + TimestampUtc string + UpdateAcceptedTimestamp int64 + UpdatePriority UpdatePriority + UpdateProgress int + UpdateState int + UpdateURL string + Version string + func (o *Gateway) Observe(callback ObservableCallback) + func (o *Gateway) ObserveFilter(filter []ObserveFilter, callback ObservableCallback) + func (o *Gateway) OnChange(change []*ObservedChange) + type Group struct + Members []int + Scene *int + Scenes map[int]*Scene + func (g *Group) MarshalJSON() ([]byte, error) + func (g *Group) SetDim(dim int) + func (g *Group) SetName(name string) + func (g *Group) SetOn(on bool) + func (g *Group) UnmarshalJSON(b []byte) error + func (o *Group) Observe(callback ObservableCallback) + func (o *Group) ObserveFilter(filter []ObserveFilter, callback ObservableCallback) + func (o *Group) OnChange(change []*ObservedChange) + type Instance interface + GetInstanceID func() int + type Light struct + CumulativeActivePower *float64 + OnTime *int64 + PowerFactor *float64 + TransitionTime *int + Unit *string + type LightSetting struct + Color string + ColorX int + ColorY int + Field5711 int + Hue int + Saturation int + func (l *LightSetting) GetColor() colorful.Color + func (l *LightSetting) GetColorName() string + func (l *LightSetting) HasColorTemperature() bool + func (l *LightSetting) SetColor(color color.Color) + func (l *LightSetting) SetColorCold() + func (l *LightSetting) SetColorNormal() + func (l *LightSetting) SetColorTemp(c string) + func (l *LightSetting) SetColorWarm() + type Notification struct + Details []string + Event NotificationEvent + State int + func (n *Notification) EventString() string + type NotificationEvent int + const EventGatewayReboot + const EventInternetUnreachable + const EventNewFirmwareAvailable + type ObservableCallback func(change []*ObservedChange) + type ObservableTransport interface + Observe func(method, uri string, callback func(data []byte)) error + type ObserveFilter func(observation *ObservedChange) bool + type ObservedChange struct + Field string + NewValue interface{} + OldValue interface{} + Path string + type Plug struct + type Scene struct + Index int + IsActive YesNo + IsPredefined YesNo + LightSettings []*LightSetting + UseCurrentLightSettings YesNo + func (o *Scene) Observe(callback ObservableCallback) + func (o *Scene) ObserveFilter(filter []ObserveFilter, callback ObservableCallback) + func (o *Scene) OnChange(change []*ObservedChange) + type Sensor struct + type Switch struct + type Transport interface + Delete func(uri string) error + Get func(uri string) ([]byte, error) + Put func(uri string, data []byte) error + type Tree struct + Devices map[int]*Accessory + Gateway *Gateway + Groups map[int]*Group + Notifications []*Notification + func NewTree(transport Transport) *Tree + func (t *Tree) AddCallback(callback DiscoverCallback) + func (t *Tree) Populate(path []string, data []byte) error + type UpdatePriority uint8 + func (u UpdatePriority) String() string + type YesNo uint8 + func ToYesNo(t bool) YesNo + func (y YesNo) Bool() bool + func (y YesNo) String() string