Skip to content

@mega-yfue/eufy-sdk / PushClient

Class: PushClient ​

Extends ​

  • EventEmitter

Constructors ​

Constructor ​

ts
new PushClient(creds, logger?): PushClient;

Parameters ​

creds ​

FcmCredentials

logger? ​

Logger = noopLogger

Returns ​

PushClient

Overrides ​

EventEmitter.constructor

Methods ​

close() ​

ts
close(): void;

Returns ​

void


connect() ​

ts
connect(): void;

Open the MCS connection and log in.

servername is passed explicitly: Node sends SNI only when told to, never deriving it from host, and this endpoint answers a connection without SNI with a self-signed certificate naming invalid2.invalid — which now fails the handshake rather than being accepted. Verification matters because the login request carries the account's securityToken, and an unverified peer could both read it and inject forged pushes into the event path.

Returns ​

void


getPersistentIds() ​

ts
getPersistentIds(): string[];

Returns ​

string[]


setPersistentIds() ​

ts
setPersistentIds(ids): void;

Persistent ids already seen (set this from storage to avoid re-delivery).

Parameters ​

ids ​

string[]

Returns ​

void

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