aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/thingsboard-gateway/thingsboard-gateway/request.json
blob: 43237a7dc059142b7433ea48956e4ff55f3b0f19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
"job": "leader"
},
"allowRedirects": true,
"timeout": 0.5,
"scanPeriod": 5,
"converter": {
  "type": "json",
  "deviceNameJsonExpression": "SD8500",
  "deviceTypeJsonExpression": "SD",
  "attributes": [
    {
      "key": "serialNumber",
      "type": "string",
      "value": "${serial}"
    }
  ],
  "telemetry": [
    {
      "key": "Maintainer",
      "type": "string",
      "value": "${Developer}"
    }
  ]
}
},
{
"url": "get_info",
"httpMethod": "GET",
"httpHeaders": {
  "ACCEPT": "application/json"
},
"allowRedirects": true,
"timeout": 0.5,
"scanPeriod": 100,
"converter": {
  "type": "custom",
  "deviceNameJsonExpression": "SD8500",
  "deviceTypeJsonExpression": "SD",
  "extension": "CustomRequestUplinkConverter",
  "extension-config": [
    {
      "key": "Totaliser",
      "type": "float",
      "fromByte": 0,
      "toByte": 4,
      "byteorder": "big",
      "signed": true,
      "multiplier": 1
    },
    {
      "key": "Flow",
      "type": "int",
      "fromByte": 4,
      "toByte": 6,
      "byteorder": "big",
      "signed": true,
      "multiplier": 0.01
    },
    {
      "key": "Temperature",
      "type": "int",
      "fromByte": 8,
      "toByte": 10,
      "byteorder": "big",
      "signed": true,
      "multiplier": 0.01
    },
    {
      "key": "Pressure",
      "type": "int",
      "fromByte": 12,
      "toByte": 14,
      "byteorder": "big",
      "signed": true,
      "multiplier": 0.01
    },
    {
      "key": "deviceStatus",
      "type": "int",
      "byteAddress": 15,
      "fromBit": 4,
      "toBit": 8,
      "byteorder": "big",
      "signed": false
    },
    {
      "key": "OUT2",
      "type": "int",
      "byteAddress": 15,
      "fromBit": 1,
      "toBit": 2,
      "byteorder": "big"
    },
    {
      "key": "OUT1",
      "type": "int",
      "byteAddress": 15,
      "fromBit": 0,
      "toBit": 1,
      "byteorder": "big"
    }
  ]
}
}
],
"attributeUpdates": [
{
  "httpMethod": "POST",
  "httpHeaders": {
    "CONTENT-TYPE": "application/json"
  },
  "timeout": 0.5,
  "tries": 3,
  "allowRedirects": true,
  "deviceNameFilter": "SD.*",
  "attributeFilter": "send_data",
  "requestUrlExpression": "sensor/${deviceName}/${attributeKey}",
  "valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}"
}
],
"serverSideRpc": [
{
"deviceNameFilter": ".*",
"methodFilter": "echo",
"requestUrlExpression": "sensor/${deviceName}/request/${methodName}/${requestId}",
"responseTimeout": 1,
"httpMethod": "GET",
"valueExpression": "${params}",
"timeout": 0.5,
"tries": 3,
"httpHeaders": {
  "Content-Type": "application/json"
}
},
{
"deviceNameFilter": ".*",
"methodFilter": "no-reply",
"requestUrlExpression": "sensor/${deviceName}/request/${methodName}/${requestId}",
"httpMethod": "POST",
"valueExpression": "${params}",
"httpHeaders": {
  "Content-Type": "application/json"
}
}
]
}