Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node Red Crashes when subscribed OPCUA Server goes offline #761

Open
skroll2610 opened this issue Dec 5, 2024 · 2 comments
Open

Node Red Crashes when subscribed OPCUA Server goes offline #761

skroll2610 opened this issue Dec 5, 2024 · 2 comments

Comments

@skroll2610
Copy link

image

Hi, I have a problem with plugin version 0.2.337 and node red 4.0.5.

I suspect the node red server crashes when the host where the OPCUA server is running on, is shutting down.
I was running an old NR version (2.x) with a really old plugin version (cant remember) where i didnt have this error. since an update, its failing on multiple Node Red instances on different machines. (I also tried another server, same result).

The data and configurations have not changed since 2020. so I would assume that this is not the problem.

Do you have a solution?

Kind regards

Sebastian

@skroll2610
Copy link
Author

there is the flow, if you need it.

[ { "id": "1e90772725f39fd8", "type": "tab", "label": "Flow 1", "disabled": false, "info": "" }, { "id": "f44f4bb5e73937ed", "type": "mqtt-broker", "name": "", "broker": "host.docker.internal", "port": "1883", "clientid": "", "autoConnect": true, "usetls": false, "protocolVersion": "4", "keepalive": "60", "cleansession": true, "autoUnsubscribe": true, "birthTopic": "", "birthQos": "0", "birthRetain": "true", "birthPayload": "", "birthMsg": {}, "closeTopic": "", "closeQos": "0", "closeRetain": "false", "closePayload": "", "closeMsg": {}, "willTopic": "", "willQos": "0", "willRetain": "false", "willPayload": "", "willMsg": {}, "userProps": "", "sessionExpiry": "" }, { "id": "0822b3ca5f57c9a4", "type": "OpcUa-Endpoint", "endpoint": "opc.tcp://192.200.200.1", "secpol": "Basic256Sha256", "secmode": "SignAndEncrypt", "none": false, "login": false, "usercert": false, "usercertificate": "", "userprivatekey": "" }, { "id": "68021f9.ba14de", "type": "OpcUa-Endpoint", "endpoint": "opc.tcp://localhost:53530/OPCUA/SimulationServer", "secpol": "None", "secmode": "None", "none": false, "login": false }, { "id": "8163a877e662f0cd", "type": "OpcUa-Endpoint", "endpoint": "opc.tcp://192.200.200.1:4840", "secpol": "Basic256Sha256", "secmode": "SignAndEncrypt", "none": false, "login": false, "usercert": false, "usercertificate": "", "userprivatekey": "" }, { "id": "7435da150c023e75", "type": "MSSQL-CN", "tdsVersion": "7_4", "name": "", "server": "emea-ptsdaten-1\\sqlexpress", "port": "", "encyption": false, "database": "Prozessdaten", "useUTC": true, "connectTimeout": "15000", "requestTimeout": "15000", "cancelTimeout": "5000", "pool": "5" }, { "id": "41e193f8437c2262", "type": "mqtt in", "z": "1e90772725f39fd8", "name": "CCM AI_1", "topic": "iounits/7fdecd423cbd4d08870109e7a236ff7a/signals/a3981930bea24699a00bd04785ce05cf/value", "qos": "2", "datatype": "auto-detect", "broker": "f44f4bb5e73937ed", "nl": false, "rap": true, "rh": 0, "inputs": 0, "x": 140, "y": 180, "wires": [ [ "9cba8573cc58a62b" ] ] }, { "id": "cd6f378795a20454", "type": "mqtt in", "z": "1e90772725f39fd8", "name": "CCM IO_1 ", "topic": "iounits/7fdecd423cbd4d08870109e7a236ff7a/signals/de909f568236422c935517aea4f29b81/value", "qos": "2", "datatype": "auto-detect", "broker": "f44f4bb5e73937ed", "nl": false, "rap": true, "rh": 0, "inputs": 0, "x": 140, "y": 260, "wires": [ [ "89bb6b2c14e30ebe", "7598ab7711ba8356" ] ] }, { "id": "ddd84b91d26c33ee", "type": "debug", "z": "1e90772725f39fd8", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 870, "y": 380, "wires": [] }, { "id": "402f1750aa932528", "type": "function", "z": "1e90772725f39fd8", "name": "init global contextdata", "func": "var lr = global.get(\"Daten\")\nif (lr === undefined) {\n lr = {}\n global.set(\"Daten\", lr)\n}\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 400, "y": 140, "wires": [ [] ] }, { "id": "242cfa0d41c26916", "type": "inject", "z": "1e90772725f39fd8", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 130, "y": 120, "wires": [ [ "402f1750aa932528", "7598ab7711ba8356", "68c1ba9c02c22c1c" ] ] }, { "id": "9cba8573cc58a62b", "type": "function", "z": "1e90772725f39fd8", "name": "to context", "func": "lr = global.get(\"Daten\")\n\nlr.messwert = msg.payload\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1040, "y": 180, "wires": [ [] ] }, { "id": "84160a0ef3a72398", "type": "function", "z": "1e90772725f39fd8", "name": "recordtrigger to context", "func": "lr = global.get(\"Daten\")\n\nlr.recordtrigger = Boolean(msg.payload)\n\nmsg.payload = Boolean(msg.payload)\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 630, "y": 320, "wires": [ [ "ddd84b91d26c33ee", "39554a81ef1bee09" ] ] }, { "id": "6e02628748fe1c95", "type": "function", "z": "1e90772725f39fd8", "name": "to context", "func": "lr = global.get(\"Daten\")\n\nlr.artikel = msg.payload\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1040, "y": 440, "wires": [ [] ] }, { "id": "c17580947f8289d1", "type": "function", "z": "1e90772725f39fd8", "d": true, "name": "to context", "func": "\n\n\n\n\n\nlr = global.get(\"Daten\")\n\nvar stringcharge = msg.payload\n\nlr.charge = stringcharge.padStart(10, '0');\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1040, "y": 700, "wires": [ [] ] }, { "id": "612748bdb0812dc1", "type": "function", "z": "1e90772725f39fd8", "name": "to context", "func": "lr = global.get(\"Daten\")\n\nlr.uniqid = msg.payload\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1040, "y": 760, "wires": [ [] ] }, { "id": "40edb9dc442b9ec7", "type": "function", "z": "1e90772725f39fd8", "name": "select LP ", "func": "\nvar query = \"SELECT [Leiterplatte] FROM [PROZESSDATEN].[dbo].[FBT_BAUGRUPPEN_INFO] WHERE [Material] = \"+ msg.payload ; \n\nmsg.payload = query;\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 360, "y": 540, "wires": [ [ "d3de978e7450d2d4" ] ] }, { "id": "e5c1209ca21af91f", "type": "function", "z": "1e90772725f39fd8", "name": "to context", "func": "lr = global.get(\"Daten\")\n\nlr.leiterplatte = msg.payload[0].Leiterplatte\n\n\n\nif(lr.leiterplatte == undefined)\n{\n global.set(\"Daten.leiterplatte\",0815)\n lr.leiterplatte = \"00\"\n return msg;\n}\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1040, "y": 540, "wires": [ [] ] }, { "id": "41eada97da949ac9", "type": "function", "z": "1e90772725f39fd8", "name": "select Bestückung", "func": "\nvar query = \"SELECT [Bestückung] FROM [PROZESSDATEN].[dbo].[FBT_BAUGRUPPEN_INFO] WHERE [Material] = \"+ msg.payload ; \n\nmsg.payload = query;\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 390, "y": 580, "wires": [ [ "c49c4170c3f30cd8" ] ] }, { "id": "5de4822bf37a2357", "type": "function", "z": "1e90772725f39fd8", "name": "to context", "func": "lr = global.get(\"Daten\")\n\nlr.bestückung = msg.payload[0].Bestückung\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1040, "y": 580, "wires": [ [] ] }, { "id": "39554a81ef1bee09", "type": "function", "z": "1e90772725f39fd8", "name": "bundle data", "func": "var soll = global.get(\"Daten.bestückung\")/2\n\nvar x = global.get(\"Daten\")\n\nif (msg.payload == true) \n{\n\n if (x.counter == undefined) \n {\n x.counter = 0\n }\n\n if (x.aktnest == undefined) \n {\n x.aktnest = 1\n }\n\n \n\n x\n x.counter = x.counter + 1\n\n msg.linienkennung = x.linie\n msg.timestamp = Date.now()\n msg.artikel = x.artikel\n msg.charge = x.charge\n msg.uniqid = x.uniqid\n msg.leiterplatte = x.leiterplatte\n \n msg.value = x.messwert\n msg.messpunkt = x.counter\n msg.nest = x.aktnest\n\n if(x.counter > 5)\n {\n x.counter=0\n if(x.aktnest != soll){\n x.aktnest = x.aktnest +1\n }\n else{\n x.aktnest = 1\n }\n \n }\n\n if(x.aktnest >2)\n {\n x.aktnest = 1\n }\n \n return msg;\n }\n\n \n \n\n\n\n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 870, "y": 260, "wires": [ [ "a285aaab6bd2c656" ] ] }, { "id": "a285aaab6bd2c656", "type": "function", "z": "1e90772725f39fd8", "name": "SQL Query", "func": "\n\n\nmsg.payload = INSERT INTO [dbo].[PCBHeight] \n ([LINIENKENNUNG]\n ,[TIMESTAMP] \n ,[UNIQID] \n ,[ARTIKELNUMMER]\n ,[CHARGE]\n ,[LP]\n ,[NEST]\n ,[MESSPUNKT]\n ,[MESSWERT]) \n VALUES\n (+ msg.linienkennung +\n , GETDATE()\n \n ,'+ msg.uniqid + '\n ,+ msg.artikel +\n ,+ msg.charge +\n ,+ msg.leiterplatte +\n ,+ msg.nest +\n ,+ msg.messpunkt +\n ,+ msg.value +)\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1050, "y": 260, "wires": [ [ "dce98cd97cb6f634", "1c88d6edf24b8cd7" ] ] }, { "id": "cf9539a49d69128b", "type": "function", "z": "1e90772725f39fd8", "name": "to context", "func": "lr = global.get(\"Daten\")\n\nlr.linie = msg.payload\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1040, "y": 820, "wires": [ [] ] }, { "id": "6654e438c505ac88", "type": "inject", "z": "1e90772725f39fd8", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "true", "payloadType": "bool", "x": 350, "y": 320, "wires": [ [ "84160a0ef3a72398" ] ] }, { "id": "768c80285c7d1a46", "type": "inject", "z": "1e90772725f39fd8", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "false", "payloadType": "bool", "x": 350, "y": 380, "wires": [ [ "84160a0ef3a72398" ] ] }, { "id": "cb676d6c67d047af", "type": "function", "z": "1e90772725f39fd8", "name": "function 5", "func": "var x = global.get(\"Daten\")\n\nmsg.payload = x.uniqid\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 840, "y": 1100, "wires": [ [ "cd367dcbdf022526" ] ] }, { "id": "a166d232cff6ec36", "type": "inject", "z": "1e90772725f39fd8", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 660, "y": 1100, "wires": [ [ "cb676d6c67d047af" ] ] }, { "id": "cd367dcbdf022526", "type": "debug", "z": "1e90772725f39fd8", "name": "debug 2", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 1040, "y": 1100, "wires": [] }, { "id": "6b3092a06c21f405", "type": "function", "z": "1e90772725f39fd8", "name": "reset context", "func": "global.set(\"Daten\")\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 450, "y": 1100, "wires": [ [] ] }, { "id": "1e4b687e9587f012", "type": "inject", "z": "1e90772725f39fd8", "name": "RESET", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 150, "y": 1100, "wires": [ [ "6b3092a06c21f405" ] ] }, { "id": "dbe21253354adc26", "type": "debug", "z": "1e90772725f39fd8", "name": "debug 3", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 580, "y": 240, "wires": [] }, { "id": "89bb6b2c14e30ebe", "type": "rbe", "z": "1e90772725f39fd8", "name": "", "func": "rbe", "gap": "", "start": "", "inout": "out", "septopics": true, "property": "payload", "topi": "topic", "x": 350, "y": 260, "wires": [ [ "84160a0ef3a72398", "dbe21253354adc26" ] ] }, { "id": "ae8813bac8f7d40e", "type": "mqtt in", "z": "1e90772725f39fd8", "name": "arUniqId", "topic": "iounits/d4a4d275aa7144b8a68fa2734a676182/signals/be503399b9a34c238760abf0c8eaa0e6/value", "qos": "2", "datatype": "auto-detect", "broker": "f44f4bb5e73937ed", "nl": false, "rap": true, "rh": 0, "inputs": 0, "x": 140, "y": 760, "wires": [ [ "612748bdb0812dc1" ] ] }, { "id": "7985041c9d9e1b07", "type": "mqtt in", "z": "1e90772725f39fd8", "name": "arMaterialNr", "topic": "iounits/d4a4d275aa7144b8a68fa2734a676182/signals/2d1be3842c2a43a28a10c79d322c8275/value", "qos": "0", "datatype": "utf8", "broker": "f44f4bb5e73937ed", "nl": false, "rap": true, "rh": 0, "inputs": 0, "x": 130, "y": 440, "wires": [ [ "40edb9dc442b9ec7", "6e02628748fe1c95", "a0b86b67b82f28b9" ] ] }, { "id": "5780d570779fdcb2", "type": "mqtt in", "z": "1e90772725f39fd8", "name": "arSAPPCharge", "topic": "iounits/d4a4d275aa7144b8a68fa2734a676182/signals/96aef6f1d22d45e9993e32cc6e2ec24c/value", "qos": "2", "datatype": "auto-detect", "broker": "f44f4bb5e73937ed", "nl": false, "rap": true, "rh": 0, "inputs": 0, "x": 120, "y": 700, "wires": [ [ "c17580947f8289d1" ] ] }, { "id": "867f836d01ebc55e", "type": "mqtt in", "z": "1e90772725f39fd8", "name": "arLinienkennung", "topic": "iounits/d4a4d275aa7144b8a68fa2734a676182/signals/302a43853bb84c1182afbc1d55c43e23/value", "qos": "2", "datatype": "auto-detect", "broker": "f44f4bb5e73937ed", "nl": false, "rap": true, "rh": 0, "inputs": 0, "x": 120, "y": 820, "wires": [ [ "cf9539a49d69128b" ] ] }, { "id": "e25c5efc670f81a7", "type": "catch", "z": "1e90772725f39fd8", "name": "", "scope": [ "15c0f251f04e9ef0" ], "uncaught": false, "x": 450, "y": 640, "wires": [ [ "24ebf23adbcaca4f" ] ] }, { "id": "24ebf23adbcaca4f", "type": "delay", "z": "1e90772725f39fd8", "name": "", "pauseType": "delay", "timeout": "1", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 640, "y": 640, "wires": [ [ "172e6db7205c6773" ] ] }, { "id": "1e479902254f22c4", "type": "OpcUa-Client", "z": "1e90772725f39fd8", "endpoint": "8163a877e662f0cd", "action": "subscribe", "deadbandtype": "a", "deadbandvalue": 1, "time": "100", "timeUnit": "ms", "certificate": "n", "localfile": "", "localkeyfile": "", "securitymode": "None", "securitypolicy": "None", "useTransport": false, "maxChunkCount": 1, "maxMessageSize": 8192, "receiveBufferSize": 8192, "sendBufferSize": 8192, "name": "OPCUA", "x": 580, "y": 40, "wires": [ [ "f5bb33bc5eba72b3" ], [], [] ] }, { "id": "7598ab7711ba8356", "type": "OpcUa-Item", "z": "1e90772725f39fd8", "item": "ns=4;s=MAIN.OPC_UA.stCustomerControl.arUniqID", "datatype": "Byte Array", "value": "", "name": "UniqID", "x": 350, "y": 40, "wires": [ [ "1e479902254f22c4" ] ] }, { "id": "f5bb33bc5eba72b3", "type": "function", "z": "1e90772725f39fd8", "name": "ByteArray to String", "func": "const bytes = Array.from(msg.payload)\n\nif(bytes == null) return {\n \"payload\": \"00\"\n}\n\n\nconst hexStrings = bytes.map(b => b.toString(16)).map(s => {\n switch(s.length){\n case 0: return \"00\"\n case 1: return \"0\" + s\n default: return s\n }\n})\n\nconst hexString = hexStrings.join(\" \").toUpperCase()\n\nreturn {\n \"payload\": hexString\n}", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 750, "y": 40, "wires": [ [ "f9445fe51d14bdb1" ] ] }, { "id": "f9445fe51d14bdb1", "type": "function", "z": "1e90772725f39fd8", "name": "=?", "func": "\nif(msg.payload != \"\")\n{\nreturn msg;\n}\n\n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 910, "y": 40, "wires": [ [ "196b9824bb298b8e" ] ] }, { "id": "196b9824bb298b8e", "type": "function", "z": "1e90772725f39fd8", "name": "to context", "func": "lr = global.get(\"Daten\")\n\nlr.uniqid = msg.payload\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1040, "y": 40, "wires": [ [] ] }, { "id": "a0b86b67b82f28b9", "type": "delay", "z": "1e90772725f39fd8", "name": "", "pauseType": "delay", "timeout": "1", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 180, "y": 580, "wires": [ [ "41eada97da949ac9" ] ] }, { "id": "fcf3b31b29e07a78", "type": "catch", "z": "1e90772725f39fd8", "name": "", "scope": [ "cd0eb34b56ea54db" ], "uncaught": false, "x": 450, "y": 480, "wires": [ [ "b844416c75855ed7" ] ] }, { "id": "b844416c75855ed7", "type": "delay", "z": "1e90772725f39fd8", "name": "", "pauseType": "delay", "timeout": "1", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 640, "y": 480, "wires": [ [ "b418e321f67b3c58" ] ] }, { "id": "b418e321f67b3c58", "type": "MSSQL", "z": "1e90772725f39fd8", "mssqlCN": "7435da150c023e75", "name": "", "query": "", "outField": "payload", "x": 860, "y": 540, "wires": [ [ "e5c1209ca21af91f" ] ] }, { "id": "172e6db7205c6773", "type": "MSSQL", "z": "1e90772725f39fd8", "mssqlCN": "7435da150c023e75", "name": "", "query": "", "outField": "payload", "x": 860, "y": 580, "wires": [ [ "5de4822bf37a2357" ] ] }, { "id": "dce98cd97cb6f634", "type": "MSSQL", "z": "1e90772725f39fd8", "mssqlCN": "7435da150c023e75", "name": "", "query": "", "outField": "payload", "x": 1220, "y": 300, "wires": [ [ "1c88d6edf24b8cd7" ] ] }, { "id": "d3de978e7450d2d4", "type": "delay", "z": "1e90772725f39fd8", "name": "", "pauseType": "delay", "timeout": "500", "timeoutUnits": "milliseconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 620, "y": 540, "wires": [ [ "b418e321f67b3c58" ] ] }, { "id": "c49c4170c3f30cd8", "type": "delay", "z": "1e90772725f39fd8", "name": "", "pauseType": "delay", "timeout": "100", "timeoutUnits": "milliseconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 620, "y": 580, "wires": [ [ "172e6db7205c6773" ] ] }, { "id": "1c88d6edf24b8cd7", "type": "debug", "z": "1e90772725f39fd8", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1230, "y": 380, "wires": [] }, { "id": "4ef596a34e73a354", "type": "inject", "z": "1e90772725f39fd8", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "2316133", "payloadType": "str", "x": 180, "y": 920, "wires": [ [ "c17580947f8289d1" ] ] }, { "id": "8ef52ac4c8168eba", "type": "OpcUa-Client", "z": "1e90772725f39fd8", "endpoint": "8163a877e662f0cd", "action": "subscribe", "deadbandtype": "a", "deadbandvalue": 1, "time": "100", "timeUnit": "ms", "certificate": "n", "localfile": "", "localkeyfile": "", "securitymode": "None", "securitypolicy": "None", "useTransport": false, "maxChunkCount": 1, "maxMessageSize": 8192, "receiveBufferSize": 8192, "sendBufferSize": 8192, "name": "OPCUA", "x": 580, "y": 100, "wires": [ [ "f1fe36f4738ea62d" ], [], [] ] }, { "id": "68c1ba9c02c22c1c", "type": "OpcUa-Item", "z": "1e90772725f39fd8", "item": "ns=4;s=MAIN.OPC_UA.stCustomerControl.arSAPCharge", "datatype": "Byte Array", "value": "", "name": "SAPCharge", "x": 370, "y": 100, "wires": [ [ "8ef52ac4c8168eba" ] ] }, { "id": "f1fe36f4738ea62d", "type": "function", "z": "1e90772725f39fd8", "name": "CharArray to String", "func": "const ints = msg.payload;\nif(!ints) return {\n payload: \"\"\n};\n\nconst chars = ints.map(i => String.fromCharCode(i));\nconst string = chars.join(\"\");\nreturn {\n payload: string\n}", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 750, "y": 100, "wires": [ [ "03ed7166cb857581", "e3f2f42bae36ce6f" ] ] }, { "id": "03ed7166cb857581", "type": "function", "z": "1e90772725f39fd8", "name": "=?", "func": "\nif(msg.payload != \"\")\n{\nreturn msg;\n}\n\n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 910, "y": 100, "wires": [ [ "bf5bc88df2ac7ee8" ] ] }, { "id": "bf5bc88df2ac7ee8", "type": "function", "z": "1e90772725f39fd8", "name": "to context", "func": "lr = global.get(\"Daten\")\n\nlr.charge = msg.payload\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1040, "y": 100, "wires": [ [] ] }, { "id": "e3f2f42bae36ce6f", "type": "debug", "z": "1e90772725f39fd8", "name": "debug 4", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 900, "y": 140, "wires": [] } ]

@RudolfTheRedNode
Copy link

@mikakaraila .. I recently updated OPC UA node then I was getting this information in console...

"connection break"... + OPC UA IP

is this normal? or Is it my network problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants