coolchip / node-red-contrib-luxtronik2

Node-RED node, that reads heat pumps based on the Luxtronik 2.0 contol unit. Supports for example Alpha Innotec and Siemens Novelan (WRP NET).
MIT License
7 stars 2 forks source link

Cannot read properties #10

Open Marcibaldas opened 1 year ago

Marcibaldas commented 1 year ago

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

coolchip commented 4 months ago

Oh dear. I've only now noticed this issue. Is this still a problem at your system?

Podleisek commented 4 months ago

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)
Marcibaldas commented 4 months ago

It occurs when luxtronic is offline. My workaround is to ping it before calling this function

waldbaer commented 4 months ago

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.