Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
hc
✓ github.com/brutella/hc
Create and start a HomeKit accessory
package main
import (
"github.com/brutella/hc"
"github.com/brutella/hc/accessory"
)
func main() {
acc := accessory.NewSwitch(accessory.Info{Name: "My Switch"})
config := hc.Config{Pin: "00102003"}
t, _ := hc.NewIPTransport(config, acc.Accessory)
hc.OnTermination(t)
t.Start()
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.2.5latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.