Integration

Integration is a service that links the state of a specific device with an external service.

You can easily retrieve device information from external services or HTML using obniz Now.

Overview of Integration

You can configure one or more integrations for a single device (machine), and within one minute of configuration the integration is applied and transfer becomes possible.

An integration defines the destination and format conversion, and sets up things like authentication keys.

Creating an Integration

You can add an integration from "Add Integration" on the integration creation screen.

In an integration, you can specify the following when creating it:

  • Destination - You can choose REST API, Google Pub/Sub, and so on.
  • Machine - The target machine whose state is to be linked. Multiple can be specified.
  • Schema - A conversion definition for the state. You can specify the conversion of keys and values when linking via JSON.
  • Send interval - You can specify the timing for sending from obniz Now.

Destinations

The available destinations are as follows.

DestinationOverviewRequired Settings
Google Pub/SubPublishes data to Google Pub/SubThe destination topic and authentication information are required
REST API Push (unreleased feature)POSTs data via REST API (HTTPS request)

The destination URL setting is required.

Headers can be customized.

REST API Pull (unreleased feature)A REST API endpoint can be generated.
GET requests with an API Key become possible.
Issuance of an API Key is required.

Schema Configuration

You can configure, as a schema, how the sensors held and stored by each machine (each obniz device or sensor) are output with which keys and values. You can set up, one by one, a mapping table of which key is output as which key.

What values exist varies depending on the selected machine and configuration.

For example, for an obniz device this includes connection status such as online, and for a temperature sensor it includes the temperature such as temperature and the Bluetooth signal strength.

You can build the schema by specifying and adding the destination path.

For example, to make a JSON where temperature maps to a key called temp and rssi maps to rssi, the configuration is as follows.

By pressing "Transform Data," you can test the value conversion with the currently configured machine.

Time and Device Identification

You can change the timestamp format used when sending and the device_id (the identifying name of which machine the data is sent from).

Select the format from "Format," and if a timezone setting is needed, select it from "Timezone."

Device identification is as follows:

  • Sends either the machine name or the machine ID
  • The key used when sending can be set arbitrarily. The default is device_id

By default, the "machine name" is sent as a string under the "device_id" key.