zwave2mqtt

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 New

func New(config configuration.Config, ctx context.Context) (*Client, error)

func (*Client) ForwardError

func (this *Client) ForwardError(msg string)

func (*Client) RequestDeviceInfoUpdate

func (this *Client) RequestDeviceInfoUpdate() error

func (*Client) SendZwayCommand

func (this *Client) SendZwayCommand(command string, args []interface{}) error

func (*Client) SetDeviceInfoListener

func (this *Client) SetDeviceInfoListener(listener DeviceInfoListener)

func (*Client) SetDeviceStatusListener

func (this *Client) SetDeviceStatusListener(_ func(nodeId int64, online bool) error)

func (*Client) SetErrorForwardingFunc

func (this *Client) SetErrorForwardingFunc(f func(msg string))

func (*Client) SetValue

func (this *Client) SetValue(nodeId int64, classId int64, instanceId int64, index int64, value interface{}) error

func (*Client) SetValueByValueId

func (this *Client) SetValueByValueId(valueId string, value interface{}) error

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 ResultWrapper struct {
	Success bool          `json:"success"`
	Message string        `json:"message"`
	Args    []interface{} `json:"args"`
}

type ValueEventListener

type ValueEventListener = func(value model.Value)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL