mqtt

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MqttConfig

type MqttConfig struct {
	Name              string      `json:"name"`
	UnitOfMeasurement string      `json:"unit_of_measurement"`
	StateTopic        string      `json:"state_topic"`
	UniqueID          string      `json:"unique_id"`
	MaxConnectionTime int         `json:"-"`
	Client            mqtt.Client `json:"-"`
	ConfigTopic       string      `json:"-"`
	Server            string      `json:"-"`
	Username          string      `json:"-"`
	Password          string      `json:"-"`
}

func (*MqttConfig) Connect

func (m *MqttConfig) Connect() error

func (*MqttConfig) ConnectWithBackoff

func (m *MqttConfig) ConnectWithBackoff() error

func (*MqttConfig) Send

func (m *MqttConfig) Send(data string) error

Send any data to home assistant

func (*MqttConfig) SendConfig

func (m *MqttConfig) SendConfig() error

SendConfig send the home assistant auto discovery config to mqtt

Jump to

Keyboard shortcuts

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