src.nth.io/

summaryrefslogtreecommitdiff
path: root/main/nvs_config.h
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-06-21 10:55:42 -0500
committerLuke Hoersten <[email protected]>2026-06-21 10:55:42 -0500
commit2ca1307b34b82a4b5e3e83b50c02e3a93b2c7227 (patch)
treee6e3d9cbad5f98801387a4dd68cab9846f502f21 /main/nvs_config.h
parent0bf731cfc966a7cfad0763f22f6196ebac3d16a0 (diff)
scrypted: subscribe to camera child devices (fix Unifi doorbell wake)
Unifi doorbell cameras expose the bell button as a child device of the camera (separate nativeId, its own BinarySensor interface), not as a property of the camera itself. The previous code did cam.listen() on the parent camera only, so motion + person events arrived (those fire on the camera itself) but bell-press events never reached handleCameraEvent. HomeKit kept working because Scrypted's HomeKit bridge auto-syncs all child devices; our plugin was silently the only consumer missing the event. Confirmed by the trace log in 3b0ab73 staying silent across a bell press while motion events still printed. Fix: in attachListener, walk systemManager.getDeviceIds() and pick any device with providerId === cam.id as an additional listen target. Subscribe on all of them with the same iface list — listen() no-ops on unsupported ifaces, so we don't have to introspect each child. Tracking changed from Map<nativeId, EventListenerRegister> to Map<nativeId, EventListenerRegister[]> so detach/script-reload cleanup removes every listener, not just the camera's.
Diffstat (limited to 'main/nvs_config.h')
0 files changed, 0 insertions, 0 deletions