Sunny Home Manager Flow Error

Hello,
I have implemented an existing flow to read out data from the Sunny Home Manager. A function buffer parser gives me an error message in the online status: "scale.match is not a funtion". Does anyone have any idea where the problem could be.

Thank you in advance.

Hi @Ben_F

without more specific information about your flow, its hard to say much about where the problem is.

The only information you've given us is the error message: "scale.match is not a funtion".

This tells us that somewhere in your flow, something is trying to call a function called match on a variable called scale - but for some reason that function doesn't exist.

That could be because scale is not of the right type. match is an function of String objects. So that suggests the code assumes scale is a String but for some reason it isn't one. It could be undefined or some other thing entirely.

That's about the limit of what we can say based on the information you've shared.

I assume you mean you are using the buffer parser node. Can you spare your flow and some sample data. Do not include the other non standard nodes - instead, use an inject node to simulate this sunny data.

Hi,
das ging ja flott. Angehangen mein Flow

[{"id":"a51c9499.24c608","type":"tab","label":"SMA Energy Meter","disabled":false,"info":""},{"id":"4129a358.c504bc","type":"udp in","z":"a51c9499.24c608","name":"Home Manager","iface":"","port":"9522","ipv":"udp4","multicast":"true","group":"239.12.255.254","datatype":"buffer","x":200,"y":40,"wires":[["e68e3ea4.1352b"]]},{"id":"e68e3ea4.1352b","type":"buffer-parser","z":"a51c9499.24c608","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"string","name":"sma","offset":0,"length":3,"offsetbit":0,"scale":"1","mask":""},{"type":"uint32be","name":"Tag=>Tag0","offset":4,"length":1,"offsetbit":0,"scale":">> 4","mask":"0xff0"},{"type":"uint32be","name":"Tag=>Version","offset":4,"length":1,"offsetbit":0,"scale":"0","mask":"0xf"},{"type":"uint32be","name":"Group","offset":8,"length":1,"offsetbit":0,"scale":"0","mask":""},{"type":"uint32be","name":"item10","offset":25,"length":1,"offsetbit":0,"scale":">> 4","mask":"0xFFF0"},{"type":"uint16be","name":"ProtocolID","offset":16,"length":1,"offsetbit":0,"scale":"0","mask":""},{"type":"uint32be","name":"meter_identifier=>SusyID","offset":18,"length":1,"offsetbit":0,"scale":">> 4","mask":"0xFFF0"},{"type":"uint32be","name":"meter_identifier=>SerNo","offset":21,"length":1,"offsetbit":0,"scale":">> 4","mask":"0xFFF0"},{"type":"buffer","name":"data","offset":28,"length":-1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":210,"y":120,"wires":[["d6da6ae3.246f78"]]},{"id":"d6da6ae3.246f78","type":"buffer-parser","z":"a51c9499.24c608","name":"","data":"payload.data","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"int16be","name":"measurement","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"uint8","name":"datatype","offset":2,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"buffer","name":"data","offset":0,"length":-1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":210,"y":200,"wires":[["6b74561d.4b5058"]]},{"id":"2712022f.658ade","type":"buffer-parser","z":"a51c9499.24c608","name":"","data":"payload.data","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"uint32be","name":"value","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"buffer","name":"data","offset":8,"length":-1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload2","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":730,"y":220,"wires":[["d2cc6481.f66dc8"]]},{"id":"b53ab28a.300aa","type":"buffer-parser","z":"a51c9499.24c608","name":"","data":"payload.data","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"biguint64be","name":"value","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"buffer","name":"data","offset":12,"length":-1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload2","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":730,"y":180,"wires":[["d2cc6481.f66dc8"]]},{"id":"d2cc6481.f66dc8","type":"function","z":"a51c9499.24c608","name":"Daten","func":"var sma_units = {\n    \"W\": 10,\n    \"VA\": 10,\n    \"var\": 10,\n    \"kWh\": 3600000,\n    \"kVAh\": 3600000,\n    \"kvarh\": 3600000,\n    \"A\": 1000,\n    \"V\": 1000,\n    \"-\": 1000,\n    \"Hz\": 1000,\n};\nvar sma_channels = {\n    //# gesamt\n    1: ['P Bezug', 'W', 'kWh'],\n    2: ['P Einspeisung', 'W', 'kWh'],\n    3: ['Q induktiv', 'var', 'kvarh'],\n    4: ['Q kapazitiv', 'var', 'kvarh'],\n    9: ['S Bezug', 'VA', 'kVAh'],\n    10: ['S Einspeisung', 'VA', 'kVAh'],\n    13: ['cosphi', '-'],\n    14: ['Frequenz', 'Hz'],\n    //# L1\n    21: ['P1 Bezug', 'W', 'kWh'],\n    22: ['P1 Einspeisung', 'W', 'kWh'],\n    23: ['Q1 ind.', 'var', 'kvarh'],\n    24: ['Q1 kap.', 'var', 'kvarh'],\n    29: ['S1 Bezug', 'VA', 'kVAh'],\n    30: ['S1 Einspeisung', 'VA', 'kVAh'],\n    31: ['I L1', 'A'],\n    32: ['U L1', 'V'],\n    33: ['cosphi L1', '-'],\n    //# L2\n    41: ['P2 Bezug', 'W', 'kWh'],\n    42: ['P2 Einspeisung', 'W', 'kWh'],\n    43: ['Q2 ind.', 'var', 'kvarh'],\n    44: ['Q2 kap.', 'var', 'kvarh'],\n    49: ['S2 Bezug', 'VA', 'kVAh'],\n    50: ['S2 Einspeisung', 'VA', 'kVAh'],\n    51: ['I L2', 'A'],\n    52: ['U L2', 'V'],\n    53: ['cosphi L2', '-'],\n    //# L3\n    61: ['P3 Bezug', 'W', 'kWh'],\n    62: ['P3 Einspeisung', 'W', 'kWh'],\n    63: ['Q3 ind.', 'var', 'kvarh'],\n    64: ['Q3 kap.', 'var', 'kvarh'],\n    69: ['S3 Bezug', 'VA', 'kVAh'],\n    70: ['S3 Einspeisung', 'VA', 'kVAh'],\n    71: ['I L3', 'A'],\n    72: ['U L3', 'V'],\n    73: ['cosphi L3', '-'],\n};\n\nmsg.result = msg.result || {};\n\nfunction decode_item_header(datatype, measurement) {\n    if (datatype == 4)\n        return 'momentan'\n    else if (datatype == 8)\n        return 'Zähler';\n}\n\n\nvar pl2 = msg.payload2;\nvar pl = msg.payload;\n\nvar measurement = pl.measurement;\nvar datatype = pl.datatype;\nvar ch = sma_channels[measurement] || [];\nvar valuename = ch[0], unit = ch[1]; unitForCounter = ch[2];\n\nvar hasValue = pl2.hasOwnProperty('value');\nif (valuename && hasValue) {\n    var value = pl2.value;\n    var typeName = decode_item_header(datatype, measurement);\n    var t = typeof value;\n    var divisor = 1;\n    if (typeName == \"Zähler\" && unitForCounter ) {\n        divisor = sma_units[unitForCounter] || 1;\n        msg.result[valuename + \" \" + typeName + \" Einheit\"] = unitForCounter;\n    } else {\n        divisor = sma_units[unit] || 1;\n        msg.result[valuename + \" \" + typeName + \" Einheit\"] = unit;\n    }\n    \n    if (t === \"number\") {\n        msg.result[valuename + \" \" + typeName] = value / divisor;\n    } else if (t === \"bigint\") {\n        msg.result[valuename + \" \" + typeName] = Number(value / BigInt(divisor));\n    } else {\n        msg.result[valuename + \" \" + typeName] = value;\n    }\n}\n\n\n/** @type {Buffer} */ var buf = pl2.data;\nif (buf && buf.length >= 8) {\n    msg.payload = {\n        data: pl2.data\n    };\n    return [msg,null];\n}\nmsg.payload = msg.result;\nreturn [null, msg];","outputs":2,"noerr":0,"x":910,"y":220,"wires":[["f4605045.54f02"],["90907d50.426ca","89344bb5.f179c8","36e8185f.615c88","9901784e.21e708","fc2e7ea7.92644","765181c2.a1741","dab97d8f.5e903","815a805b.e2fa2","a5fb0ffc.8bc4e","3e197e36.33ae52","917da215.adbea","7b2defa9.179a4","242ddd9d.d79c42","714f485d.2d5c78","b006fdcb.187e4","e631da4f.09ecc8","9c60d395.135d9","a322cbb3.44dbf8","891ad56d.288aa8","5c5e04ed.6fc00c","40126b2b.6d8dc4","d5d64f93.5e867","be8c4256.d1cc3","a34d2390.8aea8","8f45ff25.79da5","3b069a2e.e19ad6","465fa5e4.f2d5dc","c3194818.2bf6d8","40a5a27c.b8a06c","e300f5cc.12e178","81219c45.88129","a94c6f97.3121e","430f74d7.8216bc","aa557880.81d868","d587a679.e635a8","168954d3.a0e28b","89d19896.3445d8","f0b6bcdf.ebc76","3b534a85.2d5136","3deb66eb.f8ea2a","948729c9.87c788","7a2df5e.95e6f0c","c9a7c6b5.3b4b98","6f9a8d43.d04ca4"]]},{"id":"ea4a671b.8ebb48","type":"buffer-parser","z":"a51c9499.24c608","name":"","data":"payload.data","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"buffer","name":"data","offset":8,"length":-1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload2","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":730,"y":260,"wires":[["d2cc6481.f66dc8"]]},{"id":"3c8ef408.d548dc","type":"link in","z":"a51c9499.24c608","name":"","links":["f4605045.54f02"],"x":75,"y":200,"wires":[["d6da6ae3.246f78"]]},{"id":"f4605045.54f02","type":"link out","z":"a51c9499.24c608","name":"","links":["3c8ef408.d548dc"],"x":915,"y":180,"wires":[]},{"id":"c3194818.2bf6d8","type":"debug","z":"a51c9499.24c608","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":890,"y":340,"wires":[]},{"id":"90907d50.426ca","type":"ui_text","z":"a51c9499.24c608","group":"7d24ff20.a040f","order":1,"width":0,"height":0,"name":"Bezug","label":"<b><font color=red>Bezug","format":"{{msg.payload[\"P Bezug momentan\"]}} W","layout":"row-spread","x":1170,"y":40,"wires":[]},{"id":"89344bb5.f179c8","type":"ui_text","z":"a51c9499.24c608","group":"7d24ff20.a040f","order":2,"width":0,"height":0,"name":"Einspeisung","label":"<b><font color=orange>Einspeisung","format":"{{msg.payload[\"P Einspeisung momentan\"]}} W","layout":"row-spread","x":1190,"y":80,"wires":[]},{"id":"36e8185f.615c88","type":"ui_text","z":"a51c9499.24c608","group":"7d24ff20.a040f","order":3,"width":0,"height":0,"name":"Blindleistung kap.","label":"Blindleistung kapazitiv","format":"{{msg.payload[\"Q kapazitiv momentan\"]}} var","layout":"row-spread","x":1210,"y":120,"wires":[]},{"id":"9901784e.21e708","type":"ui_text","z":"a51c9499.24c608","group":"7d24ff20.a040f","order":4,"width":0,"height":0,"name":"Blindleistung ind.","label":"Blindleistung induktiv","format":"{{msg.payload[\"Q induktiv momentan\"]}} var","layout":"row-spread","x":1210,"y":160,"wires":[]},{"id":"fc2e7ea7.92644","type":"ui_text","z":"a51c9499.24c608","group":"7d24ff20.a040f","order":5,"width":0,"height":0,"name":"Frequenz","label":"Frequenz","format":"{{msg.payload[\"Frequenz momentan\"]}} Hz","layout":"row-spread","x":1180,"y":200,"wires":[]},{"id":"6b74561d.4b5058","type":"switch","z":"a51c9499.24c608","name":"8-counter, 4-actual, 0-version, other","property":"payload.datatype","propertyType":"msg","rules":[{"t":"eq","v":"8","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":450,"y":200,"wires":[["b53ab28a.300aa"],["2712022f.658ade"],["ea4a671b.8ebb48"],["ea4a671b.8ebb48"]]},{"id":"765181c2.a1741","type":"ui_text","z":"a51c9499.24c608","group":"7d24ff20.a040f","order":6,"width":0,"height":0,"name":"cosphi","label":"cos phi","format":"{{msg.payload[\"cosphi momentan\"]}}","layout":"row-spread","x":1170,"y":240,"wires":[]},{"id":"dab97d8f.5e903","type":"ui_text","z":"a51c9499.24c608","group":"511fb512.fe459c","order":1,"width":0,"height":0,"name":"Bezug L1","label":"<font color=red>Bezug L1","format":"{{msg.payload[\"P1 Bezug momentan\"]}} W","layout":"row-spread","x":1420,"y":40,"wires":[]},{"id":"815a805b.e2fa2","type":"ui_text","z":"a51c9499.24c608","group":"511fb512.fe459c","order":2,"width":0,"height":0,"name":"Einspeisung L1","label":"<font color=orange>Einspeisung L1","format":"{{msg.payload[\"P1 Einspeisung momentan\"]}} W","layout":"row-spread","x":1440,"y":80,"wires":[]},{"id":"a5fb0ffc.8bc4e","type":"ui_text","z":"a51c9499.24c608","group":"511fb512.fe459c","order":4,"width":0,"height":0,"name":"Blindleistung ind.","label":"Blindleistung induktiv","format":"{{msg.payload[\"Q1 ind. momentan\"]}} var","layout":"row-spread","x":1450,"y":120,"wires":[]},{"id":"3e197e36.33ae52","type":"ui_text","z":"a51c9499.24c608","group":"511fb512.fe459c","order":3,"width":0,"height":0,"name":"Blindleistung kap.","label":"Blindleistung kapazitiv","format":"{{msg.payload[\"Q1 kap. momentan\"]}} var","layout":"row-spread","x":1450,"y":160,"wires":[]},{"id":"917da215.adbea","type":"ui_text","z":"a51c9499.24c608","group":"511fb512.fe459c","order":7,"width":0,"height":0,"name":"Strom L1","label":"Strom L1","format":"{{msg.payload[\"I L1 momentan\"]}} A","layout":"row-spread","x":1420,"y":200,"wires":[]},{"id":"7b2defa9.179a4","type":"ui_text","z":"a51c9499.24c608","group":"511fb512.fe459c","order":5,"width":0,"height":0,"name":"Spannung L1","label":"Spannung L1","format":"{{msg.payload[\"U L1 momentan\"]}} V","layout":"row-spread","x":1440,"y":240,"wires":[]},{"id":"242ddd9d.d79c42","type":"ui_text","z":"a51c9499.24c608","group":"3ea0e425.f8cf4c","order":1,"width":0,"height":0,"name":"Bezug L2","label":"<font color=red>Bezug L2","format":"{{msg.payload[\"P2 Bezug momentan\"]}} W","layout":"row-spread","x":1640,"y":40,"wires":[]},{"id":"714f485d.2d5c78","type":"ui_text","z":"a51c9499.24c608","group":"3ea0e425.f8cf4c","order":2,"width":0,"height":0,"name":"Einspeisung L2","label":"<font color=orange>Einspeisung L2","format":"{{msg.payload[\"P2 Einspeisung momentan\"]}} W","layout":"row-spread","x":1660,"y":80,"wires":[]},{"id":"b006fdcb.187e4","type":"ui_text","z":"a51c9499.24c608","group":"3ea0e425.f8cf4c","order":4,"width":0,"height":0,"name":"Blindleistung ind.","label":"Blindleistung induktiv","format":"{{msg.payload[\"Q2 ind. momentan\"]}} var","layout":"row-spread","x":1670,"y":120,"wires":[]},{"id":"e631da4f.09ecc8","type":"ui_text","z":"a51c9499.24c608","group":"3ea0e425.f8cf4c","order":3,"width":0,"height":0,"name":"Blindleistung kap.","label":"Blindleistung kapazitiv","format":"{{msg.payload[\"Q2 kap. momentan\"]}} var","layout":"row-spread","x":1670,"y":160,"wires":[]},{"id":"9c60d395.135d9","type":"ui_text","z":"a51c9499.24c608","group":"3ea0e425.f8cf4c","order":7,"width":0,"height":0,"name":"Strom L2","label":"Strom L2","format":"{{msg.payload[\"I L2 momentan\"]}} A","layout":"row-spread","x":1640,"y":200,"wires":[]},{"id":"a322cbb3.44dbf8","type":"ui_text","z":"a51c9499.24c608","group":"3ea0e425.f8cf4c","order":5,"width":0,"height":0,"name":"Spannung L2","label":"Spannung L2","format":"{{msg.payload[\"U L2 momentan\"]}} V","layout":"row-spread","x":1660,"y":240,"wires":[]},{"id":"891ad56d.288aa8","type":"ui_text","z":"a51c9499.24c608","group":"e998890c.664748","order":1,"width":0,"height":0,"name":"Bezug L3","label":"<font color=red>Bezug L3","format":"{{msg.payload[\"P3 Bezug momentan\"]}} W","layout":"row-spread","x":1840,"y":40,"wires":[]},{"id":"5c5e04ed.6fc00c","type":"ui_text","z":"a51c9499.24c608","group":"e998890c.664748","order":2,"width":0,"height":0,"name":"Einspeisung L3","label":"<font color=orange>Einspeisung L3","format":"{{msg.payload[\"P3 Einspeisung momentan\"]}} W","layout":"row-spread","x":1860,"y":80,"wires":[]},{"id":"40126b2b.6d8dc4","type":"ui_text","z":"a51c9499.24c608","group":"e998890c.664748","order":4,"width":0,"height":0,"name":"Blindleistung ind.","label":"Blindleistung induktiv","format":"{{msg.payload[\"Q3 ind. momentan\"]}} var","layout":"row-spread","x":1870,"y":120,"wires":[]},{"id":"d5d64f93.5e867","type":"ui_text","z":"a51c9499.24c608","group":"e998890c.664748","order":3,"width":0,"height":0,"name":"Blindleistung kap.","label":"Blindleistung kapazitiv","format":"{{msg.payload[\"Q3 kap. momentan\"]}} var","layout":"row-spread","x":1870,"y":160,"wires":[]},{"id":"be8c4256.d1cc3","type":"ui_text","z":"a51c9499.24c608","group":"e998890c.664748","order":7,"width":0,"height":0,"name":"Strom L3","label":"Strom L3","format":"{{msg.payload[\"I L3 momentan\"]}} A","layout":"row-spread","x":1840,"y":200,"wires":[]},{"id":"a34d2390.8aea8","type":"ui_text","z":"a51c9499.24c608","group":"e998890c.664748","order":5,"width":0,"height":0,"name":"Spannung L3","label":"Spannung L3","format":"{{msg.payload[\"U L3 momentan\"]}} V","layout":"row-spread","x":1860,"y":240,"wires":[]},{"id":"8f45ff25.79da5","type":"ui_text","z":"a51c9499.24c608","group":"511fb512.fe459c","order":6,"width":0,"height":0,"name":"cos phi L1","label":"cos phi","format":"{{msg.payload[\"cosphi L1 momentan\"]}}","layout":"row-spread","x":1430,"y":280,"wires":[]},{"id":"3b069a2e.e19ad6","type":"ui_text","z":"a51c9499.24c608","group":"3ea0e425.f8cf4c","order":6,"width":0,"height":0,"name":"cos phi L2","label":"cos phi","format":"{{msg.payload[\"cosphi L2 momentan\"]}}","layout":"row-spread","x":1650,"y":280,"wires":[]},{"id":"465fa5e4.f2d5dc","type":"ui_text","z":"a51c9499.24c608","group":"e998890c.664748","order":6,"width":0,"height":0,"name":"cos phi L3","label":"cos phi","format":"{{msg.payload[\"cosphi L3 momentan\"]}}","layout":"row-spread","x":1850,"y":280,"wires":[]},{"id":"40a5a27c.b8a06c","type":"ui_text","z":"a51c9499.24c608","group":"191b639d.2daebc","order":1,"width":0,"height":0,"name":"Bezug gesamt","label":"Bezug gesamt","format":"{{msg.payload[\"P Bezug Zähler\"]}} kWh","layout":"row-spread","x":1200,"y":400,"wires":[]},{"id":"e300f5cc.12e178","type":"ui_text","z":"a51c9499.24c608","group":"191b639d.2daebc","order":2,"width":0,"height":0,"name":"Einspeisung gesamt","label":"Einspeisung gesamt","format":"{{msg.payload[\"P Einspeisung Zähler\"]}} kWh","layout":"row-spread","x":1220,"y":440,"wires":[]},{"id":"81219c45.88129","type":"ui_text","z":"a51c9499.24c608","group":"191b639d.2daebc","order":4,"width":0,"height":0,"name":"Blindarbeit kapazitiv","label":"Blindarbeit kapazitiv","format":"{{msg.payload[\"Q kapazitiv Zähler\"]}} kvarh","layout":"row-spread","x":1220,"y":480,"wires":[]},{"id":"a94c6f97.3121e","type":"ui_text","z":"a51c9499.24c608","group":"191b639d.2daebc","order":6,"width":0,"height":0,"name":"Blindarbeit induktiv","label":"Blindarbeit induktiv","format":"{{msg.payload[\"Q induktiv Zähler\"]}} kvarh","layout":"row-spread","x":1210,"y":520,"wires":[]},{"id":"430f74d7.8216bc","type":"ui_text","z":"a51c9499.24c608","group":"2e6b81be.a1bb4e","order":1,"width":0,"height":0,"name":"Bezug L1","label":"Bezug L1","format":"{{msg.payload[\"P1 Bezug Zähler\"]}} kWh","layout":"row-spread","x":1420,"y":400,"wires":[]},{"id":"aa557880.81d868","type":"ui_text","z":"a51c9499.24c608","group":"2e6b81be.a1bb4e","order":3,"width":0,"height":0,"name":"Einspeisung L1","label":"Einspeisung L1","format":"{{msg.payload[\"P1 Einspeisung Zähler\"]}} kWh","layout":"row-spread","x":1440,"y":440,"wires":[]},{"id":"d587a679.e635a8","type":"ui_text","z":"a51c9499.24c608","group":"2e6b81be.a1bb4e","order":5,"width":0,"height":0,"name":"Blindarbeit kap. L1","label":"Blindarbeit kapazitiv","format":"{{msg.payload[\"Q1 kap. Zähler\"]}} kvarh","layout":"row-spread","x":1450,"y":480,"wires":[]},{"id":"168954d3.a0e28b","type":"ui_text","z":"a51c9499.24c608","group":"2e6b81be.a1bb4e","order":7,"width":0,"height":0,"name":"Blindarbeit ind. L1","label":"Blindarbeit induktiv","format":"{{msg.payload[\"Q1 ind. Zähler\"]}} kvarh","layout":"row-spread","x":1450,"y":520,"wires":[]},{"id":"89d19896.3445d8","type":"ui_text","z":"a51c9499.24c608","group":"970bdb41.5f39c8","order":1,"width":0,"height":0,"name":"Bezug L2","label":"Bezug L2","format":"{{msg.payload[\"P2 Bezug Zähler\"]}} kWh","layout":"row-spread","x":1640,"y":400,"wires":[]},{"id":"f0b6bcdf.ebc76","type":"ui_text","z":"a51c9499.24c608","group":"970bdb41.5f39c8","order":3,"width":0,"height":0,"name":"Einspeisung L2","label":"Einspeisung L2","format":"{{msg.payload[\"P2 Einspeisung Zähler\"]}} kWh","layout":"row-spread","x":1660,"y":440,"wires":[]},{"id":"3b534a85.2d5136","type":"ui_text","z":"a51c9499.24c608","group":"970bdb41.5f39c8","order":5,"width":0,"height":0,"name":"Blindarbeit kap. L2","label":"Blindarbeit kapazitiv","format":"{{msg.payload[\"Q2 kap. Zähler\"]}} kvarh","layout":"row-spread","x":1670,"y":480,"wires":[]},{"id":"3deb66eb.f8ea2a","type":"ui_text","z":"a51c9499.24c608","group":"970bdb41.5f39c8","order":7,"width":0,"height":0,"name":"Blindarbeit ind. L2","label":"Blindarbeit induktiv","format":"{{msg.payload[\"Q2 ind. Zähler\"]}} kvarh","layout":"row-spread","x":1670,"y":520,"wires":[]},{"id":"948729c9.87c788","type":"ui_text","z":"a51c9499.24c608","group":"f9809681.c7a138","order":1,"width":0,"height":0,"name":"Bezug L3","label":"Bezug L3","format":"{{msg.payload[\"P3 Bezug Zähler\"]}} kWh","layout":"row-spread","x":1840,"y":400,"wires":[]},{"id":"7a2df5e.95e6f0c","type":"ui_text","z":"a51c9499.24c608","group":"f9809681.c7a138","order":3,"width":0,"height":0,"name":"Einspeisung L3","label":"Einspeisung L3","format":"{{msg.payload[\"P3 Einspeisung Zähler\"]}} kWh","layout":"row-spread","x":1860,"y":440,"wires":[]},{"id":"c9a7c6b5.3b4b98","type":"ui_text","z":"a51c9499.24c608","group":"f9809681.c7a138","order":5,"width":0,"height":0,"name":"Blindarbeit kap. L3","label":"Blindarbeit kapazitiv","format":"{{msg.payload[\"Q3 kap. Zähler\"]}} kvarh","layout":"row-spread","x":1870,"y":480,"wires":[]},{"id":"6f9a8d43.d04ca4","type":"ui_text","z":"a51c9499.24c608","group":"f9809681.c7a138","order":7,"width":0,"height":0,"name":"Blindarbeit ind. L3","label":"Blindarbeit induktiv","format":"{{msg.payload[\"Q3 ind. Zähler\"]}} kvarh","layout":"row-spread","x":1870,"y":520,"wires":[]},{"id":"7d24ff20.a040f","type":"ui_group","name":"Gesamt","tab":"1b71f4ec.d9aaab","order":1,"disp":true,"width":"6","collapse":false},{"id":"511fb512.fe459c","type":"ui_group","name":"L1","tab":"1b71f4ec.d9aaab","order":2,"disp":true,"width":"6","collapse":false},{"id":"3ea0e425.f8cf4c","type":"ui_group","name":"L2","tab":"1b71f4ec.d9aaab","order":3,"disp":true,"width":"6","collapse":false},{"id":"e998890c.664748","type":"ui_group","name":"L3","tab":"1b71f4ec.d9aaab","order":4,"disp":true,"width":"6","collapse":false},{"id":"191b639d.2daebc","type":"ui_group","name":"Zähler","tab":"f65b3629.5def38","order":1,"disp":true,"width":"6","collapse":false},{"id":"2e6b81be.a1bb4e","type":"ui_group","name":"L1","tab":"f65b3629.5def38","order":2,"disp":true,"width":"6","collapse":false},{"id":"970bdb41.5f39c8","type":"ui_group","name":"L2","tab":"f65b3629.5def38","order":3,"disp":true,"width":"6","collapse":false},{"id":"f9809681.c7a138","type":"ui_group","name":"L3","tab":"f65b3629.5def38","order":4,"disp":true,"width":"6","collapse":false},{"id":"1b71f4ec.d9aaab","type":"ui_tab","name":"SHM","icon":"fa-bolt ","disabled":false,"hidden":false},{"id":"f65b3629.5def38","type":"ui_tab","name":"SHM Zähler","icon":"fa-list ","disabled":false,"hidden":false}]

As i dont have your data, I cannot tell you the issue.

Add a debug like this...
image

Ensure the debug is set for full msg...
image

then copy a few data transmissions like this...
image

and paste it into a reply by pressing the code button...
image
... then pasting the copied value in the middle of the backticks

Here it is.

{"payload":[83,77,65,0,0,4,2,160,0,0,0,1,2,76,0,16,96,105,1,116,178,240,232,98,55,58,116,177,0,1,4,0,0,0,0,19,0,1,8,0,0,0,0,3,251,161,22,88,0,2,4,0,0,0,0,0,0,2,8,0,0,0,0,14,71,142,164,104,0,3,4,0,0,0,0,0,0,3,8,0,0,0,0,2,47,70,85,96,0,4,4,0,0,0,15,217,0,4,8,0,0,0,0,5,88,210,186,216,0,9,4,0,0,0,15,217,0,9,8,0,0,0,0,6,26,25,48,240,0,10,4,0,0,0,0,0,0,10,8,0,0,0,0,16,35,244,207,128,0,13,4,0,0,0,0,5,0,14,4,0,0,0,195,123,0,21,4,0,0,0,0,0,0,21,8,0,0,0,0,4,196,209,18,8,0,22,4,0,0,0,6,241,0,22,8,0,0,0,0,6,2,97,7,248,0,23,4,0,0,0,0,0,0,23,8,0,0,0,0,0,144,44,117,160,0,24,4,0,0,0,5,227,0,24,8,0,0,0,0,2,38,151,19,0,0,29,4,0,0,0,0,0,0,29,8,0,0,0,0,5,44,91,122,8,0,30,4,0,0,0,9,26,0,30,8,0,0,0,0,6,102,173,161,8,0,31,4,0,0,0,5,16,0,32,4,0,0,3,138,140,0,33,4,0,0,0,2,251,0,41,4,0,0,0,4,131,0,41,8,0,0,0,0,3,9,253,226,184,0,42,4,0,0,0,0,0,0,42,8,0,0,0,0,5,176,119,55,200,0,43,4,0,0,0,0,0,0,43,8,0,0,0,0,1,60,195,104,0,0,44,4,0,0,0,4,119,0,44,8,0,0,0,0,1,186,218,65,40,0,49,4,0,0,0,6,89,0,49,8,0,0,0,0,3,157,207,134,24,0,50,4,0,0,0,0,0,0,50,8,0,0,0,0,6,4,41,110,64,0,51,4,0,0,0,3,112,0,52,4,0,0,3,138,0,0,53,4,0,0,0,2,199,0,61,4,0,0,0,2,129,0,61,8,0,0,0,0,0,188,11,71,0,0,62,4,0,0,0,0,0,0,62,8,0,0,0,0,7,35,239,138,16,0,63,4,0,0,0,0,0,0,63,8,0,0,0,0,0,148,159,87,56,0,64,4,0,0,0,5,127,0,64,8,0,0,0,0,1,169,170,72,248,0,69,4,0,0,0,6,11,0,69,8,0,0,0,0,1,114,116,175,224,0,70,4,0,0,0,0,0,0,70,8,0,0,0,0,7,90,15,86,72,0,71,4,0,0,0,2,249,0,72,4,0,0,3,136,174,0,73,4,0,0,0,1,159,144,0,0,0,2,6,6,82,0,0,0,0],"fromip":"192.168.178.254:44423","ip":"192.168.178.254","port":44423,"_msgid":"fdb4ab7d.3f6318"}

That data works perfectly fine for me...



I suspect 1 of 2 things...

  1. Sometimes the data is bad (but not always)
  2. You are using a version of node-js that is not suitable.

What node-js version are you using?


Also,
Can you add a catch node attached to msg
image

then copy the catch the error & copy paste the copy value when the error occurs...


... and paste into a reply.

In which palette I find the node-js?

hope that's so right.

{"payload":[83,77,65,0,0,4,2,160,0,0,0,1,2,76,0,16,96,105,1,116,178,240,232,98,55,83,0,109,0,1,4,0,0,0,0,0,0,1,8,0,0,0,0,3,251,161,30,200,0,2,4,0,0,0,0,44,0,2,8,0,0,0,0,14,71,142,172,216,0,3,4,0,0,0,0,0,0,3,8,0,0,0,0,2,47,70,85,96,0,4,4,0,0,0,16,36,0,4,8,0,0,0,0,5,88,220,183,104,0,9,4,0,0,0,0,0,0,9,8,0,0,0,0,6,26,30,23,80,0,10,4,0,0,0,16,36,0,10,8,0,0,0,0,16,35,249,228,72,0,13,4,0,0,0,0,11,0,14,4,0,0,0,195,77,0,21,4,0,0,0,0,0,0,21,8,0,0,0,0,4,196,209,18,8,0,22,4,0,0,0,9,68,0,22,8,0,0,0,0,6,2,101,93,128,0,23,4,0,0,0,0,0,0,23,8,0,0,0,0,0,144,44,117,160,0,24,4,0,0,0,6,13,0,24,8,0,0,0,0,2,38,154,204,112,0,29,4,0,0,0,0,0,0,29,8,0,0,0,0,5,44,91,122,8,0,30,4,0,0,0,11,17,0,30,8,0,0,0,0,6,102,179,88,240,0,31,4,0,0,0,5,165,0,32,4,0,0,3,138,130,0,33,4,0,0,0,3,69,0,41,4,0,0,0,6,131,0,41,8,0,0,0,0,3,10,0,164,168,0,42,4,0,0,0,0,0,0,42,8,0,0,0,0,5,176,119,55,200,0,43,4,0,0,0,0,0,0,43,8,0,0,0,0,1,60,195,104,0,0,44,4,0,0,0,4,149,0,44,8,0,0,0,0,1,186,221,12,240,0,49,4,0,0,0,7,246,0,49,8,0,0,0,0,3,157,211,116,248,0,50,4,0,0,0,0,0,0,50,8,0,0,0,0,6,4,41,110,64,0,51,4,0,0,0,4,129,0,52,4,0,0,3,137,156,0,53,4,0,0,0,3,50,0,61,4,0,0,0,2,149,0,61,8,0,0,0,0,0,188,12,218,152,0,62,4,0,0,0,0,0,0,62,8,0,0,0,0,7,35,239,138,16,0,63,4,0,0,0,0,0,0,63,8,0,0,0,0,0,148,159,87,56,0,64,4,0,0,0,5,130,0,64,8,0,0,0,0,1,169,173,190,232,0,69,4,0,0,0,6,21,0,69,8,0,0,0,0,1,114,120,125,0,0,70,4,0,0,0,0,0,0,70,8,0,0,0,0,7,90,15,86,72,0,71,4,0,0,0,3,1,0,72,4,0,0,3,135,193,0,73,4,0,0,0,1,168,144,0,0,0,2,6,6,82,0,0,0,0],"fromip":"192.168.178.254:44423","ip":"192.168.178.254","port":44423,"_msgid":"486a57e0.9985e8","error":{"message":"TypeError: scale.matchAll is not a function","source":{"id":"e68e3ea4.1352b","type":"buffer-parser","count":1},"stack":"TypeError: scale.matchAll is not a function\n    at parseSpecificationItem (/home/pi/.node-red/node_modules/node-red-contrib-buffer-parser/buffer-parser.js:157:51)\n    at /home/pi/.node-red/node_modules/node-red-contrib-buffer-parser/buffer-parser.js:228:28\n    at Array.map (<anonymous>)\n    at parseSpecification (/home/pi/.node-red/node_modules/node-red-contrib-buffer-parser/buffer-parser.js:226:51)\n    at bufferParserNode._inputCallback (/home/pi/.node-red/node_modules/node-red-contrib-buffer-parser/buffer-parser.js:738:33)\n    at bufferParserNode.Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:199:18)\n    at Immediate._onImmediate (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:179:33)\n    at runCallback (timers.js:705:18)\n    at tryOnImmediate (timers.js:676:5)\n    at processImmediate (timers.js:658:5)"}}

In a terminal, type node -v

image

Also, in the palette, what version is buffer-parser?

image

That payload works for me - I suspect you are on NODE-JS version less than 12.

Buffer-parser is version 3.1.6

Can I only check the node-js version in the terminal?
Then I have to look for my password first an have to continue tomorrow. Wife calls me to bed. Both children are sick.

You can do it from an exec node to run node -v


I think you will find you are on an old version.

If you are running on a PI or Debian based linux system, you can upgrade node-red to latest and node-js at the same time...

Open a terminal then paste in the below...

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node14

full info here: Running on Raspberry Pi : Node-RED

I'll try tomorrow. Thank you in advance.

Hi Steve,
did the update and see that it works. Thank you very much.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.