Skip to content

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 numeric eventType + optional thumbnail.
  • p2p-frame — a live P2P frame (the old CapabilityFrame; what decodeFrame consumed).
  • poll — a cloud param that changed between polls (paramType from→to).

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.