Dominevo
ReferenceDevice capabilities

doorbell

Doorbell button cap.

Doorbell button cap. Two kinds of provider serve it, and to every consumer they are the same cap:

  • Native providers, registered per device by a driver addon through ctx.registerNativeCap — a DeviceType.Button accessory with role: DeviceRole.Doorbell, or the camera itself (Reolink registers at camera level). They emit onPressed on every firmware ring.
  • A composed doorbell: a camera's customization gives it the cap, its lastPressedAt rising from the sources the operator assigned in Customize → Doorbell, and the composer emits onPressed from that field's advance (fromState).

The DeviceEventPropagator re-emits onPressed on the camera parent.

At a glance

Capabilitydoorbell
Provided byThe device's own driver provides it: each device registers its own provider.
Active providers per deviceone
Device typesbutton, camera
Sourcepackages/types/src/capabilities/doorbell.cap.ts

Methods

This capability declares no methods.

Runtime state

The state Dominevo keeps for each device with this capability, readable without calling the provider.

Runtime-state slice — last press timestamp + lifetime press count. Mirrored by the kernel and readable via device.state.doorbell.value. UIs can show "last ring 5m ago" without subscribing.

FieldTypeRequiredDescription
lastPressedAtnumber | nullyesMs epoch of the last press. null = never observed since this provider started.
pressCountSinceStartnumberyesCounter since provider start. Resets on reboot. Useful for metrics/debug.

Events

onPressed

Fires once per physical press. Reolink delivers via Baichuan push (ReolinkSimpleEvent.type === 'doorbell'). There is no release/duration — it's a pulse.

FieldTypeRequiredDescription
deviceIdnumberyes
timestampnumberyes