💾 Archived View for code.pfad.fr › gohmekit › discovery captured on 2023-12-28 at 15:35:24. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-08)

🚧 View Differences

-=-=-=-=-=-=-

discovery package - code.pfad.fr/gohmekit

import "code.pfad.fr/gohmekit/discovery"

Constants

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)
)

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.

Files

apple_category_gen.go

discovery.go

Breadcrumb

code.pfad.fr/gohmekit