ThingsBoard Logger
The ThingsBoard Logger publishes the values of selected tag collections from a Profile to a device in ThingsBoard. In Snapshot mode it sends the current value of each member at each Update interval (seconds). In On change and Everything modes, the Update interval sets the flush timing. It appears under Loggers in ADD COMPONENT after the ThingsBoard Logger plugin is installed. A Profile holds only one.
The logger needs the Data Relay licensed feature. Refer to Install and manage plugins to install the plugin, and to Licensing for the editions that include Data Relay.
flowchart LR
subgraph Server["Profinity server"]
Tags --> Collections["Tag collections"] --> Component["ThingsBoard Logger"]
end
subgraph Cloud["ThingsBoard"]
Device
end
Component --> Device
Licence required
The ThingsBoard Logger requires the Data Relay licensed feature, included in the Server and Enterprise editions. Without it the component is unavailable. Refer to Licensing for what each edition includes.
Quick start
You need the Data Relay licensed feature, the ThingsBoard Logger plugin installed, and the access token and device ID for the ThingsBoard device.
- Install the ThingsBoard Logger plugin. Refer to Install and manage plugins.
- Add ThingsBoard Logger from ADD COMPONENT, under Loggers. A Profile holds only one.
- Enter the device's access token in ThingsBoard access token.
- Enter the device ID in ThingsBoard device ID.
- Under Collections, select at least one tag collection. The component needs one before it can start.
- Select ADD COMPONENT at the bottom of the dialog. The dialog closes and the component appears in the profile.
- Check that the component status shows On. If it shows Error, read the Profinity System Logs for the reason.
Add the component
Only one ThingsBoard Logger can exist in a Profile. Add it from ADD COMPONENT (refer to How to add a component to your profile) and choose ThingsBoard Logger under Loggers. Complete the settings in the following table.
| Setting | Type | Default | Notes |
|---|---|---|---|
| Name | Text | ThingsBoard Logger | The name shown in the Profile. |
| ThingsBoard access token | Secret | None | The access token for the device. Required, and stored encrypted. |
| ThingsBoard device ID | Text | None | The device ID in ThingsBoard. Required. Profinity also uses it as the MQTT client ID. |
| Update interval (seconds) | Time | 60 | Seconds between samples sent to ThingsBoard, from 1 to 86400. |
| Collections | Choice | None | The tag collections to send. At least one is required. |
| Logging mode | Choice | Snapshot | Chooses between Snapshot, On change and Everything. Refer to Logging modes for what each mode sends. |
| Auto connect | On or off | On | Starts sending when the Profile loads. Refer to Connections and reconnecting. |
A collection must be selected before the component can start. It connects out from the Profinity server to thingsboard.cloud using MQTT on TCP port 1883, so the firewall or network must allow that outbound connection. No inbound port is needed.
Troubleshooting
The component can be saved only with an access token and a device ID.
| What you see | Cause | What to do |
|---|---|---|
| The message "You must provide a device access token." | The access token is empty. | Enter the access token. |
| The message "You must provide a device ID." | The device ID is empty. | Enter the device ID. |
| ThingsBoard Logger is not in ADD COMPONENT | The plugin is not installed, or Data Relay is not licensed. | Install the plugin and check the licence for the Profile. |
| No data reaches ThingsBoard after the component is added | The token and device ID do not match the device in ThingsBoard. | Check the token and device ID against the device in ThingsBoard. |
| No data reaches ThingsBoard after the component is added | No collection is selected. | Select at least one collection. |
| No data reaches ThingsBoard after the component is added | Outbound traffic on port 1883 is blocked. | Allow outbound traffic on port 1883. |
Then read the Profinity logs for the connection error. For the shared settings of MQTT components, refer to MQTT Publisher.