smartbulb

package
v0.0.0-...-52be9fe Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SmartBulb

type SmartBulb struct {
	TickItem  *item.AnItem
	ColorItem item.Item
	// contains filtered or unexported fields
}

SmartBulb Object

func NewSmartBulb

func NewSmartBulb(id string, label string, conn *hmqtt.MQTTConn, pubTopic string, subTopic string) *SmartBulb

NewSmartBulb creates a new SmartBulb Object, publishing and subscribing to the given broker/topic

func (*SmartBulb) OnMessage

func (s *SmartBulb) OnMessage(client mqtt.Client, msg mqtt.Message)

func (*SmartBulb) OnValueChange

func (s *SmartBulb) OnValueChange(it item.Item, old string, new string)

Jump to

Keyboard shortcuts

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