Sorry to bother you, but i still dont get it.
I try to read this adresses:
I still stuck at this: Here is my flow
[
{
"id": "0c822967e78b69a8",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "358b6aa83ce6ea0d",
"type": "inject",
"z": "0c822967e78b69a8",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "str",
"x": 130,
"y": 260,
"wires": [
[
"e230adbc9ea862c4"
]
]
},
{
"id": "e230adbc9ea862c4",
"type": "function",
"z": "0c822967e78b69a8",
"name": "",
"func": "msg.payload = \n{ value: msg.payload, \n'fc': 3, \n'unitid': 1, \n'address': 203, \n'quantity': 5 \n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 260,
"wires": [
[
"5b2aeaf54161d66b"
]
]
},
{
"id": "5b2aeaf54161d66b",
"type": "modbus-flex-getter",
"z": "0c822967e78b69a8",
"name": "",
"showStatusActivities": false,
"showErrors": false,
"logIOActivities": false,
"server": "0e3ec676f3e39293",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"keepMsgProperties": false,
"x": 580,
"y": 260,
"wires": [
[
"6c224f852a5edb5c",
"407924f80597fb2a"
],
[]
]
},
{
"id": "6c224f852a5edb5c",
"type": "modbus-response",
"z": "0c822967e78b69a8",
"name": "",
"registerShowMax": 20,
"x": 950,
"y": 100,
"wires": []
},
{
"id": "407924f80597fb2a",
"type": "buffer-parser",
"z": "0c822967e78b69a8",
"name": "",
"data": "payload",
"dataType": "msg",
"specification": "spec",
"specificationType": "ui",
"items": [
{
"type": "bool",
"name": "R203_0_Dosing",
"offset": 0,
"length": 1,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "bool",
"name": "R203_1_Warning",
"offset": 2,
"length": 1,
"offsetbit": 15,
"scale": "1",
"mask": ""
},
{
"type": "bool",
"name": "R203_2_Fault",
"offset": 8,
"length": 1,
"offsetbit": 0,
"scale": "1",
"mask": ""
},
{
"type": "bool",
"name": "R203_3_BUSCONTROLL",
"offset": 8,
"length": 1,
"offsetbit": 1,
"scale": "1",
"mask": ""
},
{
"type": "bool",
"name": "H204_Start/Stop",
"offset": 8,
"length": 1,
"offsetbit": 2,
"scale": "1",
"mask": ""
}
],
"swap1": "",
"swap2": "",
"swap3": "",
"swap1Type": "swap",
"swap2Type": "swap",
"swap3Type": "swap",
"msgProperty": "payload",
"msgPropertyType": "str",
"resultType": "keyvalue",
"resultTypeType": "return",
"multipleResult": false,
"fanOutMultipleResult": false,
"setTopic": true,
"outputs": 1,
"x": 790,
"y": 480,
"wires": [
[
"1166e304f40ba8b8"
]
]
},
{
"id": "1166e304f40ba8b8",
"type": "debug",
"z": "0c822967e78b69a8",
"name": "payload",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 1080,
"y": 360,
"wires": []
},
{
"id": "0e3ec676f3e39293",
"type": "modbus-client",
"name": "CIM500",
"clienttype": "tcp",
"bufferCommands": true,
"stateLogEnabled": false,
"queueLogEnabled": false,
"tcpHost": "10.240.6.36",
"tcpPort": "502",
"tcpType": "DEFAULT",
"serialPort": "/dev/ttyUSB",
"serialType": "RTU-BUFFERD",
"serialBaudrate": "9600",
"serialDatabits": "8",
"serialStopbits": "1",
"serialParity": "none",
"serialConnectionDelay": "100",
"serialAsciiResponseStartDelimiter": "0x3A",
"unit_id": "1",
"commandDelay": "1",
"clientTimeout": "1000",
"reconnectOnTimeout": true,
"reconnectTimeout": "2000",
"parallelUnitIdsAllowed": true
}
]
Noted. i Think the register in the docu is false. So instead of 204 is adress 203
What i found out through trial and error: the adress 203 (in the docu listed at 204) can get following numbers: 8,9,10,11,12. Is it possible to work the parse buffer following: if 8 = pump off , if 9 = pump on, if 10 = pump off with warning, if 11 = pump on with warning and so on.
sorry for my stupid questions
Thank you