fabiobui / node-red-contrib-myhome-bticino

MIT License
3 stars 0 forks source link

node-RED server crash when scanning/updating devices #6

Open FredBlo opened 3 years ago

FredBlo commented 3 years ago

When I scan or update devices (I mean physical ones such as switches, actuators, dimmers,... using MyHome Suite configuration software), the node-RED server crashes. Kind of unmanaged / unusual requests passing by on the BUS ?

Log content

13 info lifecycle node-red-docker@1.2.9~start: Failed to exec start script 14 verbose stack Error: node-red-docker@1.2.9 start: node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data" 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 14 verbose stack at EventEmitter.emit (events.js:198:13) 14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 14 verbose stack at ChildProcess.emit (events.js:198:13) 14 verbose stack at maybeClose (internal/child_process.js:982:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 15 verbose pkgid node-red-docker@1.2.9 16 verbose cwd /usr/src/node-red 17 verbose Linux 3.10.105 18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "--no-update-notifier" "--no-fund" "start" "--cache" "/data/.npm" "--" "--userDir" "/data" 19 verbose node v10.23.2 20 verbose npm v6.14.10

Updated : the log found on console itself is more usable I think, will have a look :-)

20 Mar 14:42:49 - [red] Uncaught Exception: 20 Mar 14:42:49 - TypeError: Cannot read property '1' of null at MyHomeGatewayNode. (/data/node_modules/node-red-contrib-myhome-bticino/myhome-light.js:19:32) at MyHomeGatewayNode.emit (events.js:203:15) at MyHomeGatewayNode.Node.emit (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:181:20) at parsePacket (/data/node_modules/node-red-contrib-myhome-bticino/myhome-gateway.js:113:16) at Socket. (/data/node_modules/node-red-contrib-myhome-bticino/myhome-gateway.js:39:9) at Socket.emit (events.js:198:13) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at Socket.Readable.push (_stream_readable.js:224:10) at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) npm ERR! code ELIFECYCLE

FredBlo commented 3 years ago

Should be OK for lights, switches & covers (I did not find any Regex test elsewhere)

FredBlo commented 3 years ago

Fyi, I refactored a new node-red nodes set 'node-red-contrib-myhome-bticino-v2' based on this one. In this v2, this issue is solved, and new functionalities have been added too. See detailed Node-RED info page for more info about improvements, bug fixes & upgrade info/procedure. Feel free to discuss about it directly on GitHub (either issues or discussions)