plugins

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggerPlugin added in v1.0.4

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

func NewLoggerPlugin added in v1.0.4

func NewLoggerPlugin(logger log.Logger) *LoggerPlugin

func (*LoggerPlugin) MessageHandler added in v1.0.4

func (plugin *LoggerPlugin) MessageHandler(client mqtt.Client, message mqtt.Message)

func (*LoggerPlugin) SetMeasurementChannel added in v1.0.4

func (plugin *LoggerPlugin) SetMeasurementChannel(channel chan<- indoorclimate.IndoorClimateMeasurement)

type SellyHT_EventType added in v1.0.2

type SellyHT_EventType string
const (
	SHELLYHT_NOTIFYFULLSTATUS SellyHT_EventType = "NotifyFullStatus"
)

type ShellyHTPlugin added in v1.0.2

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

func NewShellyHTPlugin added in v1.0.2

func NewShellyHTPlugin(logger log.Logger) *ShellyHTPlugin

NewMockPlugin creates a new mock plugin.

func (*ShellyHTPlugin) MessageHandler added in v1.0.2

func (plugin *ShellyHTPlugin) MessageHandler(client mqtt.Client, message mqtt.Message)

MessageHandler process message received from MQTT topic and pulishes static indoor climate data depending on message payload.

func (*ShellyHTPlugin) SetMeasurementChannel added in v1.0.2

func (plugin *ShellyHTPlugin) SetMeasurementChannel(channel chan<- indoorclimate.IndoorClimateMeasurement)

SetMeasurementChannel assign a channel measuremnts should be written to.

type ShellyHT_BatteryPower added in v1.0.2

type ShellyHT_BatteryPower struct {
	Value float64 `json:"percent"`
}

type ShellyHT_DevicePower added in v1.0.2

type ShellyHT_DevicePower struct {
	Battery  ShellyHT_BatteryPower  `json:"battery"`
	External ShellyHT_ExternalPower `json:"external"`
}

type ShellyHT_Event added in v1.0.2

type ShellyHT_Event struct {
	Method string `json:"method"`
}

type ShellyHT_ExternalPower added in v1.0.2

type ShellyHT_ExternalPower struct {
	Present bool `json:"present"`
}

type ShellyHT_Humidity added in v1.0.2

type ShellyHT_Humidity struct {
	Value float64 `json:"rh"`
}

type ShellyHT_NotifyFullStatus added in v1.0.2

type ShellyHT_NotifyFullStatus struct {
	Device string          `json:"src"`
	Params ShellyHT_Params `json:"params"`
}

type ShellyHT_Params added in v1.0.2

type ShellyHT_Params struct {
	DevicePower0 ShellyHT_DevicePower `json:"devicepower:0"`
	Temperature0 ShellyHT_Temperature `json:"temperature:0"`
	Humidity0    ShellyHT_Humidity    `json:"humidity:0"`
}

type ShellyHT_Temperature added in v1.0.2

type ShellyHT_Temperature struct {
	ValueC float64 `json:"tC"`
	ValueF float64 `json:"tF"`
}

Jump to

Keyboard shortcuts

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