The system distinguishes between Nodes (the ESPresense hardware performing scanning) and Devices (the BLE tags being tracked).
Node
Represents an ESPresense hardware unit. It includes telemetry (version, IP), cpu and flavor information, and its own physical location. It tracks which floors it is assigned to and maintains a map of nodes (other nodes) it can see, including dist (distance), var (variance), and lh (likelihood).
Device
Represents a tracked BLE entity. It includes its current room and floor, its calculated location (x, y, z), and tracking metrics like confidence, scale, fixes, and timeout. It also tracks rssi@1m and measuredRssi@1m values.
export interface Node {
telemetry: { version: string; ip: string; };
cpu: CPU;
flavor: Flavor;
online: boolean;
id: string;
name: string;
location: { x: number; y: number; z: number };
floors: string[];
nodes: { [index: string]: { dist: number; var: number; lh: number } };
sourceType: 'Config' | 'Discovered';
}
export interface Device {
id: string;
name: string;
nodes: { [index: string]: { dist: number; var: number; lh: number } };
room: { id: string; name: string };
floor: { id: string; name: string };
location: { x: number; y: number; z: number };
confidence: number;
scale: number;
fixes: number;
timeout: number;
lastSeen: Date;
'rssi@1m'?: number | null;
'measuredRssi@1m': number | null;
isAnchored?: boolean;
}