5. Data Collection
📡 Data Collection in OpenGate
Once entities and devices are provisioned, the next step is to start collecting data. OpenGate offers the OpenGate Device Emulator to simulate, ingest, and so check your OpenGate workflows in real time. This chapter focuses on how to send data to the platform, monitor its flow, and validate that everything is working as expected.
In our ongoing scenario, the IT team has already provisioned ambient and presence sensors across the warehouse and parking area. Now, they want to verify that these sensors are sending data correctly and that the platform is capturing it.
IMPORTANT: All the data collected using the OpenGate Device Emulator will be recorded as collection datapoints for the data streams that you use.
🧪 Simulating with the Device Emulator
OpenGate includes a built-in Device Emulator that allows users to simulate telemetry from virtual devices. This is especially useful during testing phases or when physical devices are not yet deployed.
For this tutorial are going to:
- Navigate to the Device Emulator section in the console.
- Select one of our warehouse sensors.
- Send test data for that sensor.
- Repeat the process with a second device to simulate multiple inputs.
1. Navigate to the Device Emulator section in the console.
Go to the OpenGate web console and click on the left menu on “OpenGate Device Emulator”. We recommend you to choose a new tab using the nested button “NEW WINDOW”
2. Collect data
Choose the entitiy to emulate. We will use [YourPrefix]-ws-stemp02
from our tutorial.
In this tutorial, this device represents a device with has temperature and humidity sensors
ogw_deviceEmulatorPage1.png
As you can see, there are some tabs to gives you access to powerful tools to emulate the device:
- SYSTEM: This allows you to collect the OpenGate standard inventory data streams emulating the device
- RECOLECTION: From here you can emulate the data streams collection that you want. We will use this in the tutorial.
- OPERATIONS: Here you can emulate the Operation Response from the device to check operations workflows.
- MAP: This allows you to collect a location event directly from a map.
For this tutorial, we will use the “RECOLECTON” tab to send some basic data collection for our data streams.
click on “RECOLECTION” tab, then enter temperature
and humidity
in the “Datastream id” box.
This add to the collection data form, the datastreams selected so you can enter some value
click on “SEND DATA and choose “Once Now” to send one collection event. You may use the emulator as periodic event generator using “Once Every” option, but for this tutorial, we just need to send one value.
Click on “SEND DATA” and a confirmation message appears:
3. Send more data!
Now choose the entitiy [YourPrefix]-ws-spres02
from our tutorial, this represents a presence sensor.
Just choose presence
datastream and check the box to record a “true” value for presence detected.
Click on “SEND”, and “SEND ONCE” as the last time.
📊 Viewing Data in Entity Panels
Once data is received, it can be visualized directly in the Entity Details Panel. Let’s view the data and relationship between entities and assets
1. Checking data is received in devices
Go to “OpenGate Managemenet > Devices” and click on the menu for “[YourPrefix]-ws-stemp02”, then choose “Entity Details Panel”
Here you can see the last value for the data streams that we use for the test: temperature
and humidity
:
Now repeat the process for [YourPrefix]-ws-spres02
and check that the “presence” value is collected in the data stream.
You will se something like this:
2. Checking data is populated to the asset
As you may notice, both devices [YourPrefix]-ws-stemp02
and [YourPrefix]-ws-spres02
are related with the [YourPrefix]-ws-room02
asset. That means that both devices are present in the same room of our warehouse and then both devices provide data about the status of that room, so the data of bothe devices will be populated to the asset
To check this, just go to "” and click on the menu for the [YourPrefix]-ws-room02
As you can see there are some relevant information here… On one hand, you can see that the related devices for that asset are [YourPrefix]-ws-stemp02
and [YourPrefix]-ws-spres02
and, additionaly you can check that the data collected for that devices, is recorded also for the asset so you we have values for temperature
, humidity
and presence
.
🧠 Pro Tips
-
Using the emulator to simulate devices helps you to test dashboards, connector functions, rules, operations and so, the entire OpenGate workflow that you are configuring. You can also combine emulated data with real devices to validate hybrid scenarios.
-
On the “RECOLECTION” tab, you can IMPORT/EXPORT a JSON file with the datastreams and values to use so you may prepare different sets of data to work in a more efficient way.
-
The exported JSON from the “RECOLECTION” tab, works directly using OpenGate South API collection endpoint. Just paste the JSON on the POST request body to test it!