Integration

An Integration is a service that connects the data of a specific device with an external service.

You can easily retrieve device information from obniz Now's external services, HTML, and more.

Overview of Integration

You can set up one or more Integrations for a single device. After configuration, it is applied within one minute and becomes available for forwarding.

In an Integration, you define the destination and the format conversion, and set the authentication key and so on.

Creating an Integration

You can add an Integration from Add Integration on the sidebar under Integration > Integration.

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

  • Destination - You can select REST API, Google Pub/Sub, and others
  • Machine - The device whose state is to be linked. You can specify multiple devices
  • Schema - The conversion expression for the state. You can define the keys and value conversions used for JSON linking
  • Send interval - You can specify the timing when sending from obniz Now

Destination

The available destinations are as follows.

Destination Overview Required settings
Google Pub/Sub Publishes data to Google Pub/Sub The 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) Can generate a REST API endpoint.
GET requests with an API Key become available.
Issuing an API Key is required.

Schema Settings

You can configure, as a schema, how the values that each device holds and stores are output, including with what keys and values. You can set the output of each key one by one as a mapping table.

The values that exist differ depending on the selected device and its settings.

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

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

For example, for JSON that maps temperature to a key named temp and rssi to rssi, apply the following settings.

With Transform Data, you can try out the value conversion on the current device.

Time and Device Identification

You can change the timestamp format and the device_id (the value used to identify the device) at the time of sending.

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

Device identification works as follows:

  • Send either the machine name or the machine ID
  • The key used for sending can be set freely. The default is device_id

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