Generic integration
The generic integration is the most flexible integration in Yggio with ability to receive data from thousands of different device types. It is used to integrate any device that can transmit data on HTTP or MQTT and that can get identified by a unique identifier. For example Nb-IoT devices, Cat M devices, WiFi devices, TCP/IP devices, (like cameras or gateways) or different type of web services that can post data to Yggio. The generic integration is also used to create virtual nodes that can get populated with data from translators or Flows.
Generic devices are identified by a globally unique id. There are a number of properties that can be chosen as the holder of you id.
Currently supported identifiers:
IdentifierName | Description |
---|---|
secret | String between 8 and 128 characters, include only A-Z, 0-9, -, . and _ |
gatewayEui | 64-bit globally-unique Extended Unique Identifier (EUI-64) |
imei | International Mobile Equipment Identity, 15 digit number |
tag | any string |
serialNumber | any string |
There are two actions that needs to be performed, in any order:
-
Create the node through the control panel (or API, it follows Adding devices to Yggio)
1.1 Navigate to Devices in the top panel 1.2 Press the New device button in the top right corner
1.3 Choose Single Mode
1.4 Choose Generic in the drop down menu and press Continue 1.5 Enter the unique secret to be used for this device and press Continue
1.6 (Optional) Give the device a device model name and press Continue or press Skip 1.7 (Optional) Add a translator by pressing the +Add translator button or press Skip 1.8 Give the device a name and (Optional) description, location and contextual parameters and press Add device -
Send data to the integration, either by using HTTP or MQTT.
For MQTT, see MQTT Broker.
For HTTP, a message should be sent to<server>/http-push/generic
with this format:
{
<identifierName>: <identifier>,
"basically": "any",
"json": "compatible",
"information": [1]
"stuff": {
"nested": "is allowed"
}
}
The request must also include either a header or querystring that determine your identifier: identifier=<identifierName>
An example:
curl -sS https://staging.yggio.net/http-push/generic?identifier=secret \
-H 'content-type: application/json' \
-d @- <<EOF
{
"secret": "ABCDEFGHIJKL_1234567890",
"basically": "any",
"json": "compatible",
"information": [1],
"stuff": {
"nested": "is allowed"
}
}
EOF