honeywell5800

package
v0.0.0-...-73d934c Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package honeywell5800 models Honeywell 58xx series sensors operating over 345 MHz radio, most typically door/window sensors.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSensorIDTooLarge = errors.New("sensor ID cannot be larger than 20 bits")
	ErrSensorIDTooSmall = errors.New("sensor ID cannot be 0 or negative")
)
View Source
var (
	ErrChannelTooLarge = errors.New("Channel cannot be larger than 4 bits")
)

Functions

This section is empty.

Types

type Channel

type Channel uint8

func (Channel) ToSQL

func (ch Channel) ToSQL(stmt *sqlite.Stmt, param string)

func (*Channel) UnmarshalJSON

func (ch *Channel) UnmarshalJSON(data []byte) error

type Event

type Event uint8

func EventFromSQL

func EventFromSQL(stmt *sqlite.Stmt, param string) Event

func (Event) Format

func (e Event) Format(state fmt.State, verb rune)

func (Event) IsBatteryLow

func (e Event) IsBatteryLow() bool

func (Event) IsHeartbeat

func (e Event) IsHeartbeat() bool

func (Event) IsRegister

func (e Event) IsRegister() bool

func (Event) Loop

func (e Event) Loop(n uint8) bool

func (Event) Loop1

func (e Event) Loop1() bool

func (Event) Loop2

func (e Event) Loop2() bool

func (Event) Loop3

func (e Event) Loop3() bool

func (Event) Loop4

func (e Event) Loop4() bool

func (Event) String

func (e Event) String() string

func (Event) ToSQL

func (e Event) ToSQL(stmt *sqlite.Stmt, param string)

type Kind

type Kind int

Kind stores the kind of a sensor loop.

const (
	Door              Kind // door open
	DoorWindow             // door or window open
	GlassBreak             // glass break
	HeatDetector           // heat detector
	KeyFob                 // key fob button
	LowTemp                // low temperature
	MaintenanceNeeded      // maintenance needed
	MedicalAlert           // medical alert
	MotionDetector         // motion detector
	PanicButton            // panic button
	SmokeDetector          // smoke detector
	Tamper                 // tamper
	TiltSwitch             // tilt switch
	Window                 // window open
)

func KindFromSQL

func KindFromSQL(stmt *sqlite.Stmt, param string) (Kind, error)

type Sensor

type Sensor uint32

func SensorFromSQL

func SensorFromSQL(stmt *sqlite.Stmt, param string) Sensor

func (Sensor) String

func (s Sensor) String() string

String returns the sensor ID formatted like A000-0000, as found on stickers on the hardware.

func (Sensor) ToSQL

func (s Sensor) ToSQL(stmt *sqlite.Stmt, param string)

func (*Sensor) UnmarshalJSON

func (s *Sensor) UnmarshalJSON(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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