mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-10-05 08:16:55 +08:00
Add support HomeKit doorbells
This commit is contained in:
@@ -71,7 +71,8 @@ func discovery() ([]*api.Source, error) {
|
|||||||
err := mdns.Discovery(mdns.ServiceHAP, func(entry *mdns.ServiceEntry) bool {
|
err := mdns.Discovery(mdns.ServiceHAP, func(entry *mdns.ServiceEntry) bool {
|
||||||
log.Trace().Msgf("[homekit] mdns=%s", entry)
|
log.Trace().Msgf("[homekit] mdns=%s", entry)
|
||||||
|
|
||||||
if entry.Complete() && entry.Info[hap.TXTCategory] == hap.CategoryCamera {
|
category := entry.Info[hap.TXTCategory]
|
||||||
|
if entry.Complete() && (category == hap.CategoryCamera || category == hap.CategoryDoorbell) {
|
||||||
source := &api.Source{
|
source := &api.Source{
|
||||||
Name: entry.Name,
|
Name: entry.Name,
|
||||||
Info: entry.Info[hap.TXTModel],
|
Info: entry.Info[hap.TXTModel],
|
||||||
|
@@ -31,8 +31,9 @@ const (
|
|||||||
StatusPaired = "0"
|
StatusPaired = "0"
|
||||||
StatusNotPaired = "1"
|
StatusNotPaired = "1"
|
||||||
|
|
||||||
CategoryBridge = "2"
|
CategoryBridge = "2"
|
||||||
CategoryCamera = "17"
|
CategoryCamera = "17"
|
||||||
|
CategoryDoorbell = "18"
|
||||||
|
|
||||||
StateM1 = 1
|
StateM1 = 1
|
||||||
StateM2 = 2
|
StateM2 = 2
|
||||||
|
Reference in New Issue
Block a user