Events Reference
Events are data payloads published by devices. Each device definition declares the event types it can emit, along with the schema for each event’s payload. Events flow from devices through RabbitMQ to Vesbite, where they can trigger workflows or be viewed in the UI.
Event Structure
Every event defined on a device has the following properties:
| Property | Type | Description |
|---|---|---|
name | string | Machine-readable identifier (e.g., tagread) |
displayName | string | Human-readable label shown in the UI (e.g., “Tag Read”) |
description | string | Explanation of what this event represents |
payloadSchema | JSON | JSON Schema describing the event’s data fields |
Event Flow
Device RabbitMQ Vesbite Server Workflows
| | | |
|-- publish event -->| | |
| |-- route to queue -------->| |
| | |-- publish MassTransit |
| | | DeviceEvent ------->|
| | | |-- trigger matching
| | | | workflow instances- The device publishes an event to RabbitMQ on the topic exchange
vesbite.deviceswith routing keydevices.{deviceId}.events.{eventType}. - The Vesbite event listener consumes the message from the
vesbite-device-eventsqueue. - The listener extracts the
tenantIdandpayloadfrom the message, wraps them in aDeviceEvent, and publishes it to MassTransit. - Any workflow with a matching Device Event trigger evaluates and, if conditions are met, begins execution.
Event Payload Envelope
The raw message the device publishes contains an envelope:
{
"tenantId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"deviceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"payload": {
"epc": "E2801170000002145A8B6021",
"rssi": -52,
"antenna": 1
}
}The payload field contains the event-specific data defined by the device’s payloadSchema. Vesbite extracts this inner payload before passing it to workflows.
Common RFID Reader Events
tagread
Emitted when a single RFID tag is read by the reader.
Payload:
| Field | Type | Description |
|---|---|---|
epc | string | Electronic Product Code of the tag |
tid | string | Tag Identifier (unique hardware ID) |
rssi | number | Received Signal Strength Indicator in dBm |
antenna | number | Antenna port number that read the tag |
readCount | number | Number of times this tag was seen in the reporting interval |
timestamp | string | ISO 8601 timestamp of the read |
Example payload:
{
"epc": "E2801170000002145A8B6021",
"tid": "E2801170200060A714011811",
"rssi": -52,
"antenna": 1,
"readCount": 3,
"timestamp": "2026-03-20T10:30:00.123Z"
}tagreads
Emitted as a batch when the reader reports multiple tags at once. This is the more common event for high-throughput reading.
Payload:
| Field | Type | Description |
|---|---|---|
tags | array | Array of tag read objects |
tags[].epc | string | Electronic Product Code |
tags[].tid | string | Tag Identifier |
tags[].rssi | number | Signal strength in dBm |
tags[].antenna | number | Antenna port number |
tags[].readCount | number | Read count in reporting interval |
count | number | Total number of tags in this batch |
timestamp | string | ISO 8601 timestamp of the batch |
Example payload:
{
"tags": [
{ "epc": "E2801170000002145A8B6021", "tid": "E2801170200060A714011811", "rssi": -52, "antenna": 1, "readCount": 3 },
{ "epc": "E280117000000214CC405F22", "tid": "E2801170200060A714011812", "rssi": -48, "antenna": 2, "readCount": 1 }
],
"count": 2,
"timestamp": "2026-03-20T10:30:01.000Z"
}gpiochange
Emitted when a General Purpose Input (GPI) pin changes state.
Payload:
| Field | Type | Description |
|---|---|---|
pin | number | GPI pin number |
state | boolean | true for high, false for low |
previousState | boolean | Previous state of the pin |
timestamp | string | ISO 8601 timestamp of the state change |
Example payload:
{
"pin": 1,
"state": true,
"previousState": false,
"timestamp": "2026-03-20T10:30:05.000Z"
}Consuming Events in Workflows
As a Trigger
Add a Device Event trigger node to your workflow. Select the device definition and event type. When that event fires, the workflow starts and the event payload is available as the trigger’s output.
Optionally filter to a specific device by selecting it in the Device dropdown. Leave it empty to trigger on events from any device of that type.
Accessing Event Data
In downstream workflow nodes, access the event payload via expressions:
{{ output("triggerActivityId").epc }}
{{ output("triggerActivityId").rssi }}
{{ output("triggerActivityId").antenna }}For batch events:
{{ output("triggerActivityId").tags }}
{{ output("triggerActivityId").count }}The trigger output contains the unwrapped payload fields directly – there is no extra payload wrapper in the expression context.
See Also
- Actions Reference – Commands sent to devices
- Settings Reference – Configurable device parameters
- Workflow Nodes Reference – Device Event trigger node
- Vex Expressions Reference – Accessing event data in expressions