ThingsBoard

Integrate Thingsee IoT data with ThingsBoard platform

ThingsBoard is an open-source IoT platform for device management, data collection, processing, and visualization.

Overview

%%{init: {'theme':'base','themeVariables':{'primaryColor':'#73F9C1','primaryTextColor':'#143633','primaryBorderColor':'#143633','lineColor':'#143633','secondaryColor':'#C7FDE6','tertiaryColor':'#F6FAFA','clusterBkg':'#F6FAFA','clusterBorder':'#143633'}}}%%
flowchart TB
    subgraph ThingsBoardPlatform["ThingsBoard"]
        DASH[Dashboards]
        RULES[Rule Engine]
        ALERT[Alerts]
        TB[ThingsBoard]
    end
    
    T[Thingsee Cloud]
    
    T -->|HTTP/MQTT| TB
    TB --> DASH & RULES & ALERT

Integration Methods

Thingsee integrates with ThingsBoard using:

  • HTTP Integration - HTTPS POST to ThingsBoard endpoint
  • MQTT Integration - Publish to ThingsBoard MQTT broker

Setup

1. Enable HTTP Integration

In ThingsBoard:

  1. Go to Integrations → HTTP
  2. Create new integration
  3. Configure endpoint settings

ThingsBoard requires an uplink converter to transform Thingsee messages into ThingsBoard format.

Thingsee Uplink Converter:

// Decoder function
var data = decodeToJson(payload);
var deviceName = data.tsmTuid;
var deviceType = 'thingsee-sensor';

var result = {
    deviceName: deviceName,
    deviceType: deviceType,
    telemetry: {}
};

// Map Thingsee properties to telemetry
for (var key in data) {
    if (key.startsWith('tsm')) continue; // Skip header fields
    result.telemetry[data.tsmId + '_' + key] = data[key];
}

// Add timestamp
result.telemetry.ts = data.tsmTs * 1000;

return result;

3. Request Integration

Contact Haltian with:

  • ThingsBoard HTTP endpoint URL
  • Authentication credentials (if required)

Or request the Thingsee Uplink Converter from Haltian.

Data Format

Thingsee messages are converted to ThingsBoard telemetry with naming convention:

{tsmId}_{property}

Example:

Thingsee PropertyThingsBoard Telemetry
temp (tsmId: 12100)12100_temp
humd (tsmId: 12100)12100_humd
batl (tsmId: 1110)1110_batl

Dashboard Setup

Create Device Dashboard

  1. Go to Dashboards → Add Dashboard
  2. Add widgets for Thingsee data:
    • Line charts for temperature, humidity
    • Gauges for battery level
    • Tables for device status

Example Widgets

Temperature Chart:

  • Widget: Time series chart
  • Telemetry key: 12100_temp
  • Aggregation: None or Average

Battery Gauge:

  • Widget: Analog gauge
  • Telemetry key: 1110_batl
  • Min: 0, Max: 100

Device Status Table:

  • Widget: Entity table
  • Show: Device name, last activity, battery level

Rule Engine

Use ThingsBoard’s rule engine for automation:

Low Battery Alert:

{
  "name": "Low Battery Alert",
  "type": "FILTER",
  "configuration": {
    "jsScript": "return msg['1110_batl'] < 20;"
  }
}

Temperature Threshold:

{
  "name": "High Temperature",
  "type": "FILTER",  
  "configuration": {
    "jsScript": "return msg['12100_temp'] > 30;"
  }
}

You can create your own converter for different data formats:

// Custom converter example
var data = decodeToJson(payload);
var deviceName = data.tsmTuid;

var result = {
    deviceName: deviceName,
    deviceType: getDeviceType(data.tsmTuid),
    telemetry: {
        temperature: data.temp,
        humidity: data.humd,
        battery: data.batl,
        pressure: data.airp
    },
    attributes: {
        gateway: data.tsmGw,
        messageType: data.tsmId
    }
};

function getDeviceType(tuid) {
    if (tuid.startsWith('TSPR')) return 'presence-sensor';
    if (tuid.startsWith('TSPD')) return 'environment-sensor';
    if (tuid.startsWith('TSGW')) return 'gateway';
    return 'unknown';
}

return result;

Resources