Translated iotnodes

Data from devices can come in all kinds of formats. In order to get the data in a desirable and readable format a translated iotnode can be used.

In a regular iotnode the data can be spread out and hard to interpret:

{
  id: 5,
  name: 'My iotnode'
  ...,
  temp: '0x019',
  example: {
    humValue: 76000,
  }  
}

By creating a translated iotnode for this iotnode, the data is grouped, generalized and more readable:

{
  id: 6,
  name: 'My iotnode-translated'
  translatedFrom: 5,
  ...,
  value: {
    temperature: 25,
    humidity: 76
  }
}

A translated iotnode is an iotnode with a somewhat different set of attributes, including a reference to its parent iotnode. When the data of the parent iotnode gets updated, the translated iotnode's data automatically gets updated.

Model

A translated iotnode model look like this:

{
  name: String,
  description: String,
  nodeType: String,
  translatedFrom: Id,
  value: Object
}

name and description is copied from the parent iotnode upon creation. Name is also appended by "-translated ([nodeType])".
nodeType is the chosen nodeType. See the Node types section.
translatedFrom is a reference to the parent iotnode.
value contains the translated data. The format of this object is dependent of the nodeType.

Note that there may be additional attributes, depending on the nodeType of the parent iotnode.

Node types

When you create a translated iotnode you can choose the format of the translated data. Depending on what kind of iotnode you want to translate from you will have one more node types to choose from. These node types includes:

  • ngsi-compatible-device
  • simple-device
  • simple-lora-node

For a regular iotnode, the iotnodes/{id}/translators endpoint in the REST API can be used to get all node types that are available for creating a translated iotnode.

ngsi-compatible-device

Creates a value object with a format that conforms to the FIWARE-NGSI v2 standard. This is the recommended node type, as it follows a standard and provides meta information.

{
  value: {
    [entityName]: {
      "value": X
      "type": String,
      "metadata": {
        "dateModified": {
          "type": "DateTime",
          "value": String
        },
        "unit": {
          "type": "Text",
          "value": String
        }
      }
    }
  ...
  }
}

entityName is the name of the data. E.g. temperature.
value is the value of the data. The type of this attribute is defined in type.
type is an enum and can be: Number, Text, StructuredValue, DateTime, geo:json, Boolean, or None.
metadata is an object containing metadata.
metadata.dateModified is a timestamp that states when the entity was last modified. A date in ISO 8601 format. E.g. "2019-11-13T13:04:53.675Z".
metadata.unit is the unit of the data. Not present for certain types.

Read more about the FIWARE-NGSI v2 standard and the different types here.

simple-device

Creates a value object with a simple flat structure. Only for Z-Wave devices.

Example:

  value: {
    "temperature": 25.1,
    "temperatureUnit": "celsius",
    "luminance": 129,
    "moisture": 22.46
  }

simple-lora-node

Creates a value object with a format that generally is the same as the device manufacture's. Only for LoRa devices.

Supported devices

Translators are currently available for Z-Wave and LoRa. The following iotnode node types are supported:

  • zwave-device
  • lora-node

Z-Wave support

Currently the following Z-Wave command classes can be translated:

  • msensor
  • alarm
  • meter

LoRa support

Currently the following LoRa model names can be translated:

  • Adeunis Analog
  • Adeunis Arf8123aa
  • Adeunis Comfort
  • Adeunis Dc
  • Adeunis Deltap
  • Adeunis Motion
  • Adeunis Pulse
  • Adeunis Pulse-v3
  • Adeunis Repeater
  • Adeunis Temp
  • Adeunis Temp-v3
  • Adeunis TicCbeLinkyMono
  • Adeunis TicCbeLinkyTri
  • Adeunis TicPmePmi
  • Ascoe Ireu868lr
  • Barani Design - Meteohelix-pro
  • Barani Design - Meteowind-iot-pro
  • Carlo-gavazzi-em111-din.av8.1.x.s1.x
  • Chinastar cs-itvp-01lw03
  • Connetti Silo-v85-h16
  • Connetti ├ľaser-mafa
  • Davis Weather Station
  • Decentlab DL-IAM
  • Decentlab DL-PR26
  • Decentlab DL-TBRG
  • Digital-matter Guppy
  • Digital-matter Sensornode
  • Digital-matter Yabby
  • Dragino Lgt92
  • Ellenex pld2-l
  • Elsys ELT
  • Elsys ELT-2
  • Elsys EMS
  • Elsys ERS
  • Elsys ERS CO2
  • Elsys ERS Desk
  • Elsys ERS Eye
  • Elsys ERS Lite
  • Elsys ERS Sound
  • Elsys Flow Below
  • Elsys Generic
  • Elvaco cma11l
  • Ewattch Squid
  • Globalsat LS-111p
  • Globalsat LS-113p
  • Globalsat LS-134e
  • Globalsat LT-100ep
  • Holley Bes334c
  • Hostabee B-Keep
  • Iotsens Sound-sensor
  • Mcf-lw12co2
  • Mcf-lw13io
  • Mydevices Cayenne-lpp
  • Nke-watteco Smart-plug
  • Protrol Ipc402x
  • Sensative Strips Lora
  • Sensefarm Cube02-sm
  • Sensefarm Rhf1s001
  • Sensing Labs-d
  • Sensoneo Single-sensor
  • Skysens Skyenr1
  • Talkpool OY1110
  • Talkpool OY1310
  • Talkpool OY1700
  • Xignal Mouse-trap
  • Xignal Rat-trap