Edge Bridges
Edge bridges let Vistralio reach devices on remote LANs without inbound port-forwarding.
Current model
There are now two related objects:
- Areas: logical locations used by devices and dashboard grouping
- Edge Routers: actual bridge identities/tokens/devices
An edge router has:
- one primary area
- optional additional areas
- a pinned device fingerprint
- a live metrics payload
Enrolment flow
- Create the Area
- Create the Edge Router
- Assign one or more areas to that router
- Copy the full install command shown in the admin panel — it includes the server URL and token pre-filled
- Run the install command on the bridge device
New edge routers connect through wss://connect.vistralio.co.uk/api/edge/ws. The install
command in Admin → Setup → Edge Routers always reflects the current API hostname setting.
Metrics and health
The bridge reports:
- hostname / platform
- public IP
- internal IP
- latency
- CPU / RAM / disk metrics
These are surfaced in the dashboard and edge router admin pages.
Stream handling
Bridge streaming is split from the main API:
vistralio-media(:8200) manages bridge tunnel lifecycle- the bridge host authenticates to the remote device
- the central server consumes a local proxy URL
- latest frames are written atomically to
/dev/shm/vistralio/cam_{id}.jpg— live view clients read the shared file instead of opening a third RTSP connection (most bridge cameras allow max 2 simultaneous connections)
This is important for devices that do not behave well when the server tries to negotiate RTSP auth directly across the WAN path.
Recovery behavior
Bridge camera recovery now runs on both sides:
- the bridge detects stalled camera streams
- the media service detects stale local frames
- either side can force a fresh tunnel/session
Reconnect timing on the bridge is:
- attempts 1-30: every 5 seconds
- attempts 31-60: every 15 seconds
- attempts 61+: every 30 seconds
Two-way audio
Talkback for supported device types also works over the bridge path. Vistralio opens the configured talkback path through the bridge instead of opening it directly from the main server.
Doorbells
Bridge-connected doorbells can report doorbell_press events back into the
main event pipeline.
Remote commands
From Admin → Edge Routers, you can send remote commands to a connected bridge. Commands are only available when the router is online.
| Command | Effect |
|---|---|
update |
Pull latest bridge software update |
restart |
Restart the bridge agent |
reboot |
Full device reboot |
Command sending requires the sites.command permission.
Metrics snapshot
Click Download metrics on any edge router in the admin panel to download a JSON snapshot of its current metrics, system information, and connection data. This is useful for support diagnostics.
The snapshot is available via GET /api/edge-routers/{id}/metrics-snapshot and requires sites.view.
Live stream architecture
All cameras (bridge and direct) write detect frames to /dev/shm/vistralio/cam_{id}.jpg using shared memory. The live viewer reads this shared file instead of opening a new RTSP connection. This is important for bridge cameras, which typically allow a maximum of two simultaneous RTSP connections.
Related API endpoints
GET /api/sitesPOST /api/sitesDELETE /api/sites/{id}GET /api/edge-routersPOST /api/edge-routersPUT /api/edge-routers/{id}POST /api/edge-routers/{id}/rotate-tokenPOST /api/edge-routers/{id}/command— send update/restart/reboot command (requiressites.command)GET /api/edge-routers/{id}/metrics-snapshot— download JSON metrics snapshot (requiressites.view)DELETE /api/edge-routers/{id}WS /api/edge/ws