'Thingsboard Upload Converter with multiple timestamps

My device takes measuremets more often than it communicates with MQTT broker, so there can be more than one timestamb in each message, like this:

my/device/telemetry 1651396728000:22,13;1651400328000:25,10;...so on

I want to use built-in Thingsboard MQTT Integration with my custom Upload Converter, but I can't find proper format for result object with multiple timestamps in it (how it was in Gateway Telemetry API)



Solution 1:[1]

The output of your data converter should be an array like this:

var result = [
{
    "deviceName": "88888888",
    "deviceType": "tracker",
    "attributes": {
        "att1": "val1",
    },
    "telemetry": {
        "ts": 1652738915000,
        "values": {
            "blah": "blooo",
            "External Voltage": 12812
        }
    }
},
{same},
{similar}
]

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 JacksonB