accessory

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 40

README

Accessory Category
Unknown 0
Other 1
Bridge 2
Fan 3
Garage Door Opener 4
Lightbulb 5
Door Lock 6
Outlet 7
Switch 8
Thermostat 9
Sensor 10
Security System 11
Door 12
Window 13
Window Covering 14
Programmable Switch 15
IP Camera 17
Video Doorbell 18
Air Purifier 19
Heater 20
Air Conditioner 21
Humidifier 22
Dehumidifier 23
Sprinklers 28
Faucets 29
Shower Systems 30
Television 31
Remote Control 32
WiFi Router 33
Audio Receiver 34
TV Set Top Box 35
TV STick 36

Documentation

Overview

THIS FILE IS AUTO-GENERATED

Index

Constants

View Source
const (
	TypeUnknown            byte = 0
	TypeOther              byte = 1
	TypeBridge             byte = 2
	TypeFan                byte = 3
	TypeGarageDoorOpener   byte = 4
	TypeLightbulb          byte = 5
	TypeDoorLock           byte = 6
	TypeOutlet             byte = 7
	TypeSwitch             byte = 8
	TypeThermostat         byte = 9
	TypeSensor             byte = 10
	TypeSecuritySystem     byte = 11
	TypeDoor               byte = 12
	TypeWindow             byte = 13
	TypeWindowCovering     byte = 14
	TypeProgrammableSwitch byte = 15
	TypeIPCamera           byte = 17
	TypeVideoDoorbell      byte = 18
	TypeAirPurifier        byte = 19
	TypeHeater             byte = 20
	TypeAirConditioner     byte = 21
	TypeHumidifier         byte = 22
	TypeDehumidifier       byte = 23
	TypeSprinkler          byte = 28
	TypeFaucet             byte = 29
	TypeShowerSystem       byte = 30
	TypeTelevision         byte = 31
	TypeRemoteControl      byte = 32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type A

type A struct {
	Id   uint64
	Type byte
	Info *service.AccessoryInformation
	Ss   []*service.S
	// IdentifyFunc is called when a client
	// makes a POST to the /identify endpoint.
	IdentifyFunc func(*http.Request)
}

func New

func New(info Info, typ byte) *A

func (*A) AddS

func (a *A) AddS(s *service.S)

Adds a service to the accessory and updates the ids of the service and the corresponding characteristics

func (*A) MarshalJSON

func (a *A) MarshalJSON() ([]byte, error)

func (*A) Name

func (a *A) Name() string

type AirPurifier

type AirPurifier struct {
	*A
	AirPurifier *service.AirPurifier
}

func NewAirPurifier

func NewAirPurifier(info Info) *AirPurifier

NewAirPurifier returns a air purifier accessory.

type Bridge

type Bridge struct {
	*A
}

func NewBridge

func NewBridge(info Info) *Bridge

NewBridge returns a bridge which implements model.Bridge.

type Camera

type Camera struct {
	*A
	Control           *service.CameraControl
	StreamManagement1 *service.CameraRTPStreamManagement
	StreamManagement2 *service.CameraRTPStreamManagement
}

Camera provides RTP video streaming.

func NewCamera

func NewCamera(info Info) *Camera

NewCamera returns an IP camera accessory.

type ColoredLightbulb

type ColoredLightbulb struct {
	*A
	Lightbulb *service.ColoredLightbulb
}

func NewColoredLightbulb

func NewColoredLightbulb(info Info) *ColoredLightbulb

NewLightbulb returns an light bulb accessory.

type ContactSensor added in v0.0.29

type ContactSensor struct {
	*A
	ContactSensor *service.ContactSensor
}

func NewContactSensor added in v0.0.29

func NewContactSensor(info Info) *ContactSensor

NewContactSensor implements a contact sensor.

type Cooler

type Cooler struct {
	*A
	Cooler *service.Cooler
}

func NewCooler

func NewCooler(info Info) *Cooler

NewCooler returns a cooler accessory.

type Dehumidifier

type Dehumidifier struct {
	*A
	Dehumidifier *service.Dehumidifier
}

func NewDehumidifier

func NewDehumidifier(info Info) *Dehumidifier

NewDehumidifier returns an outlet accessory.

type Door

type Door struct {
	*A
	Door *service.Door
}

func NewDoor

func NewDoor(info Info) *Door

NewDoor returns a door accessory.

type Fan

type Fan struct {
	*A
	Fan *service.Fan
}

func NewFan

func NewFan(info Info) *Fan

NewFan returns a fan accessory.

type Faucet

type Faucet struct {
	*A
	Faucet *service.Faucet
}

func NewFaucet

func NewFaucet(info Info) *Faucet

NewFaucet returns an outlet accessory.

type GarageDoorOpener

type GarageDoorOpener struct {
	*A
	GarageDoorOpener *service.GarageDoorOpener
}

func NewGarageDoorOpener

func NewGarageDoorOpener(info Info) *GarageDoorOpener

NewGarageDoorOpener returns a garage door opener accessory.

type Heater

type Heater struct {
	*A
	Heater *service.Heater
}

func NewHeater

func NewHeater(info Info) *Heater

NewHeater returns a heater accessory.

type Humidifier

type Humidifier struct {
	*A
	Humidifier *service.Humidifier
}

func NewHumidifier

func NewHumidifier(info Info) *Humidifier

NewHumidifier returns an outlet accessory.

type Info

type Info struct {
	Name         string
	SerialNumber string
	Manufacturer string
	Model        string
	Firmware     string
}

type Lightbulb

type Lightbulb struct {
	*A
	Lightbulb *service.Lightbulb
}

func NewLightbulb

func NewLightbulb(info Info) *Lightbulb

NewLightbulb returns an light bulb accessory.

type MotionSensor added in v0.0.29

type MotionSensor struct {
	*A
	MotionSensor *service.MotionSensor
}

func NewMotionSensor added in v0.0.29

func NewMotionSensor(info Info) *MotionSensor

NewMotionSensor returns a motion sensor.

type Outlet

type Outlet struct {
	*A
	Outlet *service.Outlet
}

func NewOutlet

func NewOutlet(info Info) *Outlet

NewOutlet returns an outlet accessory.

type SecuritySystem

type SecuritySystem struct {
	*A
	SecuritySystem *service.SecuritySystem
}

func NewSecuritySystem

func NewSecuritySystem(info Info) *SecuritySystem

NewSecuritySystem returns a security system accessory.

type Switch

type Switch struct {
	*A
	Switch *service.Switch
}

func NewSwitch

func NewSwitch(info Info) *Switch

NewSwitch returns a switch which implements model.Switch.

type Television

type Television struct {
	*A
	Television *service.Television
	Speaker    *service.Speaker
}

func NewTelevision

func NewTelevision(info Info) *Television

NewTelevision returns a television accessory.

type Thermometer

type Thermometer struct {
	*A
	TempSensor *service.TemperatureSensor
}

func NewTemperatureSensor

func NewTemperatureSensor(info Info) *Thermometer

NewTemperatureSensor returns a Thermometer which implements model.Thermometer.

type Thermostat

type Thermostat struct {
	*A
	Thermostat *service.Thermostat
}

func NewThermostat

func NewThermostat(info Info) *Thermostat

NewThermostat returns a Thermostat accessory.

type Window

type Window struct {
	*A
	Window *service.Window
}

func NewWindow

func NewWindow(info Info) *Window

NewWindow returns a window accessory.

type WindowCovering

type WindowCovering struct {
	*A
	WindowCovering *service.WindowCovering
}

func NewWindowCovering

func NewWindowCovering(info Info) *WindowCovering

NewWindowCovering returns a window accessory.

Jump to

Keyboard shortcuts

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