integration

package
v0.0.0-...-ca90ad5 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventAlarmState   = iota
	EventSensorMotion // sensor readings
	EventSensorTemperature
	EventSensorHumidity
	EventSensorCo2
	EventSensorNoise
	EventSensorLux
	EventSwitchState // switch/dimmer readings
	EventDimmerLevel
	EventUsageKwh // power readings
	EventUsageWatt
)

Events

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type    int
	Version string
	Data    interface{}
}

Event is the type of event that has occured

func (*Event) ID

func (e *Event) ID() int

func (*Event) Lux

func (e *Event) Lux() int

type Plugin

type Plugin interface {
	Name() string
	Version() string
	Subscribe(e <-chan Event) error
	Publish(*Event) error
	Shutdown()
}

type SensorLux

type SensorLux struct {
	ID  int
	Lux int
}

Jump to

Keyboard shortcuts

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