Skip to content

HTTP (ThingsBoard) plugin

Overview

This plugin subscribes to the uBridge stream and forwards selected measurements via HTTP to ThingsBoard.

Source code and Installation

See the plugin in the repository: - Sources and instructions: https://github.com/ohmtech-io/uBridge-plugins/tree/main/cpp/http-thingsboard

Configuration file

Installed at: /etc/ubridge/thingsboard-plugin-config.json

Example:

{
  "ubridge": {
    "configSockUrl": "ipc:///tmp/ubridgeReqResp",
    "streamSockUrl": "ipc:///tmp/ubridgeStream"
  },
  "thingsboard": {
    "url": "http://tb.example.com",
    "deviceToken": "<token>",
    "basePath": "/api/v1",
    "timeoutMs": 5000
  }
}
  • "configSockUrl and streamSockUrl": Must match the uBridge configuration.
  • "url": ThingsBoard base URL.
  • "deviceToken": Device access token from ThingsBoard.
  • "basePath": API base path (default /api/v1).
  • "timeoutMs": HTTP request timeout.

NOTE: After editing the configuration, restart the service: sudo systemctl restart ubridge-thingsboard-plugin.service.

Monitoring

  • Service status:

    systemctl status ubridge-thingsboard-plugin.service
    

  • Log file:

    tail -f /tmp/ubridge-thingsboard.log