Add HomeKit camera pairing support

- Add POST /api/homekit/pair endpoint that calls hap.Pair() from go2rtc
- Rewrite homekit.html with PIN input UI (XXX-XX-XXX format)
- Auto-advance between digit fields, paste support, error/success states
- On successful pairing, redirect to create.html with homekit:// URL
- Pass mdns_port and mdns_paired from probe to homekit.html
- Detect HomeKit cameras regardless of pairing status
This commit is contained in:
eduard256
2026-04-05 12:43:06 +00:00
parent e2e24c7578
commit a9820abc37
7 changed files with 397 additions and 84 deletions
+2
View File
@@ -393,6 +393,8 @@
if (probes.mdns.model) p.set('mdns_model', probes.mdns.model);
if (probes.mdns.category) p.set('mdns_category', probes.mdns.category);
if (probes.mdns.device_id) p.set('mdns_device_id', probes.mdns.device_id);
if (probes.mdns.port) p.set('mdns_port', probes.mdns.port);
p.set('mdns_paired', probes.mdns.paired ? '1' : '0');
}
window.location.href = 'homekit.html?' + p.toString();