Done, can't believe !!
I get the info into influxdB & Grafana: Power and Status (Hysteresis):
and node-red:
[
{
"id": "787d729432b0e968",
"type": "tab",
"label": "Flow 6",
"disabled": false,
"info": "",
"env": []
},
{
"id": "522af9e406c5bd7e",
"type": "modbus-read",
"z": "787d729432b0e968",
"name": "P-Einsp.",
"topic": "",
"showStatusActivities": false,
"logIOActivities": false,
"showErrors": false,
"showWarnings": true,
"unitid": "",
"dataType": "HoldingRegister",
"adr": "2",
"quantity": "2",
"rate": "5",
"rateUnit": "s",
"delayOnStart": true,
"startDelayTime": "10",
"server": "cc73dd7ed0ec7878",
"useIOFile": false,
"ioFile": "",
"useIOForPayload": false,
"emptyMsgOnFail": false,
"x": 438,
"y": 118,
"wires": [
[
"ee8c0a43772ca100"
],
[
"976f8fdcf0079074"
]
]
},
{
"id": "ee8c0a43772ca100",
"type": "debug",
"z": "787d729432b0e968",
"name": "debug 43",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 678,
"y": 118,
"wires": []
},
{
"id": "976f8fdcf0079074",
"type": "buffer-parser",
"z": "787d729432b0e968",
"name": "",
"data": "payload.data",
"dataType": "msg",
"specification": "spec",
"specificationType": "ui",
"items": [
{
"type": "uint32le",
"name": "temp1",
"offset": 0,
"length": 1,
"offsetbit": 0,
"scale": "/100000000",
"mask": ""
},
{
"type": "uint32be",
"name": "temp2",
"offset": 0,
"length": 1,
"offsetbit": 0,
"scale": "/10",
"mask": ""
}
],
"swap1": "",
"swap2": "",
"swap3": "",
"swap1Type": "swap",
"swap2Type": "swap",
"swap3Type": "swap",
"msgProperty": "payload",
"msgPropertyType": "str",
"resultType": "value",
"resultTypeType": "return",
"multipleResult": false,
"fanOutMultipleResult": false,
"setTopic": true,
"outputs": 1,
"x": 458,
"y": 198,
"wires": [
[
"917e68f8ca3fdc9e",
"cd7baebd0b4c838b",
"8488c796779735fd",
"d1dd17f653838678"
]
]
},
{
"id": "917e68f8ca3fdc9e",
"type": "debug",
"z": "787d729432b0e968",
"name": "debug 44",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 678,
"y": 198,
"wires": []
},
{
"id": "788c279eacb91538",
"type": "debug",
"z": "787d729432b0e968",
"name": "debug 45",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 938,
"y": 238,
"wires": []
},
{
"id": "cd7baebd0b4c838b",
"type": "function",
"z": "787d729432b0e968",
"name": "function 8",
"func": "msg.payload = msg.payload[1]\nvar power = 0\nif (msg.payload > 0) {power=0}\nif (msg.payload > 1000) {power=1}\nif (msg.payload > 2000) {power=2}\nif (msg.payload > 3000) {power=3}\nif (msg.payload > 4000) {power=4}\nif (msg.payload > 5000) {power=5}\nif (msg.payload > 6000) {power=6}\nif (msg.payload > 7000) {power=7}\nif (msg.payload > 8000) {power=8}\nif (msg.payload > 9000) {power=9}\nif (msg.payload > 10000) {power=10}\nmsg.payload = power\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 678,
"y": 238,
"wires": [
[
"788c279eacb91538"
]
]
},
{
"id": "5d02378ccb6963f9",
"type": "hysteresis",
"z": "787d729432b0e968",
"name": "",
"ThresholdType": "fixed",
"ThresholdRising": "150",
"ThresholdFalling": "100",
"TopicThreshold": "",
"TopicCurrent": "",
"ThresholdDeltaRising": "",
"ThresholdDeltaFalling": "",
"InitialMessage": true,
"OutRisingType": "num",
"OutRisingValue": "1",
"OutFallingType": "num",
"OutFallingValue": "0",
"OutTopicType": "top",
"OutTopicValue": "",
"DynRaiseError": false,
"x": 698,
"y": 338,
"wires": [
[
"abe7cf59d70330c2",
"c0c2995e32e39bbc"
]
]
},
{
"id": "abe7cf59d70330c2",
"type": "debug",
"z": "787d729432b0e968",
"name": "debug 46",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 918,
"y": 338,
"wires": []
},
{
"id": "8488c796779735fd",
"type": "function",
"z": "787d729432b0e968",
"name": "function 9",
"func": "msg.payload = msg.payload[1]\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 678,
"y": 278,
"wires": [
[
"5a6872ab41337c99",
"5d02378ccb6963f9"
]
]
},
{
"id": "5a6872ab41337c99",
"type": "debug",
"z": "787d729432b0e968",
"name": "debug 47",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 918,
"y": 278,
"wires": []
},
{
"id": "c0c2995e32e39bbc",
"type": "change",
"z": "787d729432b0e968",
"name": "",
"rules": [
{
"t": "set",
"p": "HysStatus",
"pt": "flow",
"to": "payload",
"tot": "msg",
"dc": true
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 878,
"y": 418,
"wires": [
[]
]
},
{
"id": "4f7399447b85d00f",
"type": "inject",
"z": "787d729432b0e968",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "5",
"crontab": "",
"once": true,
"onceDelay": "0,1",
"topic": "Status",
"payload": "HysStatus",
"payloadType": "flow",
"x": 878,
"y": 478,
"wires": [
[
"fd55b08a5564698f",
"04d007aa484792bb",
"bc6e22e7e2cfe7b6"
]
]
},
{
"id": "fd55b08a5564698f",
"type": "debug",
"z": "787d729432b0e968",
"name": "debug 48",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1258,
"y": 498,
"wires": []
},
{
"id": "04d007aa484792bb",
"type": "join",
"z": "787d729432b0e968",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "num",
"reduceFixup": "",
"x": 1118,
"y": 658,
"wires": [
[
"f97a4dcc4d2f023b"
]
]
},
{
"id": "d1dd17f653838678",
"type": "function",
"z": "787d729432b0e968",
"name": "Nur Arraywert[power]",
"func": "var x = msg.payload [1]\nmsg.payload = x\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 878,
"y": 538,
"wires": [
[
"ed973d4cc95d05a9",
"a93685b4fadf4056",
"3a92b359e11b628a"
]
]
},
{
"id": "f97a4dcc4d2f023b",
"type": "debug",
"z": "787d729432b0e968",
"name": "debug 49",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1278,
"y": 658,
"wires": []
},
{
"id": "ed973d4cc95d05a9",
"type": "change",
"z": "787d729432b0e968",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Power",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 958,
"y": 658,
"wires": [
[
"04d007aa484792bb"
]
]
},
{
"id": "3a92b359e11b628a",
"type": "influxdb out",
"z": "787d729432b0e968",
"influxdb": "45d881d645e7f897",
"name": "PowerdB",
"measurement": "Power",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "organisation",
"bucket": "bucket",
"x": 1258,
"y": 538,
"wires": []
},
{
"id": "a93685b4fadf4056",
"type": "debug",
"z": "787d729432b0e968",
"name": "debug 50",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1258,
"y": 578,
"wires": []
},
{
"id": "bc6e22e7e2cfe7b6",
"type": "influxdb out",
"z": "787d729432b0e968",
"influxdb": "45d881d645e7f897",
"name": "PowerdB",
"measurement": "Status",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "organisation",
"bucket": "bucket",
"x": 1258,
"y": 458,
"wires": []
},
{
"id": "cc73dd7ed0ec7878",
"type": "modbus-client",
"name": "KSEM",
"clienttype": "tcp",
"bufferCommands": true,
"stateLogEnabled": false,
"queueLogEnabled": false,
"failureLogEnabled": true,
"tcpHost": "192.168.178.61",
"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,
"showWarnings": true,
"showLogs": true
},
{
"id": "45d881d645e7f897",
"type": "influxdb",
"hostname": "192.168.178.72",
"port": "8086",
"protocol": "http",
"database": "mydb",
"name": "PowerdB",
"usetls": false,
"tls": "",
"influxdbVersion": "1.x",
"url": "http://localhost:8086",
"rejectUnauthorized": true
}
]
I take a break, tomorrow is a new day.
And thanks to those who looked at this thread, was a good kind of motivation: Never give up!