Add ONVIF probe detector via unicast WS-Discovery
- Add ProbeONVIF() prober: sends unicast WS-Discovery to ip:3702, parses XAddrs, Name, Hardware from response (no auth needed) - Add ONVIFResult struct to probe models - Register ONVIF detector with highest priority (before HomeKit) - Fix homekit.html back-wrapper max-width to match design system
This commit is contained in:
@@ -33,6 +33,14 @@ func Init() {
|
||||
}
|
||||
|
||||
ports = loadPorts()
|
||||
// ONVIF detector (highest priority -- auto-discovers all streams)
|
||||
detectors = append(detectors, func(r *probe.Response) string {
|
||||
if r.Probes.ONVIF != nil {
|
||||
return "onvif"
|
||||
}
|
||||
return ""
|
||||
})
|
||||
|
||||
// HomeKit detector
|
||||
detectors = append(detectors, func(r *probe.Response) string {
|
||||
if r.Probes.MDNS != nil {
|
||||
@@ -115,6 +123,12 @@ func runProbe(parent context.Context, ip string) *probe.Response {
|
||||
resp.Probes.HTTP = r
|
||||
mu.Unlock()
|
||||
})
|
||||
run(func() {
|
||||
r, _ := probe.ProbeONVIF(fastCtx, ip)
|
||||
mu.Lock()
|
||||
resp.Probes.ONVIF = r
|
||||
mu.Unlock()
|
||||
})
|
||||
|
||||
wg.Wait()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user