Skip to main content

SignalR Streaming

Beacon Tower provides real-time push notifications over SignalR, enabling dashboards and integrations to receive live asset telemetry and alarm updates without polling.

Overview​

SignalR streaming is the recommended approach for applications that need low-latency, real-time asset data — operational dashboards, live monitoring UIs, and event-driven integrations.

Connection Flow​

Client Application
↓
POST /push/negotiate (obtain connection URL + token)
↓
Connect to SignalR hub (WebSocket)
↓
POST /push/subscription (subscribe to asset data)
↓
Receive real-time telemetry and alarm updates

1. Negotiate Connection​

Obtain a SignalR connection URL and access token:

curl -X POST https://api.beacontower.ai/push/negotiate \
-H "Authorization: Bearer $TOKEN"

Response:

{
"url": "wss://beacon-signalr.service.signalr.net/client/?hub=push",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Use the returned url and accessToken to establish a SignalR client connection.

2. Subscribe to Assets​

Once connected, create a subscription to receive updates:

curl -X POST https://api.beacontower.ai/push/subscription \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"connectionId": "your-signalr-connection-id",
"topic": "telemetry",
"assets": ["pump-001", "pump-002"],
"samplingType": "none"
}'
FieldTypeRequiredDescription
connectionIdstringYesYour SignalR connection identifier
topicstringYes"telemetry" or "alarm"
assetsstring[]YesAsset IDs to monitor
samplingTypestringYes"none" (all updates) or "first" (first per interval)

Response:

{
"subscriptionId": "sub-12345",
"expiresAt": "2026-02-25T15:13:00Z"
}

3. Manage Subscriptions​

Subscriptions have a TTL of 600 seconds (10 minutes). Renew them to keep receiving updates.

# Renew
PUT /push/subscription/{subscriptionId}

# Get details
GET /push/subscription/{subscriptionId}

# Unsubscribe
DELETE /push/subscription/{subscriptionId}

Subscription Topics​

TopicUpdates
telemetryTelemetry data from subscribed assets
alarmAlarm raised/cleared notifications from subscribed assets

Sampling Types​

TypeBehaviorUse Case
noneSend all updates immediatelyReal-time monitoring, event-driven logic
firstSend only the first update per sampling windowReduced bandwidth, periodic display updates

When to Use SignalR vs REST​

  • SignalR — Browser-based applications, web dashboards, UIs built with JavaScript/TypeScript. Uses WebSocket transport, integrates natively with ASP.NET Core and JavaScript SignalR clients.
  • REST API — Historical analysis, batch queries, aggregated timeseries. Request-response pattern, no persistent connection needed.

Next Steps​