Open Marcibaldas opened 1 year ago
Oh dear. I've only now noticed this issue. Is this still a problem at your system?
Not sure OP still has the same problem, but I do experience the same crash. See today's log:
29 Feb 20:56:34 - [red] Uncaught Exception:
29 Feb 20:56:34 - [error] TypeError: Cannot read properties of undefined (reading '0')
at /data/node_modules/node-red-contrib-luxtronik2-ws/luxtronik2-ws.js:99:79
at Parser.<anonymous> (/data/node_modules/node-red-contrib-luxtronik2-ws/node_modules/xml2js/lib/parser.js:304:18)
at Parser.emit (node:events:513:28)
at SAXParser.onclosetag (/data/node_modules/node-red-contrib-luxtronik2-ws/node_modules/xml2js/lib/parser.js:262:26)
at emit (/data/node_modules/sax/lib/sax.js:625:35)
at emitNode (/data/node_modules/sax/lib/sax.js:630:5)
at closeTag (/data/node_modules/sax/lib/sax.js:890:7)
at SAXParser.write (/data/node_modules/sax/lib/sax.js:1437:13)
at Parser.exports.Parser.Parser.parseString (/data/node_modules/node-red-contrib-luxtronik2-ws/node_modules/xml2js/lib/parser.js:323:31)
at Parser.parseString (/data/node_modules/node-red-contrib-luxtronik2-ws/node_modules/xml2js/lib/parser.js:5:59)
It occurs when luxtronic is offline. My workaround is to ping it before calling this function
Not sure OP still has the same problem, but I do experience the same crash. See today's log:
29 Feb 20:56:34 - [red] Uncaught Exception: 29 Feb 20:56:34 - [error] TypeError: Cannot read properties of undefined (reading '0') at /data/node_modules/node-red-contrib-luxtronik2-ws/luxtronik2-ws.js:99:79 at Parser.<anonymous> (/data/node_modules/node-red-contrib-luxtronik2-ws/node_modules/xml2js/lib/parser.js:304:18) at Parser.emit (node:events:513:28) at SAXParser.onclosetag (/data/node_modules/node-red-contrib-luxtronik2-ws/node_modules/xml2js/lib/parser.js:262:26) at emit (/data/node_modules/sax/lib/sax.js:625:35) at emitNode (/data/node_modules/sax/lib/sax.js:630:5) at closeTag (/data/node_modules/sax/lib/sax.js:890:7) at SAXParser.write (/data/node_modules/sax/lib/sax.js:1437:13) at Parser.exports.Parser.Parser.parseString (/data/node_modules/node-red-contrib-luxtronik2-ws/node_modules/xml2js/lib/parser.js:323:31) at Parser.parseString (/data/node_modules/node-red-contrib-luxtronik2-ws/node_modules/xml2js/lib/parser.js:5:59)
@Podleisek your backtrack comes from a completely different Node-RED plugin, not related to this one.
Dear Coolchip, first of all thanks for this handy Node, I've been using it with Alpha Innotec for quite a while and it is a big help in my house automation. Unfortunately now and then it crashes and the whole Node Red stops working, means none of the home automations too. Tried everything, reinstalling Node Red, refreshing Home Assistant, but it is not solving the issue. Yet somehow is starts working after the day or two by itself... But when it randomly crashes again, issue is always the same, pls see the screenshot. Would it be possible adjusting this Node's logic to avoid this crash?
Many Thanks, Regards, Marius![2022-11-13 09 55 51](https://user-images.githubusercontent.com/91271050/201616723-01abee1a-cbd7-494a-9daa-54ff72a7f34b.jpg)