Documentation ¶
Index ¶
- func IsEmptyState(s interface{}) bool
- func IsLightState(s interface{}) bool
- type Daylight
- type Decoder
- type EmptyState
- type Event
- type EventError
- type EventErrorImpl
- type LightState
- type Reader
- type State
- type TypeLookuper
- type ZHAFire
- type ZHAHumidity
- type ZHAOpenClose
- type ZHAPresence
- type ZHAPressure
- type ZHASwitch
- type ZHATemperature
- type ZHAWater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEmptyState ¶
func IsEmptyState(s interface{}) bool
IsEmptyState returns true if s is of type EmptyState
func IsLightState ¶
func IsLightState(s interface{}) bool
IsLightState returns true if s is of type LightState
Types ¶
type Decoder ¶
type Decoder struct {
TypeStore TypeLookuper
}
Decoder is able to decode deCONZ events
type EmptyState ¶
type EmptyState struct {
State
}
EmptyState is an empty struct used to indicate no state was parsed
type Event ¶
type Event struct { Type string `json:"t"` Event string `json:"e"` Resource string `json:"r"` UniqueID string `json:"uniqueid"` ID int `json:"id,string"` RawState json.RawMessage `json:"state"` State interface{} }
Event represents a deconz sensor event
func (*Event) ParseState ¶
func (e *Event) ParseState(tl TypeLookuper) error
ParseState tries to unmarshal the appropriate state based on looking up the id though the TypeStore
type EventError ¶
type EventErrorImpl ¶
type EventErrorImpl struct {
// contains filtered or unexported fields
}
func (EventErrorImpl) Error ¶
func (e EventErrorImpl) Error() string
func (EventErrorImpl) Recoverable ¶
func (e EventErrorImpl) Recoverable() bool
type LightState ¶
LightState represent the state of a extended color light type
type Reader ¶
type Reader struct { WebsocketAddr string TypeStore TypeLookuper // contains filtered or unexported fields }
Reader represents a deconz server device
type TypeLookuper ¶
TypeLookuper is the interface that we require to lookup types from id's
type ZHAHumidity ¶
ZHAHumidity represents a presure change
func (*ZHAHumidity) Fields ¶
func (z *ZHAHumidity) Fields() map[string]interface{}
Fields returns timeseries data for influxdb
type ZHAOpenClose ¶
ZHAOpenClose represents a door/window sensor that can have 2 states, open or close
func (*ZHAOpenClose) Fields ¶
func (z *ZHAOpenClose) Fields() map[string]interface{}
Fields returns timeseries data for influxdb
type ZHAPresence ¶
ZHAPresence represents aaaa
func (*ZHAPresence) Fields ¶
func (z *ZHAPresence) Fields() map[string]interface{}
Fields returns timeseries data for influxdb
type ZHAPressure ¶
ZHAPressure represents a presure change
func (*ZHAPressure) Fields ¶
func (z *ZHAPressure) Fields() map[string]interface{}
Fields returns timeseries data for influxdb
type ZHASwitch ¶
ZHASwitch represents a change from a button or switch
func (*ZHASwitch) ButtonEventAsString ¶
type ZHATemperature ¶
ZHATemperature represents a temperature change
func (*ZHATemperature) Fields ¶
func (z *ZHATemperature) Fields() map[string]interface{}
Fields returns timeseries data for influxdb