discovery

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown            = Category(0)
	Other              = Category(1)
	Bridge             = Category(2)
	Fan                = Category(3)
	GarageDoorOpener   = Category(4)
	Lightbulb          = Category(5)
	DoorLock           = Category(6)
	Outlet             = Category(7)
	Switch             = Category(8)
	Thermostat         = Category(9)
	Sensor             = Category(10)
	SecuritySystem     = Category(11)
	Door               = Category(12)
	Window             = Category(13)
	WindowCovering     = Category(14)
	ProgrammableSwitch = Category(15)
	IPCamera           = Category(17)
	VideoDoorbell      = Category(18)
	AirPurifier        = Category(19)
	Heater             = Category(20)
	AirConditioner     = Category(21)
	Humidifier         = Category(22)
	Dehumidifier       = Category(23)
	Sprinklers         = Category(28)
	Faucets            = Category(29)
	ShowerSystems      = Category(30)
	Television         = Category(31)
	RemoteControl      = Category(32)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category uint16

type Service

type Service struct {
	// Name of the service on _hap._tcp.local
	Name string
	// ModelName of the accessory (e.g. ”Device1,1”).
	ModelName string
	// Port where the TCP server is listening
	Port int
	// Device ID must be formatted as ”XX:XX:XX:XX:XX:XX”, where ”XX”
	// is a hexadecimal string representing a byte.
	// This value is also used as the accessoryʼs Pairing Identifier.
	DeviceID string
	// VersionWatcher gives the initial version value and hooks a watcher callback
	VersionWatcher func(func(uint16)) uint16
	// IsPairedWatcher gives the initial IsPaired value and hooks a watcher callback
	IsPairedWatcher func(func(bool)) bool
	// Category of the accessory being announced
	Category Category
}

func (Service) Announce

func (s Service) Announce(ctx context.Context) (context.CancelFunc, error)

Announce the service on the network.

Jump to

Keyboard shortcuts

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