diff options
Diffstat (limited to 'meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway/request.json')
-rw-r--r-- | meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway/request.json | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway/request.json b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway/request.json new file mode 100644 index 0000000000..43237a7dc0 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway/request.json @@ -0,0 +1,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" +} +} +] +}
\ No newline at end of file |