15 changed files with 0 additions and 2073 deletions
@ -1,58 +0,0 @@ |
|||
{ |
|||
"general": { |
|||
"objectName": "TB_gateway", |
|||
"address": "0.0.0.0:47808", |
|||
"objectIdentifier": 599, |
|||
"maxApduLengthAccepted": 1476, |
|||
"segmentationSupported": "segmentedBoth", |
|||
"vendorIdentifier": 15 |
|||
}, |
|||
"devices": [ |
|||
{ |
|||
"deviceName": "BACnet Device ${objectName}", |
|||
"deviceType": "default", |
|||
"address": "192.168.2.110:47808", |
|||
"pollPeriod": 10000, |
|||
"attributes": [ |
|||
{ |
|||
"key": "temperature", |
|||
"type": "string", |
|||
"objectId": "analogOutput:1", |
|||
"propertyId": "presentValue" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"key": "state", |
|||
"type": "bool", |
|||
"objectId": "binaryValue:1", |
|||
"propertyId": "presentValue" |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"key": "brightness", |
|||
"requestType": "writeProperty", |
|||
"objectId": "analogOutput:1", |
|||
"propertyId": "presentValue" |
|||
} |
|||
], |
|||
"serverSideRpc": [ |
|||
{ |
|||
"method": "set_state", |
|||
"requestType": "writeProperty", |
|||
"requestTimeout": 10000, |
|||
"objectId": "binaryOutput:1", |
|||
"propertyId": "presentValue" |
|||
}, |
|||
{ |
|||
"method": "get_state", |
|||
"requestType": "readProperty", |
|||
"requestTimeout": 10000, |
|||
"objectId": "binaryOutput:1", |
|||
"propertyId": "presentValue" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
@ -1,73 +0,0 @@ |
|||
{ |
|||
"passiveScanMode": true, |
|||
"showMap": false, |
|||
"scanner": { |
|||
"timeout": 10000, |
|||
"deviceName": "Device name" |
|||
}, |
|||
"devices": [ |
|||
{ |
|||
"name": "Temperature and humidity sensor", |
|||
"MACAddress": "4C:65:A8:DF:85:C0", |
|||
"pollPeriod": 500000, |
|||
"showMap": false, |
|||
"timeout": 10000, |
|||
"connectRetry": 5, |
|||
"connectRetryInSeconds": 0, |
|||
"waitAfterConnectRetries": 10, |
|||
"telemetry": [ |
|||
{ |
|||
"key": "temperature", |
|||
"method": "notify", |
|||
"characteristicUUID": "226CAA55-6476-4566-7562-66734470666D", |
|||
"valueExpression": "[2]" |
|||
}, |
|||
{ |
|||
"key": "humidity", |
|||
"method": "notify", |
|||
"characteristicUUID": "226CAA55-6476-4566-7562-66734470666D", |
|||
"valueExpression": "[0]" |
|||
} |
|||
], |
|||
"attributes": [ |
|||
{ |
|||
"key": "name", |
|||
"method": "read", |
|||
"characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB", |
|||
"valueExpression": "[0:2]cm [2:]A" |
|||
}, |
|||
{ |
|||
"key": "values", |
|||
"method": "read", |
|||
"characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB", |
|||
"valueExpression": "All values: [:]" |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"attributeOnThingsBoard": "sharedName", |
|||
"characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB" |
|||
} |
|||
], |
|||
"serverSideRpc": [ |
|||
{ |
|||
"methodRPC": "rpcMethod1", |
|||
"withResponse": true, |
|||
"characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB", |
|||
"methodProcessing": "read" |
|||
}, |
|||
{ |
|||
"methodRPC": "rpcMethod2", |
|||
"withResponse": true, |
|||
"characteristicUUID": "00002A00-0000-1000-8000-00805F9B34FB", |
|||
"methodProcessing": "write" |
|||
}, |
|||
{ |
|||
"methodRPC": "rpcMethod3", |
|||
"withResponse": true, |
|||
"methodProcessing": "scan" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
@ -1,89 +0,0 @@ |
|||
{ |
|||
"interface": "socketcan", |
|||
"channel": "vcan0", |
|||
"backend": { |
|||
"fd": true |
|||
}, |
|||
"reconnectPeriod": 5, |
|||
"devices": [ |
|||
{ |
|||
"name": "Car", |
|||
"sendDataOnlyOnChange": false, |
|||
"enableUnknownRpc": true, |
|||
"strictEval": false, |
|||
"attributes": [ |
|||
{ |
|||
"key": "isDriverDoorOpened", |
|||
"nodeId": 41, |
|||
"command": "2:2:big:8717", |
|||
"value": "4:1:int", |
|||
"expression": "bool(value & 0b00000100)", |
|||
"polling": { |
|||
"type": "once", |
|||
"dataInHex": "AB CD AB CD" |
|||
} |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"key": "rpm", |
|||
"nodeId": 1918, |
|||
"isExtendedId": true, |
|||
"command": "2:2:big:48059", |
|||
"value": "4:2:big:int", |
|||
"expression": "value / 4", |
|||
"polling": { |
|||
"type": "always", |
|||
"period": 5, |
|||
"dataInHex": "aaaa bbbb aaaa bbbb" |
|||
} |
|||
}, |
|||
{ |
|||
"key": "milliage", |
|||
"nodeId": 1918, |
|||
"isExtendedId": true, |
|||
"value": "4:2:little:int", |
|||
"expression": "value * 10", |
|||
"polling": { |
|||
"type": "always", |
|||
"period": 30, |
|||
"dataInHex": "aa bb cc dd ee ff aa bb" |
|||
} |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"attributeOnThingsBoard": "softwareVersion", |
|||
"nodeId": 64, |
|||
"isExtendedId": true, |
|||
"dataLength": 4, |
|||
"dataExpression": "value + 5", |
|||
"dataByteorder": "little" |
|||
} |
|||
], |
|||
"serverSideRpc": [ |
|||
{ |
|||
"method": "sendSameData", |
|||
"nodeId": 4, |
|||
"isExtendedId": true, |
|||
"isFd": true, |
|||
"bitrateSwitch": true, |
|||
"dataInHex": "aa bb cc dd ee ff aa bb aa bb cc d ee ff" |
|||
}, |
|||
{ |
|||
"method": "setLightLevel", |
|||
"nodeId": 5, |
|||
"dataLength": 2, |
|||
"dataByteorder": "little", |
|||
"dataBefore": "00AA" |
|||
}, |
|||
{ |
|||
"method": "setSpeed", |
|||
"nodeId": 16, |
|||
"dataAfter": "0102", |
|||
"dataExpression": "userSpeed if maxAllowedSpeed > userSpeed else maxAllowedSpeed" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
@ -1,65 +0,0 @@ |
|||
{ |
|||
"host": "0.0.0.0", |
|||
"port": 21, |
|||
"TLSSupport": false, |
|||
"security": { |
|||
"type": "basic", |
|||
"username": "admin", |
|||
"password": "admin" |
|||
}, |
|||
"paths": [ |
|||
{ |
|||
"devicePatternName": "asd", |
|||
"devicePatternType": "Device", |
|||
"delimiter": ",", |
|||
"path": "fol/*_hello*.txt", |
|||
"readMode": "FULL", |
|||
"maxFileSize": 5, |
|||
"pollPeriod": 500, |
|||
"txtFileDataView": "SLICED", |
|||
"withSortingFiles": true, |
|||
"attributes": [ |
|||
{ |
|||
"key": "temp", |
|||
"value": "[1:]" |
|||
}, |
|||
{ |
|||
"key": "tmp", |
|||
"value": "[0:1]" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"type": "int", |
|||
"key": "[0:1]", |
|||
"value": "[0:1]" |
|||
}, |
|||
{ |
|||
"type": "int", |
|||
"key": "temp", |
|||
"value": "[1:]" |
|||
} |
|||
] |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"path": "fol/hello.json", |
|||
"deviceNameFilter": ".*", |
|||
"writingMode": "WRITE", |
|||
"valueExpression": "{'${attributeKey}':'${attributeValue}'}" |
|||
} |
|||
], |
|||
"serverSideRpc": [ |
|||
{ |
|||
"deviceNameFilter": ".*", |
|||
"methodFilter": "read", |
|||
"valueExpression": "${params}" |
|||
}, |
|||
{ |
|||
"deviceNameFilter": ".*", |
|||
"methodFilter": "write", |
|||
"valueExpression": "${params}" |
|||
} |
|||
] |
|||
} |
|||
@ -1,484 +0,0 @@ |
|||
{ |
|||
"3.5.2": { |
|||
"master": { |
|||
"slaves": [ |
|||
{ |
|||
"host": "127.0.0.1", |
|||
"port": 5021, |
|||
"type": "tcp", |
|||
"method": "socket", |
|||
"timeout": 35, |
|||
"byteOrder": "LITTLE", |
|||
"wordOrder": "LITTLE", |
|||
"retries": true, |
|||
"retryOnEmpty": true, |
|||
"retryOnInvalid": true, |
|||
"pollPeriod": 5000, |
|||
"unitId": 1, |
|||
"deviceName": "Temp Sensor", |
|||
"deviceType": "default", |
|||
"connectAttemptTimeMs": 5000, |
|||
"connectAttemptCount": 5, |
|||
"waitAfterFailedAttemptsMs": 300000, |
|||
"reportStrategy": { |
|||
"type": "ON_REPORT_PERIOD", |
|||
"reportPeriod": 30000 |
|||
}, |
|||
"attributes": [ |
|||
{ |
|||
"tag": "string_read", |
|||
"type": "string", |
|||
"functionCode": 4, |
|||
"objectsCount": 4, |
|||
"address": 1, |
|||
"reportStrategy": { |
|||
"type": "ON_REPORT_PERIOD", |
|||
"reportPeriod": 15000 |
|||
} |
|||
}, |
|||
{ |
|||
"tag": "bits_read", |
|||
"type": "bits", |
|||
"functionCode": 4, |
|||
"objectsCount": 1, |
|||
"address": 5 |
|||
}, |
|||
{ |
|||
"tag": "8int_read", |
|||
"type": "8int", |
|||
"functionCode": 4, |
|||
"objectsCount": 1, |
|||
"address": 6 |
|||
}, |
|||
{ |
|||
"tag": "16int_read", |
|||
"type": "16int", |
|||
"functionCode": 4, |
|||
"objectsCount": 1, |
|||
"address": 7 |
|||
}, |
|||
{ |
|||
"tag": "32int_read_divider", |
|||
"type": "32int", |
|||
"functionCode": 4, |
|||
"objectsCount": 2, |
|||
"address": 8, |
|||
"divider": 10 |
|||
}, |
|||
{ |
|||
"tag": "8int_read_multiplier", |
|||
"type": "8int", |
|||
"functionCode": 4, |
|||
"objectsCount": 1, |
|||
"address": 10, |
|||
"multiplier": 10 |
|||
}, |
|||
{ |
|||
"tag": "32int_read", |
|||
"type": "32int", |
|||
"functionCode": 4, |
|||
"objectsCount": 2, |
|||
"address": 11 |
|||
}, |
|||
{ |
|||
"tag": "64int_read", |
|||
"type": "64int", |
|||
"functionCode": 4, |
|||
"objectsCount": 4, |
|||
"address": 13 |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"tag": "8uint_read", |
|||
"type": "8uint", |
|||
"functionCode": 4, |
|||
"objectsCount": 1, |
|||
"address": 17, |
|||
"reportStrategy": { |
|||
"type": "ON_REPORT_PERIOD", |
|||
"reportPeriod": 15000 |
|||
} |
|||
}, |
|||
{ |
|||
"tag": "16uint_read", |
|||
"type": "16uint", |
|||
"functionCode": 4, |
|||
"objectsCount": 2, |
|||
"address": 18 |
|||
}, |
|||
{ |
|||
"tag": "32uint_read", |
|||
"type": "32uint", |
|||
"functionCode": 4, |
|||
"objectsCount": 4, |
|||
"address": 20 |
|||
}, |
|||
{ |
|||
"tag": "64uint_read", |
|||
"type": "64uint", |
|||
"functionCode": 4, |
|||
"objectsCount": 1, |
|||
"address": 24 |
|||
}, |
|||
{ |
|||
"tag": "16float_read", |
|||
"type": "16float", |
|||
"functionCode": 4, |
|||
"objectsCount": 1, |
|||
"address": 25 |
|||
}, |
|||
{ |
|||
"tag": "32float_read", |
|||
"type": "32float", |
|||
"functionCode": 4, |
|||
"objectsCount": 2, |
|||
"address": 26 |
|||
}, |
|||
{ |
|||
"tag": "64float_read", |
|||
"type": "64float", |
|||
"functionCode": 4, |
|||
"objectsCount": 4, |
|||
"address": 28 |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"tag": "shared_attribute_write", |
|||
"type": "32int", |
|||
"functionCode": 6, |
|||
"objectsCount": 2, |
|||
"address": 29 |
|||
} |
|||
], |
|||
"rpc": [ |
|||
{ |
|||
"tag": "setValue", |
|||
"type": "bits", |
|||
"functionCode": 5, |
|||
"objectsCount": 1, |
|||
"address": 31 |
|||
}, |
|||
{ |
|||
"tag": "getValue", |
|||
"type": "bits", |
|||
"functionCode": 1, |
|||
"objectsCount": 1, |
|||
"address": 31 |
|||
}, |
|||
{ |
|||
"tag": "setCPUFanSpeed", |
|||
"type": "32int", |
|||
"functionCode": 16, |
|||
"objectsCount": 2, |
|||
"address": 33 |
|||
}, |
|||
{ |
|||
"tag": "getCPULoad", |
|||
"type": "32int", |
|||
"functionCode": 4, |
|||
"objectsCount": 2, |
|||
"address": 35 |
|||
} |
|||
] |
|||
} |
|||
] |
|||
}, |
|||
"slave": { |
|||
"type": "tcp", |
|||
"host": "127.0.0.1", |
|||
"port": 5026, |
|||
"method": "socket", |
|||
"deviceName": "Modbus Slave Example", |
|||
"deviceType": "default", |
|||
"pollPeriod": 5000, |
|||
"sendDataToThingsBoard": false, |
|||
"byteOrder": "LITTLE", |
|||
"wordOrder": "LITTLE", |
|||
"unitId": 0, |
|||
"values": { |
|||
"holding_registers": { |
|||
"attributes": [ |
|||
{ |
|||
"address": 1, |
|||
"type": "string", |
|||
"tag": "sm", |
|||
"objectsCount": 1, |
|||
"value": "ON" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"address": 2, |
|||
"type": "8int", |
|||
"tag": "smm", |
|||
"objectsCount": 1, |
|||
"value": "12334" |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"tag": "shared_attribute_write", |
|||
"type": "32int", |
|||
"functionCode": 6, |
|||
"objectsCount": 2, |
|||
"address": 29, |
|||
"value": 1243 |
|||
} |
|||
], |
|||
"rpc": [ |
|||
{ |
|||
"tag": "setValue", |
|||
"type": "bits", |
|||
"functionCode": 5, |
|||
"objectsCount": 1, |
|||
"address": 31, |
|||
"value": 22 |
|||
} |
|||
] |
|||
}, |
|||
"coils_initializer": { |
|||
"attributes": [ |
|||
{ |
|||
"address": 5, |
|||
"type": "8int", |
|||
"tag": "coil", |
|||
"objectsCount": 1, |
|||
"value": 0 |
|||
} |
|||
], |
|||
"timeseries": [], |
|||
"attributeUpdates": [], |
|||
"rpc": [] |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
"legacy": { |
|||
"master": { |
|||
"slaves": [ |
|||
{ |
|||
"host": "127.0.0.1", |
|||
"port": 5021, |
|||
"type": "tcp", |
|||
"method": "socket", |
|||
"timeout": 35, |
|||
"byteOrder": "LITTLE", |
|||
"wordOrder": "LITTLE", |
|||
"retries": true, |
|||
"retryOnEmpty": true, |
|||
"retryOnInvalid": true, |
|||
"pollPeriod": 5000, |
|||
"unitId": 1, |
|||
"deviceName": "Temp Sensor", |
|||
"sendDataOnlyOnChange": true, |
|||
"connectAttemptTimeMs": 5000, |
|||
"connectAttemptCount": 5, |
|||
"waitAfterFailedAttemptsMs": 300000, |
|||
"attributes": [ |
|||
{ |
|||
"tag": "string_read", |
|||
"type": "string", |
|||
"functionCode": 4, |
|||
"objectsCount": 4, |
|||
"address": 1 |
|||
}, |
|||
{ |
|||
"tag": "bits_read", |
|||
"type": "bits", |
|||
"functionCode": 4, |
|||
"objectsCount": 1, |
|||
"address": 5 |
|||
}, |
|||
{ |
|||
"tag": "16int_read", |
|||
"type": "16int", |
|||
"functionCode": 4, |
|||
"objectsCount": 1, |
|||
"address": 7 |
|||
}, |
|||
{ |
|||
"tag": "32int_read_divider", |
|||
"type": "32int", |
|||
"functionCode": 4, |
|||
"objectsCount": 2, |
|||
"address": 8, |
|||
"divider": 10 |
|||
}, |
|||
{ |
|||
"tag": "32int_read", |
|||
"type": "32int", |
|||
"functionCode": 4, |
|||
"objectsCount": 2, |
|||
"address": 11 |
|||
}, |
|||
{ |
|||
"tag": "64int_read", |
|||
"type": "64int", |
|||
"functionCode": 4, |
|||
"objectsCount": 4, |
|||
"address": 13 |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"tag": "16uint_read", |
|||
"type": "16uint", |
|||
"functionCode": 4, |
|||
"objectsCount": 2, |
|||
"address": 18 |
|||
}, |
|||
{ |
|||
"tag": "32uint_read", |
|||
"type": "32uint", |
|||
"functionCode": 4, |
|||
"objectsCount": 4, |
|||
"address": 20 |
|||
}, |
|||
{ |
|||
"tag": "64uint_read", |
|||
"type": "64uint", |
|||
"functionCode": 4, |
|||
"objectsCount": 1, |
|||
"address": 24 |
|||
}, |
|||
{ |
|||
"tag": "16float_read", |
|||
"type": "16float", |
|||
"functionCode": 4, |
|||
"objectsCount": 1, |
|||
"address": 25 |
|||
}, |
|||
{ |
|||
"tag": "32float_read", |
|||
"type": "32float", |
|||
"functionCode": 4, |
|||
"objectsCount": 2, |
|||
"address": 26 |
|||
}, |
|||
{ |
|||
"tag": "64float_read", |
|||
"type": "64float", |
|||
"functionCode": 4, |
|||
"objectsCount": 4, |
|||
"address": 28 |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"tag": "shared_attribute_write", |
|||
"type": "32int", |
|||
"functionCode": 6, |
|||
"objectsCount": 2, |
|||
"address": 29 |
|||
} |
|||
], |
|||
"rpc": [ |
|||
{ |
|||
"tag": "setValue", |
|||
"type": "bits", |
|||
"functionCode": 5, |
|||
"objectsCount": 1, |
|||
"address": 31 |
|||
}, |
|||
{ |
|||
"tag": "getValue", |
|||
"type": "bits", |
|||
"functionCode": 1, |
|||
"objectsCount": 1, |
|||
"address": 31 |
|||
}, |
|||
{ |
|||
"tag": "setCPUFanSpeed", |
|||
"type": "32int", |
|||
"functionCode": 16, |
|||
"objectsCount": 2, |
|||
"address": 33 |
|||
}, |
|||
{ |
|||
"tag": "getCPULoad", |
|||
"type": "32int", |
|||
"functionCode": 4, |
|||
"objectsCount": 2, |
|||
"address": 35 |
|||
} |
|||
] |
|||
} |
|||
] |
|||
}, |
|||
"slave": { |
|||
"type": "tcp", |
|||
"host": "127.0.0.1", |
|||
"port": 5026, |
|||
"method": "socket", |
|||
"deviceName": "Modbus Slave Example", |
|||
"deviceType": "default", |
|||
"pollPeriod": 5000, |
|||
"sendDataToThingsBoard": false, |
|||
"byteOrder": "LITTLE", |
|||
"wordOrder": "LITTLE", |
|||
"unitId": 0, |
|||
"values": { |
|||
"holding_registers": [ |
|||
{ |
|||
"attributes": [ |
|||
{ |
|||
"address": 1, |
|||
"type": "string", |
|||
"tag": "sm", |
|||
"objectsCount": 1, |
|||
"value": "ON" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"address": 2, |
|||
"type": "int", |
|||
"tag": "smm", |
|||
"objectsCount": 1, |
|||
"value": "12334" |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"tag": "shared_attribute_write", |
|||
"type": "32int", |
|||
"functionCode": 6, |
|||
"objectsCount": 2, |
|||
"address": 29, |
|||
"value": 1243 |
|||
} |
|||
], |
|||
"rpc": [ |
|||
{ |
|||
"tag": "setValue", |
|||
"type": "bits", |
|||
"functionCode": 5, |
|||
"objectsCount": 1, |
|||
"address": 31, |
|||
"value": 22 |
|||
} |
|||
] |
|||
} |
|||
], |
|||
"coils_initializer": [ |
|||
{ |
|||
"attributes": [ |
|||
{ |
|||
"address": 5, |
|||
"type": "string", |
|||
"tag": "sm", |
|||
"objectsCount": 1, |
|||
"value": "12" |
|||
} |
|||
], |
|||
"timeseries": [], |
|||
"attributeUpdates": [], |
|||
"rpc": [] |
|||
} |
|||
] |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,398 +0,0 @@ |
|||
{ |
|||
"3.5.2": { |
|||
"broker": { |
|||
"host": "127.0.0.1", |
|||
"port": 1883, |
|||
"clientId": "ThingsBoard_gateway", |
|||
"version": 5, |
|||
"maxMessageNumberPerWorker": 10, |
|||
"maxNumberOfWorkers": 100, |
|||
"sendDataOnlyOnChange": false, |
|||
"security": { |
|||
"type": "anonymous" |
|||
} |
|||
}, |
|||
"mapping": [ |
|||
{ |
|||
"topicFilter": "sensor/data", |
|||
"subscriptionQos": 1, |
|||
"converter": { |
|||
"type": "json", |
|||
"deviceInfo": { |
|||
"deviceNameExpressionSource": "message", |
|||
"deviceNameExpression": "${serialNumber}", |
|||
"deviceProfileExpressionSource": "message", |
|||
"deviceProfileExpression": "${sensorType}" |
|||
}, |
|||
"sendDataOnlyOnChange": false, |
|||
"timeout": 60000, |
|||
"attributes": [ |
|||
{ |
|||
"type": "string", |
|||
"key": "model", |
|||
"value": "${sensorModel}" |
|||
}, |
|||
{ |
|||
"type": "string", |
|||
"key": "${sensorModel}", |
|||
"value": "on" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"type": "string", |
|||
"key": "temperature", |
|||
"value": "${temp}" |
|||
}, |
|||
{ |
|||
"type": "double", |
|||
"key": "humidity", |
|||
"value": "${hum}" |
|||
}, |
|||
{ |
|||
"type": "string", |
|||
"key": "combine", |
|||
"value": "${hum}:${temp}" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
{ |
|||
"topicFilter": "sensor/+/data", |
|||
"subscriptionQos": 1, |
|||
"converter": { |
|||
"type": "json", |
|||
"deviceInfo": { |
|||
"deviceNameExpressionSource": "topic", |
|||
"deviceNameExpression": "(?<=sensor\/)(.*?)(?=\/data)", |
|||
"deviceProfileExpressionSource": "constant", |
|||
"deviceProfileExpression": "Thermometer" |
|||
}, |
|||
"sendDataOnlyOnChange": false, |
|||
"timeout": 60000, |
|||
"attributes": [ |
|||
{ |
|||
"type": "string", |
|||
"key": "model", |
|||
"value": "${sensorModel}" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"type": "double", |
|||
"key": "temperature", |
|||
"value": "${temp}" |
|||
}, |
|||
{ |
|||
"type": "string", |
|||
"key": "humidity", |
|||
"value": "${hum}" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
{ |
|||
"topicFilter": "sensor/raw_data", |
|||
"subscriptionQos": 1, |
|||
"converter": { |
|||
"type": "bytes", |
|||
"deviceInfo": { |
|||
"deviceNameExpressionSource": "message", |
|||
"deviceNameExpression": "[0:4]", |
|||
"deviceProfileExpressionSource": "constant", |
|||
"deviceProfileExpression": "default" |
|||
}, |
|||
"sendDataOnlyOnChange": false, |
|||
"timeout": 60000, |
|||
"attributes": [ |
|||
{ |
|||
"type": "raw", |
|||
"key": "rawData", |
|||
"value": "[:]" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"type": "raw", |
|||
"key": "temp", |
|||
"value": "[4:]" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
{ |
|||
"topicFilter": "custom/sensors/+", |
|||
"subscriptionQos": 1, |
|||
"converter": { |
|||
"type": "custom", |
|||
"extension": "CustomMqttUplinkConverter", |
|||
"cached": true, |
|||
"extensionConfig": { |
|||
"temperature": 2, |
|||
"humidity": 2, |
|||
"batteryLevel": 1 |
|||
} |
|||
} |
|||
} |
|||
], |
|||
"requestsMapping": { |
|||
"connectRequests": [ |
|||
{ |
|||
"topicFilter": "sensor/connect", |
|||
"deviceInfo": { |
|||
"deviceNameExpressionSource": "message", |
|||
"deviceNameExpression": "${serialNumber}", |
|||
"deviceProfileExpressionSource": "constant", |
|||
"deviceProfileExpression": "Thermometer" |
|||
} |
|||
}, |
|||
{ |
|||
"topicFilter": "sensor/+/connect", |
|||
"deviceInfo": { |
|||
"deviceNameExpressionSource": "topic", |
|||
"deviceNameExpression": "(?<=sensor\/)(.*?)(?=\/connect)", |
|||
"deviceProfileExpressionSource": "constant", |
|||
"deviceProfileExpression": "Thermometer" |
|||
} |
|||
} |
|||
], |
|||
"disconnectRequests": [ |
|||
{ |
|||
"topicFilter": "sensor/disconnect", |
|||
"deviceInfo": { |
|||
"deviceNameExpressionSource": "message", |
|||
"deviceNameExpression": "${serialNumber}" |
|||
} |
|||
}, |
|||
{ |
|||
"topicFilter": "sensor/+/disconnect", |
|||
"deviceInfo": { |
|||
"deviceNameExpressionSource": "topic", |
|||
"deviceNameExpression": "(?<=sensor\/)(.*?)(?=\/connect)" |
|||
} |
|||
} |
|||
], |
|||
"attributeRequests": [ |
|||
{ |
|||
"retain": false, |
|||
"topicFilter": "v1/devices/me/attributes/request", |
|||
"deviceInfo": { |
|||
"deviceNameExpressionSource": "message", |
|||
"deviceNameExpression": "${serialNumber}" |
|||
}, |
|||
"attributeNameExpressionSource": "message", |
|||
"attributeNameExpression": "${versionAttribute}, ${pduAttribute}", |
|||
"topicExpression": "devices/${deviceName}/attrs", |
|||
"valueExpression": "${attributeKey}: ${attributeValue}" |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"retain": true, |
|||
"deviceNameFilter": ".*", |
|||
"attributeFilter": "firmwareVersion", |
|||
"topicExpression": "sensor/${deviceName}/${attributeKey}", |
|||
"valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}" |
|||
} |
|||
], |
|||
"serverSideRpc": [ |
|||
{ |
|||
"type": "twoWay", |
|||
"deviceNameFilter": ".*", |
|||
"methodFilter": "echo", |
|||
"requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}", |
|||
"responseTopicExpression": "sensor/${deviceName}/response/${methodName}/${requestId}", |
|||
"responseTopicQoS": 1, |
|||
"responseTimeout": 10000, |
|||
"valueExpression": "${params}" |
|||
}, |
|||
{ |
|||
"type": "oneWay", |
|||
"deviceNameFilter": ".*", |
|||
"methodFilter": "no-reply", |
|||
"requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}", |
|||
"valueExpression": "${params}" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
"legacy": { |
|||
"broker": { |
|||
"name": "Default Local Broker", |
|||
"host": "127.0.0.1", |
|||
"port": 1883, |
|||
"clientId": "ThingsBoard_gateway", |
|||
"version": 5, |
|||
"maxMessageNumberPerWorker": 10, |
|||
"maxNumberOfWorkers": 100, |
|||
"sendDataOnlyOnChange": false, |
|||
"security": { |
|||
"type": "basic", |
|||
"username": "user", |
|||
"password": "password" |
|||
} |
|||
}, |
|||
"mapping": [ |
|||
{ |
|||
"topicFilter": "sensor/data", |
|||
"converter": { |
|||
"type": "json", |
|||
"deviceNameJsonExpression": "${serialNumber}", |
|||
"deviceTypeJsonExpression": "${sensorType}", |
|||
"sendDataOnlyOnChange": false, |
|||
"timeout": 60000, |
|||
"attributes": [ |
|||
{ |
|||
"type": "string", |
|||
"key": "model", |
|||
"value": "${sensorModel}" |
|||
}, |
|||
{ |
|||
"type": "string", |
|||
"key": "${sensorModel}", |
|||
"value": "on" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"type": "double", |
|||
"key": "temperature", |
|||
"value": "${temp}" |
|||
}, |
|||
{ |
|||
"type": "double", |
|||
"key": "humidity", |
|||
"value": "${hum}" |
|||
}, |
|||
{ |
|||
"type": "string", |
|||
"key": "combine", |
|||
"value": "${hum}:${temp}" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
{ |
|||
"topicFilter": "sensor/+/data", |
|||
"converter": { |
|||
"type": "json", |
|||
"deviceNameTopicExpression": "(?<=sensor\/)(.*?)(?=\/data)", |
|||
"deviceTypeTopicExpression": "Thermometer", |
|||
"sendDataOnlyOnChange": false, |
|||
"timeout": 60000, |
|||
"attributes": [ |
|||
{ |
|||
"type": "string", |
|||
"key": "model", |
|||
"value": "${sensorModel}" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"type": "double", |
|||
"key": "temperature", |
|||
"value": "${temp}" |
|||
}, |
|||
{ |
|||
"type": "double", |
|||
"key": "humidity", |
|||
"value": "${hum}" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
{ |
|||
"topicFilter": "sensor/raw_data", |
|||
"converter": { |
|||
"type": "bytes", |
|||
"deviceNameExpression": "[0:4]", |
|||
"deviceTypeExpression": "default", |
|||
"sendDataOnlyOnChange": false, |
|||
"timeout": 60000, |
|||
"attributes": [ |
|||
{ |
|||
"type": "raw", |
|||
"key": "rawData", |
|||
"value": "[:]" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"type": "raw", |
|||
"key": "temp", |
|||
"value": "[4:]" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
{ |
|||
"topicFilter": "custom/sensors/+", |
|||
"converter": { |
|||
"type": "custom", |
|||
"extension": "CustomMqttUplinkConverter", |
|||
"cached": true, |
|||
"extension-config": { |
|||
"temperatureBytes": 2, |
|||
"humidityBytes": 2, |
|||
"batteryLevelBytes": 1 |
|||
} |
|||
} |
|||
} |
|||
], |
|||
"connectRequests": [ |
|||
{ |
|||
"topicFilter": "sensor/connect", |
|||
"deviceNameJsonExpression": "${serialNumber}" |
|||
}, |
|||
{ |
|||
"topicFilter": "sensor/+/connect", |
|||
"deviceNameTopicExpression": "(?<=sensor\/)(.*?)(?=\/connect)" |
|||
} |
|||
], |
|||
"disconnectRequests": [ |
|||
{ |
|||
"topicFilter": "sensor/disconnect", |
|||
"deviceNameJsonExpression": "${serialNumber}" |
|||
}, |
|||
{ |
|||
"topicFilter": "sensor/+/disconnect", |
|||
"deviceNameTopicExpression": "(?<=sensor\/)(.*?)(?=\/disconnect)" |
|||
} |
|||
], |
|||
"attributeRequests": [ |
|||
{ |
|||
"retain": false, |
|||
"topicFilter": "v1/devices/me/attributes/request", |
|||
"deviceNameJsonExpression": "${serialNumber}", |
|||
"attributeNameJsonExpression": "${versionAttribute}, ${pduAttribute}", |
|||
"topicExpression": "devices/${deviceName}/attrs", |
|||
"valueExpression": "${attributeKey}: ${attributeValue}" |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"retain": true, |
|||
"deviceNameFilter": ".*", |
|||
"attributeFilter": "firmwareVersion", |
|||
"topicExpression": "sensor/${deviceName}/${attributeKey}", |
|||
"valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}" |
|||
} |
|||
], |
|||
"serverSideRpc": [ |
|||
{ |
|||
"deviceNameFilter": ".*", |
|||
"methodFilter": "echo", |
|||
"requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}", |
|||
"responseTopicExpression": "sensor/${deviceName}/response/${methodName}/${requestId}", |
|||
"responseTimeout": 10000, |
|||
"valueExpression": "${params}" |
|||
}, |
|||
{ |
|||
"deviceNameFilter": ".*", |
|||
"methodFilter": "no-reply", |
|||
"requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}", |
|||
"valueExpression": "${params}" |
|||
} |
|||
] |
|||
} |
|||
} |
|||
@ -1,66 +0,0 @@ |
|||
{ |
|||
"centralSystem": { |
|||
"name": "Central System", |
|||
"host": "127.0.0.1", |
|||
"port": 9000, |
|||
"connection": { |
|||
"type": "insecure" |
|||
}, |
|||
"security": [ |
|||
{ |
|||
"type": "token", |
|||
"tokens": [ |
|||
"Bearer ACCESS_TOKEN" |
|||
] |
|||
}, |
|||
{ |
|||
"type": "basic", |
|||
"credentials": [ |
|||
{ |
|||
"username": "admin", |
|||
"password": "admin" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
}, |
|||
"chargePoints": [ |
|||
{ |
|||
"idRegexpPattern": "bidon/hello/CP_1", |
|||
"deviceNameExpression": "${Vendor} ${Model}", |
|||
"deviceTypeExpression": "default", |
|||
"attributes": [ |
|||
{ |
|||
"messageTypeFilter": "MeterValues,", |
|||
"key": "temp1", |
|||
"value": "${meter_value[:].sampled_value[:].value}" |
|||
}, |
|||
{ |
|||
"messageTypeFilter": "MeterValues,", |
|||
"key": "vendorId", |
|||
"value": "${connector_id}" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"messageTypeFilter": "DataTransfer,", |
|||
"key": "temp", |
|||
"value": "${data.temp}" |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"attributeOnThingsBoard": "shared", |
|||
"valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}" |
|||
} |
|||
], |
|||
"serverSideRpc": [ |
|||
{ |
|||
"methodRPC": "rpc1", |
|||
"withResponse": true, |
|||
"valueExpression": "${params}" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
@ -1,58 +0,0 @@ |
|||
{ |
|||
"connection": { |
|||
"str": "Driver={PostgreSQL};Server=localhost;Port=5432;Database=thingsboard;Uid=postgres;Pwd=postgres;", |
|||
"attributes": { |
|||
"autocommit": true, |
|||
"timeout": 0 |
|||
}, |
|||
"encoding": "utf-8", |
|||
"decoding": { |
|||
"char": "utf-8", |
|||
"wchar": "utf-8", |
|||
"metadata": "utf-16le" |
|||
}, |
|||
"reconnect": true, |
|||
"reconnectPeriod": 60 |
|||
}, |
|||
"pyodbc": { |
|||
"pooling": false |
|||
}, |
|||
"polling": { |
|||
"query": "SELECT bool_v, str_v, dbl_v, long_v, entity_id, ts FROM ts_kv WHERE ts > ? ORDER BY ts ASC LIMIT 10", |
|||
"period": 10, |
|||
"iterator": { |
|||
"column": "ts", |
|||
"query": "SELECT MIN(ts) - 1 FROM ts_kv", |
|||
"persistent": false |
|||
} |
|||
}, |
|||
"mapping": { |
|||
"device": { |
|||
"type": "postgres", |
|||
"name": "'ODBC ' + entity_id" |
|||
}, |
|||
"sendDataOnlyOnChange": false, |
|||
"attributes": "*", |
|||
"timeseries": [ |
|||
{ |
|||
"name": "value", |
|||
"value": "[i for i in [str_v, long_v, dbl_v,bool_v] if i is not None][0]" |
|||
} |
|||
] |
|||
}, |
|||
"serverSideRpc": { |
|||
"enableUnknownRpc": false, |
|||
"overrideRpcConfig": true, |
|||
"methods": [ |
|||
"procedureOne", |
|||
{ |
|||
"name": "procedureTwo", |
|||
"args": [ |
|||
"One", |
|||
2, |
|||
3.0 |
|||
] |
|||
} |
|||
] |
|||
} |
|||
} |
|||
@ -1,120 +0,0 @@ |
|||
{ |
|||
"3.5.2": { |
|||
"server": { |
|||
"url": "localhost:4840/freeopcua/server/", |
|||
"timeoutInMillis": 5000, |
|||
"scanPeriodInMillis": 3600000, |
|||
"pollPeriodInMillis": 5000, |
|||
"enableSubscriptions": true, |
|||
"subCheckPeriodInMillis": 100, |
|||
"showMap": false, |
|||
"security": "Basic128Rsa15", |
|||
"identity": { |
|||
"type": "anonymous" |
|||
} |
|||
}, |
|||
"mapping": [{ |
|||
"deviceNodePattern": "Root\\.Objects\\.Device1", |
|||
"deviceNodeSource": "path", |
|||
"deviceInfo": { |
|||
"deviceNameExpression": "Device ${Root\\.Objects\\.Device1\\.serialNumber}", |
|||
"deviceNameExpressionSource": "path", |
|||
"deviceProfileExpression": "Device", |
|||
"deviceProfileExpressionSource": "constant" |
|||
}, |
|||
"attributes": [ |
|||
{ |
|||
"key": "temperature °C", |
|||
"type": "path", |
|||
"value": "${ns=2;i=5}" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"key": "humidity", |
|||
"type": "path", |
|||
"value": "${Root\\.Objects\\.Device1\\.TemperatureAndHumiditySensor\\.Humidity}" |
|||
}, |
|||
{ |
|||
"key": "batteryLevel", |
|||
"type": "path", |
|||
"value": "${Battery\\.batteryLevel}" |
|||
} |
|||
], |
|||
"rpc_methods": [ |
|||
{ |
|||
"method": "multiply", |
|||
"arguments": [ |
|||
{ |
|||
"type": "integer", |
|||
"value": 2 |
|||
}, |
|||
{ |
|||
"type": "integer", |
|||
"value": 4 |
|||
} |
|||
] |
|||
} |
|||
], |
|||
"attributes_updates": [ |
|||
{ |
|||
"key": "deviceName", |
|||
"type": "path", |
|||
"value": "Root\\.Objects\\.Device1\\.serialNumber" |
|||
} |
|||
] |
|||
}] |
|||
}, |
|||
"legacy": { |
|||
"server": { |
|||
"name": "OPC-UA Default Server", |
|||
"url": "localhost:4840/freeopcua/server/", |
|||
"timeoutInMillis": 5000, |
|||
"scanPeriodInMillis": 5000, |
|||
"disableSubscriptions": false, |
|||
"subCheckPeriodInMillis": 100, |
|||
"showMap": false, |
|||
"security": "Basic128Rsa15", |
|||
"identity": { |
|||
"type": "anonymous" |
|||
}, |
|||
"mapping": [ |
|||
{ |
|||
"deviceNodePattern": "Root\\.Objects\\.Device1", |
|||
"deviceNamePattern": "Device ${Root\\.Objects\\.Device1\\.serialNumber}", |
|||
"attributes": [ |
|||
{ |
|||
"key": "temperature °C", |
|||
"path": "${ns=2;i=5}" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"key": "humidity", |
|||
"path": "${Root\\.Objects\\.Device1\\.TemperatureAndHumiditySensor\\.Humidity}" |
|||
}, |
|||
{ |
|||
"key": "batteryLevel", |
|||
"path": "${Battery\\.batteryLevel}" |
|||
} |
|||
], |
|||
"rpc_methods": [ |
|||
{ |
|||
"method": "multiply", |
|||
"arguments": [ |
|||
2, |
|||
4 |
|||
] |
|||
} |
|||
], |
|||
"attributes_updates": [ |
|||
{ |
|||
"attributeOnThingsBoard": "deviceName", |
|||
"attributeOnDevice": "Root\\.Objects\\.Device1\\.serialNumber" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
} |
|||
} |
|||
@ -1,53 +0,0 @@ |
|||
{ |
|||
"server": { |
|||
"name": "OPC-UA Default Server", |
|||
"url": "localhost:4840/freeopcua/server/", |
|||
"timeoutInMillis": 5000, |
|||
"scanPeriodInMillis": 3600000, |
|||
"pollPeriodInMillis": 5000, |
|||
"disableSubscriptions": false, |
|||
"subCheckPeriodInMillis": 100, |
|||
"showMap": false, |
|||
"security": "Basic128Rsa15", |
|||
"identity": { |
|||
"type": "anonymous" |
|||
}, |
|||
"mapping": [ |
|||
{ |
|||
"deviceNodePattern": "Root\\.Objects\\.Device1", |
|||
"deviceNamePattern": "Device ${Root\\.Objects\\.Device1\\.serialNumber}", |
|||
"attributes": [ |
|||
{ |
|||
"key": "temperature °C", |
|||
"path": "${ns=2;i=5}" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"key": "humidity", |
|||
"path": "${Root\\.Objects\\.Device1\\.TemperatureAndHumiditySensor\\.Humidity}" |
|||
}, |
|||
{ |
|||
"key": "batteryLevel", |
|||
"path": "${Battery\\.batteryLevel}" |
|||
} |
|||
], |
|||
"rpc_methods": [ |
|||
{ |
|||
"method": "multiply", |
|||
"arguments": [ |
|||
2, |
|||
4 |
|||
] |
|||
} |
|||
], |
|||
"attributes_updates": [ |
|||
{ |
|||
"attributeOnThingsBoard": "deviceName", |
|||
"attributeOnDevice": "Root\\.Objects\\.Device1\\.serialNumber" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
} |
|||
@ -1,169 +0,0 @@ |
|||
{ |
|||
"host": "http://127.0.0.1:5000", |
|||
"SSLVerify": true, |
|||
"security": { |
|||
"type": "basic", |
|||
"username": "user", |
|||
"password": "password" |
|||
}, |
|||
"mapping": [ |
|||
{ |
|||
"url": "getdata", |
|||
"httpMethod": "GET", |
|||
"httpHeaders": { |
|||
"ACCEPT": "application/json" |
|||
}, |
|||
"content": { |
|||
"name": "morpheus", |
|||
"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}" |
|||
}, |
|||
{ |
|||
"key": "combine", |
|||
"type": "string", |
|||
"value": "${Developer}:${hum}" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
{ |
|||
"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}", |
|||
"requestValueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}" |
|||
} |
|||
], |
|||
"serverSideRpc": [ |
|||
{ |
|||
"deviceNameFilter": ".*", |
|||
"methodFilter": "echo", |
|||
"requestUrlExpression": "sensor/${deviceName}/request/${methodName}/${requestId}", |
|||
"responseTimeout": 1, |
|||
"httpMethod": "GET", |
|||
"requestValueExpression": "${params}", |
|||
"responseValueExpression": "${temp}", |
|||
"timeout": 0.5, |
|||
"tries": 3, |
|||
"httpHeaders": { |
|||
"Content-Type": "application/json" |
|||
} |
|||
}, |
|||
{ |
|||
"deviceNameFilter": ".*", |
|||
"methodFilter": "no-reply", |
|||
"requestUrlExpression": "sensor/${deviceName}/request/${methodName}/${requestId}", |
|||
"httpMethod": "POST", |
|||
"requestValueExpression": "${params}", |
|||
"httpHeaders": { |
|||
"Content-Type": "application/json" |
|||
} |
|||
} |
|||
] |
|||
} |
|||
@ -1,190 +0,0 @@ |
|||
{ |
|||
"host": "127.0.0.1", |
|||
"port": "5000", |
|||
"SSL": false, |
|||
"security": { |
|||
"cert": "~/ssl/cert.pem", |
|||
"key": "~/ssl/key.pem" |
|||
}, |
|||
"mapping": [ |
|||
{ |
|||
"endpoint": "/my_devices", |
|||
"HTTPMethods": [ |
|||
"POST" |
|||
], |
|||
"security": { |
|||
"type": "anonymous" |
|||
}, |
|||
"converter": { |
|||
"type": "json", |
|||
"deviceNameExpression": "${sensorName}", |
|||
"deviceTypeExpression": "${sensorType}", |
|||
"attributes": [ |
|||
{ |
|||
"type": "string", |
|||
"key": "model", |
|||
"value": "${sensorModel}" |
|||
}, |
|||
{ |
|||
"type": "string", |
|||
"key": "certificateNumber", |
|||
"value": "${certificateNumber}" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"type": "double", |
|||
"key": "temperature", |
|||
"value": "${temp}" |
|||
}, |
|||
{ |
|||
"type": "double", |
|||
"key": "humidity", |
|||
"value": "${hum}" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
{ |
|||
"endpoint": "/anon1", |
|||
"HTTPMethods": [ |
|||
"GET", |
|||
"POST" |
|||
], |
|||
"security": { |
|||
"type": "anonymous" |
|||
}, |
|||
"converter": { |
|||
"type": "json", |
|||
"deviceNameExpression": "Device 2", |
|||
"deviceTypeExpression": "default", |
|||
"attributes": [ |
|||
{ |
|||
"type": "string", |
|||
"key": "model", |
|||
"value": "Model2" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"type": "double", |
|||
"key": "temperature", |
|||
"value": "${temp}" |
|||
}, |
|||
{ |
|||
"type": "double", |
|||
"key": "humidity", |
|||
"value": "${hum}" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
{ |
|||
"endpoint": "/anon2", |
|||
"HTTPMethods": [ |
|||
"POST" |
|||
], |
|||
"security": { |
|||
"type": "anonymous" |
|||
}, |
|||
"converter": { |
|||
"type": "custom", |
|||
"deviceNameExpression": "SuperAnonDevice", |
|||
"deviceTypeExpression": "default", |
|||
"extension": "CustomRestUplinkConverter", |
|||
"extension-config": [ |
|||
{ |
|||
"key": "Totaliser", |
|||
"datatype": "float", |
|||
"fromByte": 0, |
|||
"toByte": 4, |
|||
"byteorder": "big", |
|||
"signed": true, |
|||
"multiplier": 1 |
|||
} |
|||
] |
|||
} |
|||
} |
|||
], |
|||
"attributeRequests": [ |
|||
{ |
|||
"endpoint": "/sharedAttributes", |
|||
"type": "shared", |
|||
"HTTPMethods": [ |
|||
"POST" |
|||
], |
|||
"security": { |
|||
"type": "anonymous" |
|||
}, |
|||
"timeout": 10.0, |
|||
"deviceNameExpression": "${deviceName}", |
|||
"attributeNameExpression": "${attribute}${attribute1}" |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"HTTPMethod": "POST", |
|||
"SSLVerify": false, |
|||
"httpHeaders": { |
|||
"CONTENT-TYPE": "application/json" |
|||
}, |
|||
"security": { |
|||
"type": "anonymous" |
|||
}, |
|||
"timeout": 0.5, |
|||
"tries": 3, |
|||
"allowRedirects": true, |
|||
"deviceNameFilter": "SN.*", |
|||
"attributeFilter": ".*", |
|||
"requestUrlExpression": "http://127.0.0.1:5001/", |
|||
"valueExpression": "{\"deviceName\":\"${deviceName}\",\"${attributeKey}\":\"${attributeValue}\"}" |
|||
} |
|||
], |
|||
"serverSideRpc": [ |
|||
{ |
|||
"deviceNameFilter": ".*", |
|||
"methodFilter": "echo", |
|||
"requestUrlExpression": "http://127.0.0.1:5001/${deviceName}", |
|||
"responseTimeout": 1, |
|||
"HTTPMethod": "GET", |
|||
"valueExpression": "${params}", |
|||
"timeout": 10.0, |
|||
"tries": 3, |
|||
"httpHeaders": { |
|||
"Content-Type": "application/json" |
|||
}, |
|||
"security": { |
|||
"type": "anonymous" |
|||
} |
|||
}, |
|||
{ |
|||
"deviceNameFilter": "SN.*", |
|||
"methodFilter": "post_attributes", |
|||
"requestUrlExpression": "http://127.0.0.1:5000/my_devices", |
|||
"responseTimeout": 1, |
|||
"HTTPMethod": "POST", |
|||
"valueExpression": "{\"sensorName\":\"${deviceName}\", \"sensorModel\":\"${params.sensorModel}\", \"certificateNumber\":\"${params.certificateNumber}\", \"temp\":\"${params.temp}\", \"hum\":\"${params.hum}\"}", |
|||
"timeout": 10.0, |
|||
"tries": 3, |
|||
"httpHeaders": { |
|||
"Content-Type": "application/json" |
|||
}, |
|||
"security": { |
|||
"type": "anonymous" |
|||
} |
|||
}, |
|||
{ |
|||
"deviceNameFilter": ".*", |
|||
"methodFilter": "no-reply", |
|||
"requestUrlExpression": "sensor/${deviceName}/request/${methodName}/${requestId}", |
|||
"HTTPMethod": "POST", |
|||
"valueExpression": "${params}", |
|||
"httpHeaders": { |
|||
"Content-Type": "application/json" |
|||
}, |
|||
"security": { |
|||
"type": "anonymous" |
|||
} |
|||
} |
|||
] |
|||
} |
|||
@ -1,138 +0,0 @@ |
|||
{ |
|||
"devices": [ |
|||
{ |
|||
"deviceName": "SNMP router", |
|||
"deviceType": "snmp", |
|||
"ip": "snmp.live.gambitcommunications.com", |
|||
"port": 161, |
|||
"pollPeriod": 5000, |
|||
"community": "public", |
|||
"attributes": [ |
|||
{ |
|||
"key": "ReceivedFromGet", |
|||
"method": "get", |
|||
"oid": "1.3.6.1.2.1.1.1.0", |
|||
"timeout": 6 |
|||
}, |
|||
{ |
|||
"key": "ReceivedFromMultiGet", |
|||
"method": "multiget", |
|||
"oid": [ |
|||
"1.3.6.1.2.1.1.1.0", |
|||
"1.3.6.1.2.1.1.2.0" |
|||
], |
|||
"timeout": 6 |
|||
}, |
|||
{ |
|||
"key": "ReceivedFromGetNext", |
|||
"method": "getnext", |
|||
"oid": "1.3.6.1.2.1.1.1.0", |
|||
"timeout": 6 |
|||
}, |
|||
{ |
|||
"key": "ReceivedFromMultiWalk", |
|||
"method": "multiwalk", |
|||
"oid": [ |
|||
"1.3.6.1.2.1.1.1.0", |
|||
"1.3.6.0.1.2.1" |
|||
] |
|||
}, |
|||
{ |
|||
"key": "ReceivedFromBulkWalk", |
|||
"method": "bulkwalk", |
|||
"oid": [ |
|||
"1.3.6.1.2.1.1.1.0", |
|||
"1.3.6.1.2.1.1.2.0" |
|||
] |
|||
}, |
|||
{ |
|||
"key": "ReceivedFromBulkGet", |
|||
"method": "bulkget", |
|||
"scalarOid": [ |
|||
"1.3.6.1.2.1.1.1.0", |
|||
"1.3.6.1.2.1.1.2.0" |
|||
], |
|||
"repeatingOid": [ |
|||
"1.3.6.1.2.1.1.1.0", |
|||
"1.3.6.1.2.1.1.2.0" |
|||
], |
|||
"maxListSize": 10 |
|||
} |
|||
], |
|||
"telemetry": [ |
|||
{ |
|||
"key": "ReceivedFromWalk", |
|||
"community": "private", |
|||
"method": "walk", |
|||
"oid": "1.3.6.1.2.1.1.1.0" |
|||
}, |
|||
{ |
|||
"key": "ReceivedFromTable", |
|||
"method": "table", |
|||
"oid": "1.3.6.1.2.1.1" |
|||
} |
|||
], |
|||
"attributeUpdateRequests": [ |
|||
{ |
|||
"attributeFilter": "dataToSet", |
|||
"method": "set", |
|||
"oid": "1.3.6.1.2.1.1.1.0" |
|||
}, |
|||
{ |
|||
"attributeFilter": "dataToMultiSet", |
|||
"method": "multiset", |
|||
"mappings": { |
|||
"1.2.3": "10", |
|||
"2.3.4": "${attribute}" |
|||
} |
|||
} |
|||
], |
|||
"serverSideRpcRequests": [ |
|||
{ |
|||
"requestFilter": "setData", |
|||
"method": "set", |
|||
"oid": "1.3.6.1.2.1.1.1.0" |
|||
}, |
|||
{ |
|||
"requestFilter": "multiSetData", |
|||
"method": "multiset" |
|||
}, |
|||
{ |
|||
"requestFilter": "getData", |
|||
"method": "get", |
|||
"oid": "1.3.6.1.2.1.1.1.0" |
|||
}, |
|||
{ |
|||
"requestFilter": "runBulkWalk", |
|||
"method": "bulkwalk", |
|||
"oid": [ |
|||
"1.3.6.1.2.1.1.1.0", |
|||
"1.3.6.1.2.1.1.2.0" |
|||
] |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
"deviceName": "SNMP router", |
|||
"deviceType": "snmp", |
|||
"ip": "127.0.0.1", |
|||
"pollPeriod": 5000, |
|||
"community": "public", |
|||
"converter": "CustomSNMPConverter", |
|||
"attributes": [ |
|||
{ |
|||
"key": "ReceivedFromGetWithCustomConverter", |
|||
"method": "get", |
|||
"oid": "1.3.6.1.2.1.1.1.0" |
|||
} |
|||
], |
|||
"telemetry": [ |
|||
{ |
|||
"key": "ReceivedFromTableWithCustomConverter", |
|||
"method": "table", |
|||
"oid": "1.3.6.1.2.1.1.1.0" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
@ -1,59 +0,0 @@ |
|||
{ |
|||
"type": "TCP", |
|||
"address": "127.0.0.1", |
|||
"port": 50000, |
|||
"bufferSize": 1024, |
|||
"devices": [ |
|||
{ |
|||
"address": "127.0.0.1:50001", |
|||
"deviceName": "Device Example", |
|||
"deviceType": "default", |
|||
"encoding": "utf-8", |
|||
"telemetry": [ |
|||
{ |
|||
"key": "temp", |
|||
"byteFrom": 0, |
|||
"byteTo": -1 |
|||
}, |
|||
{ |
|||
"key": "hum", |
|||
"byteFrom": 0, |
|||
"byteTo": 2 |
|||
} |
|||
], |
|||
"attributes": [ |
|||
{ |
|||
"key": "name", |
|||
"byteFrom": 0, |
|||
"byteTo": -1 |
|||
}, |
|||
{ |
|||
"key": "num", |
|||
"byteFrom": 2, |
|||
"byteTo": 4 |
|||
} |
|||
], |
|||
"attributeRequests": [ |
|||
{ |
|||
"type": "shared", |
|||
"requestExpression": "${[0:3]==atr}", |
|||
"attributeNameExpression": "[3:]" |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"encoding": "utf-16", |
|||
"attributeOnThingsBoard": "sharedName" |
|||
} |
|||
], |
|||
"serverSideRpc": [ |
|||
{ |
|||
"methodRPC": "rpcMethod1", |
|||
"withResponse": true, |
|||
"methodProcessing": "write", |
|||
"encoding": "utf-8" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
@ -1,53 +0,0 @@ |
|||
{ |
|||
"server": { |
|||
"jid": "gateway@localhost", |
|||
"password": "password", |
|||
"host": "localhost", |
|||
"port": 5222, |
|||
"use_ssl": false, |
|||
"disable_starttls": false, |
|||
"force_starttls": true, |
|||
"timeout": 10000, |
|||
"plugins": [ |
|||
"xep_0030", |
|||
"xep_0323", |
|||
"xep_0325" |
|||
] |
|||
}, |
|||
"devices": [ |
|||
{ |
|||
"jid": "device@localhost/TMP_1101", |
|||
"deviceNameExpression": "${serialNumber}", |
|||
"deviceTypeExpression": "default", |
|||
"attributes": [ |
|||
{ |
|||
"key": "temperature", |
|||
"value": "${temp}" |
|||
} |
|||
], |
|||
"timeseries": [ |
|||
{ |
|||
"key": "humidity", |
|||
"value": "${hum}" |
|||
}, |
|||
{ |
|||
"key": "combination", |
|||
"value": "${temp}:${hum}" |
|||
} |
|||
], |
|||
"attributeUpdates": [ |
|||
{ |
|||
"attributeOnThingsBoard": "shared", |
|||
"valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}" |
|||
} |
|||
], |
|||
"serverSideRpc": [ |
|||
{ |
|||
"methodRPC": "rpc1", |
|||
"withResponse": true, |
|||
"valueExpression": "${params}" |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
Loading…
Reference in new issue