import "code.pfad.fr/gohmekit/discovery"
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) )
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 }
Announce the service on the network.