The device simulator functionality in Admin Console allows you to manually generate events as if they were coming from any device in your Jetstream application. This is extremely helpful when first developing your integration to speed your testing and reduce the need for a large number of physical test devices.

The device simulator is not designed to be a replacement for physical test devices, for several reasons. The device simulator cannot generate every possible event, and the content and timing of the events is only as realistic as the data you enter. This guide is intended to help you generate realistic events, but it is still no replacement for a real device generating its own events when it comes to building a robust integration.

Preparing to Simulate Events

It is not recommended to simulate events from physical Terso device's that are generating their own actual events. This risks corrupting the data coming from the real device, and will most likely result in an unrealistic combination of events. Create devices specifically for the purpose of simulation.
  1. Log in to jetstreamrfid.com and go to your Profile
  2. On the Profile Details tab, check the "Developer Mode" checkbox to allow device simulation.
  3. Click "Save Changes"
  4. Go to the My Devices page
  5. Add a Device specifically for the purposes of simulating events. Enter any name, serial number, device definition, and region you wish.
  6. Enter the device page by clicking your newly added device's name.
  7. Select the "Simulate Device Events" button in the top right.

Event Simulator Workflow

The events a device can realistically send, and with what frequency, depends on the device type and it's firmware version. Don't hesitate to contact out systems integration team at sisupport@tersosolutions.com if you have questions about how to most realistically simulate the device's you are or will be using with your Jetstream application.

Sending the Simulated Event

After each sending any simulated event, a notification will appear at the top of the screen indicating either success (green) or failure (red). Failure typically indicates that invalid data or was entered. Review and correct the data and send again until a success is achieved.

Copy-pasting data from this article or other sources may result in additional lines being added to the device simulator fields, which will cause the simulated event to fail. Be sure to review and fix all formatting issues prior to sending.

Retrieving the Simulated Event

After successfully sending a simulated event, the event will be handled by Jetstream just as if it came from an actual device. Just like with real events, these simulated events are retrieved via the Get Events call via the API endpoint to see your simulated event. You can also immediately review the event by refreshing the page 2 seconds after a successful send and opening the events tab for the device. You may have to refresh again to give Admin Console time to process the event.

Events to Simulate w/ Examples

AggregateEvent

AggregateEvents are sent by all devices which can automatically detect the addition or removal of an RFID tag. An aggregate event can contain added Tag EPCs, removed Tag EPCs, a PassRFID value of the user who opened the device, or none of the above.

Device TypeOccursPassRFID?
Countertop CabinetAfter the door is closedNever
Directional PortalWhenever a tag passes all the way through the read zoneNever
EnclosureAfter the door is closedYes, except in case of pass reader or door lock failure.
HandheldNeverNever
Mobile CaseAfter the lid is closedNever
Read PointWhenever a tag enters or exits the read zoneNever
TrayWhenever a tag enters or exits the read zoneNever

Example

A user presents their pass to open a Terso RFID Cabinet, adds 1 item, and removes 3 items.Entries in jetstreamrfid.com Device Simulator:

FieldValue
Event Time<auto-filled with page load date/time>
Pass RFID8631526790
EPCs to Add645349000987653215654687
EPCs to Remove645349000187653215654688
645349000287653215654689
645349000387653215654681

Resulting Event in Jetstream:

{
	"Adds": [
		"645349000987653215654687"
	],
	"Type": "AggregateEvent",
	"Device": "MyDeviceName",
	"EventId": "d0e2e94a-4c93-4842-a2c9-860751266db4",
	"Removes": [
		"645349000187653215654688",
		"645349000287653215654689",
		"645349000387653215654681"
	],
	"Version": 2,
	"PassRfid": "8631526790",
	"EventTime": "2020-02-17T15:26:53Z",
	"ReceivedTime": "2020-02-17T15:26:54Z"
}

CommandCompletionEvent

CommandCompletionEvents are sent by devices when they have completed a received command. See the "Device Types" section of the API Documentation for a complete list of commands each device type can complete.For the Command ID field, enter any “CommandID” value of an already passed CommandQueuedEvent, which is generated immediately following a command.The value in the Output Parameters field can be any number of Name|Value pairs, or blank. For example, a Get All RFID Tags command will return each RFID tag entered as "EPC|654349000325986547854354", while for a Sync Credentials command, this field will be empty.The value in the Exception field can be any number of Name|Message pairs, or blank. For example, if there is a Command Time Out exception, ‘CommandTimedOut| Command timed out after 120 minutes’ can be given. This is by far the most common exception.

Device TypeOccurs
Countertop CabinetAfter the command is completed, or times out
Directional PortalAfter the command is completed, or times out
EnclosureAfter the command is completed, or times out
HandheldNever (No commands supported)
Mobile CaseAfter the command is completed, or times out
Read PointAfter the command is completed, or times out
TrayAfter the command is completed, or times out

Example

Send a Get ALL RFID Tags command (can be sent from the Inventory tab of the device) and receive a response body and a CommandQueuedEvent, both of which contain the Command ID. A simulated device must respond with a simulated list of RFID tags. Let's assume there are 2 tags "in" the device. Note: the commandcompletionevent will fail as a "400 BadRequest" if there is not already a queued command with a matching command ID in Jetstream.

FieldValue
Event Time<auto-filled with page load date/time>
Command ID<enter 36-character value from the command's response body or commandqueuedevent>
Output Parameters (Name|Value)EPC|645349000187653215654688EPC|645349000287653215654689
Exception (Name|Message)

Resulting Event in Jetstream:

