Documentation ¶
Index ¶
- Constants
- Variables
- func TopicPrepare(topic string) []string
- type MQTT
- func (c *MQTT) Close()
- func (c *MQTT) Connect() error
- func (c *MQTT) HAInit(name, model, version string)
- func (c *MQTT) HAPublishDevice() error
- func (c *MQTT) IsConnected() bool
- func (c *MQTT) Publish(topic string, retained bool, message interface{}) error
- func (c *MQTT) PublishToDefault(message interface{}) error
- func (c *MQTT) SetDefaultTopic(topic, name string)
- func (c *MQTT) SetOnConnect(f func())
Constants ¶
View Source
const HA_DEFAULT_TOPIC = "homeassistant"
Variables ¶
Functions ¶
func TopicPrepare ¶
Types ¶
type MQTT ¶
type MQTT struct {
// contains filtered or unexported fields
}
func (*MQTT) HAPublishDevice ¶
func (*MQTT) IsConnected ¶
func (*MQTT) PublishToDefault ¶
func (*MQTT) SetDefaultTopic ¶
func (*MQTT) SetOnConnect ¶
func (c *MQTT) SetOnConnect(f func())
Click to show internal directories.
Click to hide internal directories.