Documentation ¶
Overview ¶
Package hk provides various types and helpers for Apple HomeKit® related entities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidCode = fmt.Errorf("invalid setup code")
ErrInvalidCode can be returned when the Code is not valid.
var ErrInvalidID = fmt.Errorf("invalid setup id")
ErrInvalidID can be returned when the ID is not valid.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category uint8
Category represents an Apple HomeKit® accessory category.
const ( CategoryUnknown Category = iota // Unknown CategoryOther // Other CategoryBridge // Bridge CategoryFan // Fan CategoryGarageDoorOpener // Garage Door Opener CategoryLightbulb // Lightbulb CategoryDoorLock // Door Lock CategoryOutlet // Outlet CategorySwitch // Switch CategoryThermostat // Thermostat CategorySensor // Sensor CategorySecuritySystem // Security System CategoryDoor // Door CategoryWindow // Window CategoryWindowCovering // Window Covering CategoryProgrammableSwitch // Programmable Switch CategoryIPCamera // IP Camera CategoryVideoDoorbell // Video Doorbell CategoryAirPurifier // Air Purifier CategoryHeater // Heater CategoryAirConditioner // Air Conditioner CategoryHumidifier // Humidifier CategoryDehumidifier // Dehumidifier CategorySprinklers // Sprinklers CategoryFaucets // Faucets CategoryShowerSystems // Shower Systems )
All available accessory categories.
type Code ¶
type Code uint32
Code represents an Apple HomeKit® setup code.
func (Code) Format ¶
Format returns the code in the Apple preferred format XXX-XX-XXX. If the code is not valid, it returns an empty string.
type Flag ¶
type Flag uint8
Flag represents an Apple HomeKit® setup flag. Setup flags indicate the supported pairing methods. However, Apple devices seem to ignore them and it doesn't matter which flags are set, if even.
All available setup flags.
func (Flag) String ¶
String returns a string representation of the flag.
It implements fmt.Stringer.
Directories ¶
Path | Synopsis |
---|---|
Package qr implements the creation of QR code based Apple HomeKit® setup codes and the respective payloads.
|
Package qr implements the creation of QR code based Apple HomeKit® setup codes and the respective payloads. |
Package text implements the creation of text based Apple HomeKit® setup codes.
|
Package text implements the creation of text based Apple HomeKit® setup codes. |