Skip to content

eufy-mega / model/capabilities / DeviceEventMap

Interface: DeviceEventMap

The typed event surface, keyed by semantic event name → payload type. THE projection point for events (the sibling of DeviceActionMap): a capability that emits a new event name adds one line here. EufyMega's typed on/once/off/emit overloads are derived from this map, so eufy.on("motion", e => e.deviceSn) autocompletes the name and types the payload. Names MUST match the module emit: / decodeEvent event: strings.

Properties

alarm

ts
alarm: PushSemanticEvent & object;

Station alarm lifecycle; phase says whether it fired or is counting down.

Type Declaration

phase?
ts
optional phase?: "triggered" | "delayed";

armingModeChanged

ts
armingModeChanged: PushSemanticEvent;

The guard mode changed. Carries no mode value — re-read the current mode.


batteryAlert

ts
batteryAlert: PushSemanticEvent & object;

Battery alert — state discriminates low / hot / full.

Type Declaration

state?
ts
optional state?: "low" | "hot" | "full";

batteryLevel

ts
batteryLevel: PollSemanticEvent;

Battery level changed (poll). to is the new 0–100 level.


contactState

ts
contactState: PushSemanticEvent & PollSemanticEvent & object;

Entry sensor opened/closed. Arrives via push (seconds) or cloud poll (minutes), which carry the state under different raw keys — read open, which both normalise to. Absent when the signal carried no contact value, so undefined means "not reported here", not "closed".

Type Declaration

open?
ts
optional open?: boolean;

cryingDetected

ts
cryingDetected: PushSemanticEvent;

Crying detected (indoor/baby-monitor families).


dogDetected

ts
dogDetected: PushSemanticEvent & object;

A dog was detected; kind distinguishes the licking/fouling sub-events when the device reports one.

Type Declaration

kind?
ts
optional kind?: "lick" | "poop";

doorbellPress

ts
doorbellPress: PushSemanticEvent;

Doorbell button pressed.


lockState

ts
lockState: PushSemanticEvent;

Lock (un)locked or a lock alarm fired.


motion

ts
motion: PushSemanticEvent;

Motion detected (camera / PIR sensor).


packageDelivered

ts
packageDelivered: PushSemanticEvent;

A package was delivered (drop/porch).


packageStranded

ts
packageStranded: PushSemanticEvent;

A delivered package has been left unattended too long.


packageTaken

ts
packageTaken: PushSemanticEvent;

A previously-delivered package was taken.


personDetected

ts
personDetected: PushSemanticEvent;

A recognized/known or stranger person detected.


petDetection

ts
petDetection: PushSemanticEvent;

Pet detected.


ptzNotify

ts
ptzNotify: SemanticEventBase & object;

Pan/tilt status streamed while the camera moves.

Type Declaration

coords?
ts
optional coords?: [number, number][];
kind
ts
kind: "zoom" | "rotate" | "position";
payload?
ts
optional payload?: unknown;

smartLightState

ts
smartLightState: SemanticEventBase & object;

A eufy_life smart light reported its state (secure-MQTT DP status report). Every field is optional: a report carries only the fields the device sent, and an absent one is silence about that field rather than a change to it.

Type Declaration

brightness?
ts
optional brightness?: number;
cloudEffectId?
ts
optional cloudEffectId?: number;
colorGradient?
ts
optional colorGradient?: boolean;
effectId?
ts
optional effectId?: number;
lightLength?
ts
optional lightLength?: number;
power?
ts
optional power?: boolean;

soundDetected

ts
soundDetected: PushSemanticEvent;

Sound above the configured threshold.


strangerDetected

ts
strangerDetected: PushSemanticEvent;

A person the device does NOT recognise (distinct from personDetected).


vehicleDetected

ts
vehicleDetected: PushSemanticEvent;

A vehicle was detected.

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations or eufy. "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.