Event payloads and field definitions - OnSight Knowledgebase

Event payloads and field definitions

Back to API & integrations — Data reference Browse product

These examples are illustrative SignalR event-body excerpts with fictional identifiers. They are not webhook payload specifications. The current hub configuration uses numeric enums, whereas HTTP responses use string enum names.

Sensor reading: HardwareSensorUpdate

{
  "reportedTime": "2026-10-13T01:02:03Z",
  "hardwareId": "11111111-1111-4111-8111-111111111111",
  "assetId": "22222222-2222-4222-8222-222222222222",
  "zoneId": "33333333-3333-4333-8333-333333333333",
  "siteId": "44444444-4444-4444-8444-444444444444",
  "location": "Chiller 1",
  "sensorData": [
    {
      "updated": "2026-10-13T01:02:03Z",
      "type": 1,
      "gatewayId": null,
      "values": [
        { "type": 3, "value": 4.6 }
      ]
    }
  ]
}
Field Meaning
reportedTime Timestamp derived from the upstream reading's Received field; not your client's receipt time.
hardwareId Command hardware identifier.
assetId Monitored asset identifier.
zoneId, siteId Associated zone and site; may be null.
location Location description, when available.
sensorData[].updated Timestamp derived from the upstream Received field.
sensorData[].type Sensor-group enum. Temperature is 1.
sensorData[].gatewayId Associated Command gateway identifier, when available.
values[].type Measurement enum. Temperature is 3.
values[].value Numeric measurement in the unit associated with its measurement type.

Sensor-group and measurement enums are different. Do not interpret both type fields using the same enum.

Common measurement units

Measurement Numeric value type Unit
Temperature 3 °C
Humidity 4 %
Battery 5 %
CO₂ 20 ppm
Illuminance 22 lx

No separate unit field is supplied.

Values may also contain nullable calibrationLow, calibrationRange, referenceLow and referenceRange fields. Do not apply a second calibration calculation without a verified conversion contract.

Breach alert: AlertBreach

{
  "id": "55555555-5555-4555-8555-555555555555",
  "correlationId": "66666666-6666-4666-8666-666666666666",
  "companyId": "77777777-7777-4777-8777-777777777777",
  "assetId": "22222222-2222-4222-8222-222222222222",
  "name": "High temperature",
  "code": "TEMP_HIGH",
  "occurred": "2026-10-13T01:02:03Z",
  "ended": null,
  "alertConditions": [
    { "type": 3, "comparison": 0, "breachValue": 8.0, "actualValue": 9.2 }
  ]
}
  • id: breach record identifier.
  • correlationId: correlation identifier carried with the breach.
  • companyId, assetId: associated Command company and asset.
  • name, code: alert labels.
  • occurred: breach start timestamp.
  • ended: end timestamp when supplied.
  • alertConditions[].type: measurement type.
  • comparison: 0 = Above, 1 = Below, 2 = Equals.
  • breachValue: configured threshold.
  • actualValue: reported breach value.

Threshold and actual value use the measurement's unit. This example compares temperatures in °C.

Zone change: AssetZoneUpdate

{
  "assetId": "22222222-2222-4222-8222-222222222222",
  "zoneId": "33333333-3333-4333-8333-333333333333",
  "start": "2026-10-13T01:00:00Z",
  "end": null
}

assetId and zoneId identify the asset and zone. start and end describe the zone interval. A null end means no end timestamp is supplied.

The payload has no explicit previous-zone field or enter/exit action. It is delivered to the corresponding zone subscription.

Timestamps and tolerant consumers

Examples use UTC timestamps with Z. Preserve offsets when parsing and use local time only for display. Store your own receipt timestamp if you need to measure arrival delays.

Examples omit some nullable metadata and inherited fields. Consumers should tolerate additional fields.

Review before publication

Validate sample encoding against the deployed SignalR hub, confirm timestamp semantics for each device source, and verify calibration/reference conversion behaviour before documenting formulas.

More in this category

Related guides for this topic.

Need a hand?

Tell us which product you use, what you’re trying to do, and what happened.

Contact support