79562176

Date: 2025-04-08 13:30:18
Score: 0.5
Natty:
Report link

So I've found a way. Basically this is the work of iot-gateway. It's just a small tweak from getting started guide: https://thingsboard.io/docs/iot-gateway/getting-started/#step-3-add-new-connector.

Scroll down to “Data conversion” section:

For “Device” subsection use the following options/values:

In the “Name” row, select “Constant” in the “Source” dropdown field, fill in the “Value / Expression” field with the “Device Demo” value.

In the “Profile name” row, select “Constant” in the “Source” dropdown field, fill in the “Value / Expression” field with the “default” value.

One just need to extract the name of the device from the message payload (or from path if applicable)

So just specify the device id like this in the connector configuration

"deviceInfo": {
      "deviceNameExpression": "Node ${your_id}",
      "deviceNameExpressionSource": "message",
      "deviceProfileExpressionSource": "constant",
      "deviceProfileExpression": "default"
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: trya2l