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— aDeviceType.Buttonaccessory withrole: DeviceRole.Doorbell, or the camera itself (Reolink registers at camera level). They emitonPressedon every firmware ring. - A composed doorbell: a camera's customization gives it the cap, its
lastPressedAtrising from the sources the operator assigned in Customize → Doorbell, and the composer emitsonPressedfrom that field's advance (fromState).
The DeviceEventPropagator re-emits onPressed on the camera parent.
At a glance
| Capability | doorbell |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | button, camera |
| Source | packages/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.
| Field | Type | Required | Description |
|---|---|---|---|
lastPressedAt | number | null | yes | Ms epoch of the last press. null = never observed since this provider started. |
pressCountSinceStart | number | yes | Counter 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.
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | number | yes | |
timestamp | number | yes |
do-not-disturb
do-not-disturb - whether a speaker or display holds back its own sounds (announcements, notifications, alarms) until the operator lets it speak again.
energy-system
Energy system (#513): the one READ-ONLY cap of a home energy installation — solar production, the grid connection, the house, a heat pump where the system meters one, and the storage.