device

package
v0.0.0-...-1ff4360 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	// contains filtered or unexported fields
}

Device ...

func CreateDevice

func CreateDevice(config *config.Config) Device

CreateDevice creates a device, and initializes MQTT connection

func (*Device) StartMQTT

func (d *Device) StartMQTT() error

StartMQTT Starts MQTT client, doesn't block, and returns MQTT Client

type State

type State struct {
	Online bool `json:"online"`
	On     bool `json:"on"`
}

State is type of current state of device

Jump to

Keyboard shortcuts

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