245 lines
6.3 KiB
JSON
245 lines
6.3 KiB
JSON
{
|
|
"master": {
|
|
"slaves": [
|
|
{
|
|
"method": "rtu",
|
|
"baudrate": 9600,
|
|
"stopbits": 1,
|
|
"bytesize": 8,
|
|
"parity": "N",
|
|
"strict": true,
|
|
"unitId": 247,
|
|
"deviceName": "Test Flowmeter",
|
|
"deviceType": "piflow",
|
|
"timeout": 35,
|
|
"byteOrder": "LITTLE",
|
|
"wordOrder": "LITTLE",
|
|
"retries": true,
|
|
"retryOnEmpty": true,
|
|
"retryOnInvalid": true,
|
|
"pollPeriod": 5000,
|
|
"connectAttemptTimeMs": 5000,
|
|
"connectAttemptCount": 5,
|
|
"waitAfterFailedAttemptsMs": 300000,
|
|
"reportStrategy": {
|
|
"type": "ON_REPORT_PERIOD",
|
|
"reportPeriod": 600000
|
|
},
|
|
"type": "serial",
|
|
"attributes": [
|
|
{
|
|
"tag": "flow_unit",
|
|
"type": "16int",
|
|
"address": 2103,
|
|
"objectsCount": 1,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "totalizer_1_unit",
|
|
"type": "16int",
|
|
"address": 4604,
|
|
"objectsCount": 1,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "totalizer_2_unit",
|
|
"type": "16int",
|
|
"address": 4605,
|
|
"objectsCount": 1,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "totalizer_3_unit",
|
|
"type": "16int",
|
|
"address": 4606,
|
|
"objectsCount": 1,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "byte_order",
|
|
"type": "16int",
|
|
"address": 4915,
|
|
"objectsCount": 1,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "device_name",
|
|
"type": "string",
|
|
"address": 7238,
|
|
"objectsCount": 14,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "serial_number",
|
|
"type": "string",
|
|
"address": 7003,
|
|
"objectsCount": 12,
|
|
"functionCode": 4
|
|
}
|
|
],
|
|
"timeseries": [
|
|
{
|
|
"tag": "flowrate",
|
|
"type": "32float",
|
|
"address": 3874,
|
|
"objectsCount": 2,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "totalizer_1",
|
|
"type": "32float",
|
|
"address": 2610,
|
|
"objectsCount": 1,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "totalizer_1_overflow",
|
|
"type": "32float",
|
|
"address": 2612,
|
|
"objectsCount": 1,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "totalizer_2",
|
|
"type": "32float",
|
|
"address": 2810,
|
|
"objectsCount": 1,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "totalizer_2_overflow",
|
|
"type": "32float",
|
|
"address": 2812,
|
|
"objectsCount": 1,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "totalizer_3",
|
|
"type": "32float",
|
|
"address": 3010,
|
|
"objectsCount": 1,
|
|
"functionCode": 4
|
|
},
|
|
{
|
|
"tag": "totalizer_3_overflow",
|
|
"type": "32float",
|
|
"address": 3012,
|
|
"objectsCount": 1,
|
|
"functionCode": 4
|
|
}
|
|
],
|
|
"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": "resetTotalizers",
|
|
"type": "bits",
|
|
"functionCode": 1,
|
|
"objectsCount": 1,
|
|
"address": 2609
|
|
}
|
|
],
|
|
"port": "/dev/ttyS0"
|
|
}
|
|
]
|
|
},
|
|
"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": []
|
|
}
|
|
}
|
|
},
|
|
"logLevel": "INFO",
|
|
"name": "test",
|
|
"enableRemoteLogging": false,
|
|
"id": "ce7103fa-159f-4bdf-bcdc-137a74a604ef",
|
|
"configVersion": "3.5.3.1",
|
|
"reportStrategy": {
|
|
"type": "ON_REPORT_PERIOD",
|
|
"reportPeriod": 60000
|
|
}
|
|
} |