Device Integration
Introduction
This section explains how to integrate devices into the Gear Studio platform, that is:
- How to get devices to send data to the platform.
- How to get the platform to send data to devices, if the devices support it.
Once a device is integrated into the platform, the following is possible:
- Create dashboards that display device status in real time.
- View information in a variety of reports.
- Create configurable alerts with email and SMS notifications.
- Export information using APIs.
- Monitor and control devices from Gear Studio web applications.
- Monitor and control devices from iOS and Android using the Gear Studio app.
Important: device integration is not only available for commercial devices, but also allows connecting custom-made devices based on Arduino, nodeMCU, Raspberry Pi and many more.
If you are not sure what exactly a "device" is, you can use this page to learn more about devices and endpoints.
Key Concepts
Data Messages
Integrations are primarily responsible for processing messages received from devices so they can be processed by the platform, as well as converting commands sent by the platform into a format that devices can process. Two types of messages are considered:
- Uplink: uplink messages are all those sent from devices to the platform. The platform must be able to process uplink messages to store the relevant information and process it.
- Downlink: downlink messages are those sent from the platform to devices, typically in the form of commands. Some devices do not support downlink messages, while others only support them for specific configuration operations.
Many devices have a native integration in the Gear Studio platform, and all that is needed is to connect and configure them correctly. For devices not natively supported, integration consists of defining how uplink messages are processed and how downlink messages are built.
Device Models
Uplink and downlink message processing is performed per device model. For natively supported devices, the integration is already available without additional work.
When a device is not natively supported, integration mostly consists of creating a device model that correctly represents it, and specifying how uplink messages are processed and how downlink messages are built. In these cases, scripts can be used to automatically handle all the work, so that these device models behave the same way as if they were natively supported.
Getting Started
Creating an Access Token
For integrations performed via HTTP, MQTT, or LoRaWAN, it is first necessary to create an access token. This page contains more information about access token management. Access tokens allow controlling the access and permissions used for any operation.
Selecting a Device Model
It is important to understand whether the device to integrate is natively supported on the platform. If so, no additional work is needed. However, if the device model is not supported, you will need to create a new device model. See this reference for more information on this topic.
Creating a Device
Once you have an access token and the platform contains the device model to integrate, all that remains is to create it on the platform so it can connect. This can be accomplished by following this guide. If you are not sure what exactly a "device" is, you can use this page to learn more about devices and endpoints.
If the device model is natively supported, or if a device model has been created to represent it along with a script that defines the endpoints it contains, no other steps are necessary. However, in some cases, you may need to manually create endpoints within the device. In that case, you can do so by following this guide. If you are not sure what exactly an "endpoint" is, you can use this page to learn more about devices and endpoints.
Integration Options
Currently, there are three integration alternatives, detailed below.
| Integration | Reference / Help |
|---|---|
| MQTT | Device integration via MQTT |
| HTTP | Device integration via HTTP |
| LoRaWAN | Integration through The Things Stack, Integration through ThingPark, Integration through Helium |