eufy-mega / model/capabilities / InboundSignal
Type Alias: InboundSignal
ts
type InboundSignal =
| {
deviceSn?: string;
eventName?: string;
eventType?: number;
payload: Record<string, unknown>;
source: "push";
stationSn?: string;
thumbnailUrl?: string;
}
| object & CapabilityFrame
| {
deviceSn: string;
from?: string;
params: Record<number, string>;
paramType: number;
source: "poll";
to?: string;
}
| {
deviceSn?: string;
frame?: DpInboundFrame;
raw: unknown;
source: "mqtt";
topic?: string;
};A transport-neutral inbound signal — the dual of Command. Device events reach the SDK from three sources; a capability's CapabilityModule.decodeEvent normalizes ANY of them into one semantic CapabilityEvent (motion, doorbellPress, lockState, ptzNotify, …), so the consumer never has to know which transport delivered it:
push— an FCM notification, already normalized: a numericeventType+ optional thumbnail.p2p-frame— a live P2P frame (the oldCapabilityFrame; whatdecodeFrameconsumed).poll— a cloud param that changed between polls (paramTypefrom→to).