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(_ func(nodeId int64, online bool) error)
- func (this *Client) SetErrorForwardingFunc(f func(msg string))
- func (this *Client) SetValue(nodeId int64, classId int64, instanceId int64, index int64, value interface{}) error
- func (this *Client) SetValueByValueId(valueId string, value interface{}) error
- func (this *Client) SetValueEventListener(listener ValueEventListener)
- type DeviceInfoListener
- type NodeAvailableInfo
- type NodeAvailableMessageWrapper
- type NodeInfo
- type NodeInfoResultWrapper
- type ResultWrapper
- type ValueEventListener
Constants ¶
View Source
const GetNodesCommandTopic = "/getNodes"
View Source
const NodeAvailableTopic = "/node_available"
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 NodeAvailableInfo ¶
type NodeAvailableInfo struct { Manufacturer string `json:"manufacturer"` ManufacturerId string `json:"manufacturerid"` Product string `json:"product"` ProductType string `json:"producttype"` ProductId string `json:"productid"` Type string `json:"type"` Name string `json:"name"` Loc string `json:"loc"` }
type NodeAvailableMessageWrapper ¶
type NodeAvailableMessageWrapper struct {
Data []interface{} `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 { NodeId int64 `json:"node_id"` DeviceId string `json:"device_id"` Manufacturer string `json:"manufacturer"` ManufacturerId string `json:"manufacturerid"` Product string `json:"product"` ProductType string `json:"producttype"` ProductId string `json:"productid"` Type string `json:"type"` Name string `json:"name"` Values map[string]model.Value `json:"values"` }
{ "node_id":5, "device_id":"2-373-5", "manufacturer":"Danfoss", "manufacturerid":"0x0002", "product":"Devolo Home Control Radiator Thermostat", "producttype":"0x0005", "productid":"0x0175", "type":"Setpoint Thermostat", "name":"", "values":{ ... } }
type NodeInfoResultWrapper ¶
type NodeInfoResultWrapper struct { ResultWrapper Result []NodeInfo `json:"result"` }
type ResultWrapper ¶
type ValueEventListener ¶
Click to show internal directories.
Click to hide internal directories.