Data Forwarding Service

The collected data from the sensors will be sent to Vicotee Cloud, https://cloud.vicotee.com, there you can process and view the data. You can forward the data to your own cloud with following services:

  • Data Forwarding, a service to POST data to your own server.
  • Workspace Data Forwarding, create workspace and setup data forwarding for the space.
  • IFEC, a service to email data. (Per April 2019, this service is in close beta)
  • API to fetch data from Vicotee Cloud to your server.

NOTE:

  • You can only data forwarding the sensors you own. Shared sensors can not be forwarded.
  • Data forwarding the sensors shared with you, can only be done with Workspace Service. Per April 2019, the Workspace Service is in close beta only. Contact Vicotee Support for more information.

Data Forwarding Service

This service allow you to forward data to your cloud service. The data will be a POST with application/json or text/pain as Content-type.

A secret phrase can be used for signing the payload with hex digest of HMAC-SHA256 and send with HTTP header as X-Vicotee-Signature. To verify the data is from Vicotee Cloud, you can use your secret phrase and calculate the digest of HMAC-SHA256 of the payload and compare the result with the one in X-Vicotee-Signature.

 You can only forward data from your own sensors. Sensors shared with you by other users will not be forwarded.

1. Login to Vicotee Cloud, https://cloud.vicotee.com and install the Data Forwarding app. (Click here to read how to install Cloud App)

Install Data Forwarding app

2. Once the Data Forwarding app is installed, open it and click "Add" button to create new Data Forward instance. Three types of data forwarding are supported:

  • HTTP / HTTPS (POST)
  • Azure MQTT
  • IBM MQTT

Select one of the three type and configure how you want data to be forwarded.

Settings

Following parameters are available for you to configure how data can be sent to your cloud with HTTP Post service.

Settings for Azure and IBM MQTT is similar to HTTP Post service, it will not be cover in this document. For further reading about Device ID, Shared Access Key, Device Type or Authentication Token, please read documents supply from Microsoft and IBM.

 

Configurable attributes for HTTP / HTTPS
Field Description
Enabled You can disable the data forwarding.
Payload URL URL of your service where data can be posted to. Example: Https://mycloud.com/api/receive
Content type You can choose between application/json or text/plain.
Secret (Optional) A secret phrase can be used for signing the payload with hex digest of HMAC-SHA256 and send with HTTP header as X-Vicotee-Signature. This option is not available for Azure and IBM MQTT.
Headers Add custom HTTP headers.
Customize Body

This option is enabled by default. It allows you to configure your own payload body, and the data will be forwarded one by one. Let say you have a sensor with temperature and humidity, the Cloud will forward temperature and humidity separately as two payloads.

If you want to bulk send all data for the sensor as one payload, then you must disable this option and the payload will be sent in this specified structure:

{
    "id" : "{uuid}",
    "name" : "{name}",
    "time" : "{time}",
    "sensors" : [
        { "type" : "{key}", "value" : {val}, "unit" : "{unit}" },
         ...,
        { "type" : "{key}", "value" : {val}, "unit" : "{unit}" },
    ]
}

Body

If Customize Body is enabled, anything you enter in here will be payload to be sent to your server. Example of a payload is:

{
   "deviceId" : "{uuid}",
   "deviceName" : "{name}",
   "sensor" : "{key}",
   "value" : {val},
   "unit" : "{unit}"
}

 

With the Body template shown above, and if device UUID is 1234-5, the sensor is 'humidity' and measurement value is 69 RH, then you will receive a payload that looks this:

{
   "deviceId" : "1234-5",
   "deviceName" : "Test Device, 2nd floor.",
   "sensor" : "humidity",
   "value" : 69.0,
   "unit" : "RH"
}

NOTE: value is a double, while all other attributes are strings.

We currently support following attributes:

{uuid} - (STRING) Device UUID.

{name} - (STRING) Device name.

{time} - (STRING) Timestamp for the measurement.

{key} - (STRING) Sensor name ("key").

{val} - (DOUBLE) Sensor value.

{unit}- (STRING) measurement unit.