accessory

package
v1.0.34 Latest Latest
Warning

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

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

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 AirQualitySensor

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

func NewAirQualitySensor

func NewAirQualitySensor(info Info) *AirQualitySensor

NewAirQualitySensor returns a AirQualitySensor which implements model.AirQualitySensor.

type Bridge

type Bridge struct {
	*A
	ServiceLabel *service.ServiceLabel
}

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 CarbonDioxideSensor

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

func NewCarbonDioxideSensor

func NewCarbonDioxideSensor(info Info) *CarbonDioxideSensor

NewCarbonDioxideSensor returns a CarbonDioxideSensor which implements model.CarbonDioxideSensor.

type CarbonMonoxideSensor

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

func NewCarbonMonoxideSensor

func NewCarbonMonoxideSensor(info Info) *CarbonMonoxideSensor

NewCarbonMonoxideSensor return a CarbonMonoxideSensor which implements model.CarbonMonoxideSensor.

type ColorTemperatureLightbulb

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

func NewColorTemperatureLightbulb

func NewColorTemperatureLightbulb(info Info) *ColorTemperatureLightbulb

NewColorTemperatureLightbulb returns an ColorTemperatureLight bulb 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

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

func NewContactSensor

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 DimmerColorTemperatureLightbulb

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

func NewDimmerColorTemperatureLightbulb

func NewDimmerColorTemperatureLightbulb(info Info) *DimmerColorTemperatureLightbulb

NewDimmerColorTemperatureLightbulb returns an DimmerColorTemperatureLight bulb accessory.

type DimmerLightbulb

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

func NewDimmerLightbulb

func NewDimmerLightbulb(info Info) *DimmerLightbulb

NewLightbulb returns an light bulb 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 Heater_New

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

func NewHeater_New

func NewHeater_New(info Info) *Heater_New

NewHeater_New returns a heater_new accessory.

type Humidifier

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

func NewHumidifier

func NewHumidifier(info Info) *Humidifier

NewHumidifier returns an outlet accessory.

type HumiditySensor

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

func NewHumiditySensor

func NewHumiditySensor(info Info) *HumiditySensor

NewHumiditySensor returns a humidity which implements model.HumiditySensor.

type Info

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

type LightSensor

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

func NewLightSensor

func NewLightSensor(info Info) *LightSensor

NewLightSensor returns a LightSenor which implements model.LightSensor.

type Lightbulb

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

func NewLightbulb

func NewLightbulb(info Info) *Lightbulb

NewLightbulb returns an light bulb accessory.

type MotionSensor

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

func NewMotionSensor

func NewMotionSensor(info Info) *MotionSensor

NewMotionSensor returns a motion sensor.

type MultiParameterSensor

type MultiParameterSensor struct {
	*A
	TemperatureSensor     *service.TemperatureSensor
	HumiditySensor        *service.HumiditySensor
	AirQualityMultiSensor *service.AirQualityMultiSensor
	CarbonDioxideSensor   *service.CarbonDioxideSensor
}

func NewMultiParameterSensor

func NewMultiParameterSensor(info Info) *MultiParameterSensor

type OccupancySensor

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

func NewOccupancySensor

func NewOccupancySensor(info Info) *OccupancySensor

NewOccupancySensor returns a OccupancySensor which implements model.OccupancySensor.

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 VentilationSystem

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

func NewVentilationSystem

func NewVentilationSystem(info Info) *VentilationSystem

NewVentilationSystem returns an ventilation system 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