Skip to content

@mega-yfue/eufy-sdk / LiveTrace

Type Alias: LiveTrace

ts
type LiveTrace = 
  | {
  action: "start" | "keepalive";
  level2: boolean;
  phase: "media-command";
  topology: "attached" | "own";
}
  | {
  action: "start";
  phase:   | "media-command-ack"
     | "media-command-retry"
     | "media-command-unacknowledged";
}
  | {
  accepted: boolean;
  phase: "first-video-command";
  signCode: number;
}
  | {
  keyframe: boolean;
  phase: "first-video-unit";
}
  | {
  phase: "first-keyframe";
}
  | {
  media: "audio" | "video";
  phase: "first-foreign-media-command";
}
  | {
  phase: "video-decode-empty";
  signCode: number;
}
  | {
  dataType: number;
  phase: "datagram-gap";
}
  | {
  dataType: number;
  phase: "sequence-restart";
}
  | {
  phase: "level2-wait";
  waitMs: number;
}
  | {
  cipherId: number;
  phase: "level2-ready";
}
  | {
  phase: "level2-absent";
  waitedMs: number;
}
  | {
  deadlineMs: number;
  phase: "warming";
  retryMs: number;
}
  | {
  phase: "media-command-unsent";
  reason: "level2-key" | "address";
}
  | {
  phase: "path-stale";
  silentMs: number;
};

One bounded startup observation.

Union Members

Type Literal

ts
{
  action: "start" | "keepalive";
  level2: boolean;
  phase: "media-command";
  topology: "attached" | "own";
}

A media start or keepalive was sent, with the topology and encryption level it was sent under.


Type Literal

ts
{
  action: "start";
  phase:   | "media-command-ack"
     | "media-command-retry"
     | "media-command-unacknowledged";
}

The device acknowledged a retained start, or that start was repeated / abandoned unacknowledged.


Type Literal

ts
{
  accepted: boolean;
  phase: "first-video-command";
  signCode: number;
}

The first inbound video command, and whether this stream's channel filter accepted it.


Type Literal

ts
{
  keyframe: boolean;
  phase: "first-video-unit";
}

The first reassembled video access unit, and whether it was decodable on its own.


Type Literal

ts
{
  phase: "first-keyframe";
}

The first keyframe reached the consumer.


Type Literal

ts
{
  media: "audio" | "video";
  phase: "first-foreign-media-command";
}

Media tagged for another camera on the same station arrived first.


Type Literal

ts
{
  phase: "video-decode-empty";
  signCode: number;
}

A video payload decoded to nothing, so no access unit could be built from it.


Type Literal

ts
{
  dataType: number;
  phase: "datagram-gap";
}

A datagram was missing on a data channel, discarding the logical frame being reassembled.


Type Literal

ts
{
  dataType: number;
  phase: "sequence-restart";
}

A data channel's numbering restarted mid-connection, so sequencing resynchronized onto it.


Type Literal

ts
{
  phase: "level2-wait";
  waitMs: number;
}

A live start is holding for the station's level-2 key, with the milliseconds it will wait.

The first of three phases that account for the wait before any media command is sent. A start that looks slow is either waiting here, waiting for the station to serve the channel it was asked for, or being re-issued — and only these separate them.


Type Literal

ts
{
  cipherId: number;
  phase: "level2-ready";
}

The station's level-2 key was negotiated, under the cipher it selected.


Type Literal

ts
{
  phase: "level2-absent";
  waitedMs: number;
}

The level-2 key did not arrive in its grace, so the start proceeds at level 1 or not at all.


Type Literal

ts
{
  deadlineMs: number;
  phase: "warming";
  retryMs: number;
}

A shared source began warming, with the interval it re-issues on and the deadline it fails at.


Type Literal

ts
{
  phase: "media-command-unsent";
  reason: "level2-key" | "address";
}

A media command was never put on the wire, and what it was missing.

The attached media start has no level-1 form, so without the station's level-2 key there is nothing to send. A command that was never sent is otherwise indistinguishable from one the station ignored, which is the difference between a key that never arrived and a station that is not answering.


Type Literal

ts
{
  phase: "path-stale";
  silentMs: number;
}

This connection's path has stopped answering the heartbeat, with how long it has been silent.

The station answers every PING with a PONG, so silence past several heartbeats is the path being gone. Stated only where a pong arrived: a station that has never answered says nothing by not answering now.

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.