Documentation ¶
Index ¶
- Constants
- type Client
- func (this *Client) ForwardError(msg string)
- func (this *Client) RequestDeviceInfoUpdate() error
- func (this *Client) SendZwayCommand(command string, args []interface{}) error
- func (this *Client) SetDeviceInfoListener(listener DeviceInfoListener)
- func (this *Client) SetDeviceStatusListener(listener func(nodeId int64, online bool) error)
- func (this *Client) SetErrorForwardingFunc(f func(msg string))
- func (this *Client) SetValueByValueId(valueId string, value interface{}) error
- func (this *Client) SetValueEventListener(listener ValueEventListener)
- type DeviceInfoListener
- type DeviceState
- type DeviceStateListener
- type DeviceStateMsg
- type NodeAvailableMessage
- type NodeInfo
- type NodeInfoResultWrapper
- type NodeValue
- type ResultWrapper
- type Statistics
- type ValueEventListener
- type ValueID
Constants ¶
View Source
const GetNodesCommandTopic = "/getNodes"
View Source
const NodeAvailableTopic = "/node_alive"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ForwardError ¶
func (*Client) RequestDeviceInfoUpdate ¶
func (*Client) SendZwayCommand ¶
func (*Client) SetDeviceInfoListener ¶
func (this *Client) SetDeviceInfoListener(listener DeviceInfoListener)
func (*Client) SetDeviceStatusListener ¶
func (*Client) SetErrorForwardingFunc ¶
func (*Client) SetValueByValueId ¶
func (*Client) SetValueEventListener ¶
func (this *Client) SetValueEventListener(listener ValueEventListener)
type DeviceInfoListener ¶
type DeviceInfoListener = func(nodes []model.DeviceInfo, huskIds []int64, withValues bool, allKnownDevices bool)
type DeviceState ¶
type DeviceState = string
const ALIVE DeviceState = "Alive"
const ASLEEP DeviceState = "Asleep"
const DEAD DeviceState = "Dead"
const UNKNOWN DeviceState = "Unknown"
type DeviceStateListener ¶
type DeviceStateMsg ¶
type NodeAvailableMessage ¶
type NodeAvailableMessage struct {
Data []NodeInfo `json:"data"`
}
{ "data":[ 5, { "manufacturer":"Danfoss", "manufacturerid":"0x0002", "product":"Devolo Home Control Radiator Thermostat", "producttype":"0x0005", "productid":"0x0175", "type":"Setpoint Thermostat", "name":"", "loc":"" } ] }
type NodeInfo ¶
type NodeInfo struct { Id int64 `json:"id"` DeviceId string `json:"deviceId"` Manufacturer string `json:"manufacturer"` ManufacturerId int64 `json:"manufacturerId"` ProductDescription string `json:"productDescription"` ProductType int64 `json:"productType"` ProductId int64 `json:"productId"` Name string `json:"name"` Values map[string]NodeValue `json:"values"` Statistics Statistics `json:"statistics"` }
{ "id":2, "name":"Lampe_Ingo", "loc":"", "values":{}, "groups":[], "neighbors":[], "ready":true, "available":true, "hassDevices":{}, "failed":false, "inited":true, "hexId":"0x0371-0x0003-0x0002", "dbLink":"https://devices.zwave-js.io/?jumpTo=0x0371:0x0003:0x0002:2.5", "manufacturerId":881, "productId":2, "productType":3, "deviceConfig":{}, "productLabel":"ZWA002", "productDescription":"Bulb 6 Multi-Color", "manufacturer":"Aeotec Ltd.", "firmwareVersion":"2.5", "protocolVersion":3, "zwavePlusVersion":1, "zwavePlusNodeType":0, "zwavePlusRoleType":5, "nodeType":1, "endpointsCount":0, "endpointIndizes":[], "isSecure":"unknown", "supportsSecurity":false, "supportsBeaming":true, "isControllerNode":false, "isListening":true, "isFrequentListening":false, "isRouting":true, "keepAwake":false, "maxDataRate":100000, "deviceClass":{}, "deviceId":"881-2-3", "status":"Alive", "interviewStage":"Complete", "statistics":{}, "lastActive":1652876439240 }
type NodeInfoResultWrapper ¶
type NodeInfoResultWrapper struct { ResultWrapper Result []NodeInfo `json:"result"` }
type NodeValue ¶
type NodeValue struct { Id string `json:"id"` NodeId int64 `json:"nodeId"` CommandClass int64 `json:"commandClass"` CommandClassName string `json:"commandClassName"` Description string `json:"description"` Endpoint int64 `json:"endpoint"` Type string `json:"type"` Label string `json:"label"` Readable bool `json:"readable"` Writeable bool `json:"writeable"` Values interface{} `json:"values"` Value interface{} `json:"value"` LastUpdate int64 `json:"lastUpdate"` }
type ResultWrapper ¶
type Statistics ¶
type ValueEventListener ¶
Click to show internal directories.
Click to hide internal directories.