{
	"Type": "CommandCompletionEvent",
	"Device": "MyDeviceName",
	"EventId": "63620c28-839e-479d-9069-a15b9055e130",
	"Version": 2,
	"CommandId": "83672201-b104-4af7-985c-c8eb832bcd57",
	"EventTime": "2020-02-17T15:58:45Z",
	"CommandName": "GetEPCListCommand",
	"ReceivedTime": "2020-02-17T15:59:47Z",
	"ExceptionList": [],
	"OutputParameterList": [
		{
			"Key": "EPC",
			"Value": "645349000187653215654688"
		},
		{
			"Key": "EPC",
			"Value": "645349000287653215654689"
		}
	]
}

HeartbeatEvent

HeartbeatEvents are sent on an automated schedule to show that the device is operating normally. Once an hour is the default schedule, but this cna be configured to be more or less frequent for most device types.

Device TypeDefault Frequency
Countertop CabinetHourly (Can be configured)
Directional PortalHourly (Can be configured)
EnclosureHourly (Can be configured)
HandheldNever (Cannot be configured)
Mobile CaseNever (Can be configured)
Read PointHourly (Can be configured)
TrayHourly (Can be configured)

Example

The device is online and sends in it's hourly heartbeat.

FieldValue
Event Time<auto-filled with page load date/time>

Resulting Event in Jetstream:

{
	"Type": "HeartbeatEvent",
	"Device": "MyDeviceName",
	"EventId": "f0e9f9c4-e38d-48bf-9ea5-e9e50f8765ab",
	"Version": 2,
	"EventTime": "2020-02-17T16:18:11Z",
	"ReceivedTime": "2020-02-17T16:19:14Z"
}

LogEntryEvent

LogEntryEvents are sent when a device records info to its system log. This can occur for a variety of reasons such as temperature error, invalid passes, antenna error, etc. The information is passed as a list of LogEntry quartets of values.

Device TypeOccurs
Countertop CabinetAny time
Directional PortalAny time
EnclosureAny time
HandheldNever
Mobile CaseAny time
Read PointAny time
TrayAny time

Example

The device records a temperature on temperature probe B that is above the SensorBLogEntryEventHighTemp or below the SensorBLogEntryEventLowTemp limits set in the device's policy. The actual temperature reading can be found in a SensorReadingEvent immediately preceding or following this LogEntryEvent.

Field

Value

Event Time

<auto-filled with page load date/time>

Log Entries (Level|LogTime|Message|Type)

Error|2020-02-17T10:33:50|Port B|Temperature

Resulting Event in Jetstream:

{
	"Type": "LogEntryEvent",
	"Device": "MyDeviceName",
	"EventId": "70915f71-a420-47bf-ba01-b8f134bcc821",
	"Version": 2,
	"EventTime": "2020-02-17T16:33:51Z",
	"LogEntries": [
		{
			"Type": "Temperature",
			"Level": "Error",
			"LogTime": "2020-02-17T16:33:50Z",
			"Message": "Port B"
		}
	],
	"ReceivedTime": "2020-02-17T16:33:56Z"
}

ObjectEvent

ObjectEvents report the EPCs of all the RFID tags that were read by an RFID device at a given point in time. For enclosures this can be considered an automated baseline/audit scan, functionally equivalent to the Get All RFID Tags command.

Device TypeOccurs
Countertop CabinetStartup, Nightly
Directional PortalNever
EnclosureStartup, Nightly
HandheldAny Time
Mobile CaseNightly
Read PointNever
TrayNightly

Example

A device performs a baseline scan at a scheduled time to report all it's inventory, which at the event time, was 4 RFID Tagged items.

Field

Value

Event Time

<auto-filled with page load date/time>

EPCs Observed

645349000987653215654687
645349000187653215654688
645349000287653215654689
645349000387653215654681

Resulting Event in Jetstream:

{
	"Type": "ObjectEvent",
	"Alias": null,
	"Device": "MyDeviceName",
	"EventId": "93cbf901-cb01-4a70-9909-b33bd0810bbb",
	"Observe": [
		"645349000987653215654687",
		"645349000187653215654688",
		"645349000287653215654689",
		"645349000387653215654681"
	],
	"Version": 2,
	"EventTime": "2020-02-17T16:52:25Z",
	"Credential": null,
	"ReceivedTime": "2020-02-17T16:52:36Z"
}

SensorReadingEvent

SensorReadingEvents are sent for various readings, such as temperature, location, antenna strength, etc. This information is passed as a list of triples of values.

Device TypeDefault Frequency
Countertop CabinetNever
Directional PortalNever
EnclosureHourly
HandheldNever
Mobile CaseAfter Lid Close, Nightly
Read PointNever
TrayNever

Example

A properly functioning ULT freezer (-80 Celsius) reports it's hourly sensor readings.

Field

Value

Event Time

<auto-filled with page load date/time>

Sensor Readings (Name|Value|ReadingTime)

TemperatureA|-80|2020-02-17T04:04:24
TemperatureB|-80|2020-02-17T04:04:24

Resulting Event in Jetstream:

{
	"Type": "SensorReadingEvent",
	"Device": "MyDeviceName",
	"EventId": "ab409fd0-173c-4e92-a808-94acdba7e30c",
	"Version": 2,
	"EventTime": "2020-02-17T10:04:25Z",
	"ReceivedTime": "2020-02-17T10:04:29Z",
	"SensorReadings": [
		{
			"Name": "TemperatureA",
			"Value": "-80",
			"ReadingTime": "2020-02-17T10:04:24Z"
		},
		{
			"Name": "TemperatureB",
			"Value": "-80",
			"ReadingTime": "2020-02-17T10:04:24Z"
		}
	]
}