Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP] #1657

Closed
vimalgupta opened this issue Jan 16, 2025 · 1 comment
Closed

[HELP] #1657

vimalgupta opened this issue Jan 16, 2025 · 1 comment
Assignees

Comments

@vimalgupta
Copy link

Hello Team,
i am using tb iot gateway and sending below message to a conected MQTT broker
[
{
"macid": "Slave1",
"meterid": "IB00002",
"source": "Slave1",
"destination": "Gateway1",
"rssi_in": "5",
"rssi_out": "10"
},
{
"macid": "Slave2",
"meterid": "IB00003",
"source": "Slave2",
"destination": "Gateway1",
"rssi_in": "8",
"rssi_out": "10"
},
{
"macid": "Slave3",
"meterid": "IB00004",
"source": "Slave3",
"destination": "Gateway1",
"rssi_in": "9",
"rssi_out": "10"
},
{
"macid": "Slave4",
"meterid": "IB00005",
"source": "Slave4",
"destination": "Slave1",
"rssi_in": "8",
"rssi_out": "10"
}
]

each json object represent a slave device with device name as macid

How do i post this data to each device with tb iot gateway, i have tried multiple way but no sucsess

@imbeacon
Copy link
Member

Hi @vimalgupta,

You can try to use next part in configuration:

      "converter": {
        "type": "json",
        "deviceNameJsonExpression": “${macid}",
        "deviceTypeJsonExpression": "default",
        "timeout": 60000,
        "attributes": [
          {
            "type": “string",
            "key": “meterid",
            "value": “${meterid}"
          }
        ],
        "timeseries": [
          {
            "type": “string",
            "key": “source",
            "value": "${source}"
          },
          {
            "type": “string",
            "key": “destination",
            "value": "${destination}"
          },
          {
            "type": "integer",
            "key": “rssi_in",
            "value": "${rssi_in}"
          },
          {
            "type": "integer",
            "key": “rssi_out",
            "value": "${rssi_out}"
          }
        ]
      }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants