ihrigb / node-red-contrib-doorbird-ultimate

Node Red Integration for Doorbird Devices
https://flows.nodered.org/node/node-red-contrib-doorbird-ultimate
Apache License 2.0
4 stars 3 forks source link

Ringing Doorbell crashes/restarts Node-RED #5

Closed HansDamph closed 2 years ago

HansDamph commented 2 years ago

Using Node-RED v1.3.7. and Dashboard 3.1.3.

Works very well:

Does not work:

Crashes: but does sometimes work

Hardware:

I really appreciate your work und i hope you can fix the ringing and prevent crashes!

ihrigb commented 2 years ago

Hi @HansDamph,

thanks a lot for your feedback! I will look into the issues. Can you check, if you can provide some logs? Especially for the crash during ring this would be helpful!

Thanks!

HansDamph commented 2 years ago

I set up another node-red instance in docker just to see if it is maybe my old node-red version. I checked with info node and then want to try relay: grafik

In the docker container following log comes up when node-red container starts:

18 Jan 12:43:24 - [info] Starting flows 18 Jan 12:43:24 - [info] Started flows (node:17) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'substring' of undefined at Socket. (/data/node_modules/doorbird/dist/index.js:114:99) at step (/data/node_modules/doorbird/dist/index.js:52:23) at Object.next (/data/node_modules/doorbird/dist/index.js:33:53) at fulfilled (/data/node_modules/doorbird/dist/index.js:24:58) (Use node --trace-warnings ... to show where the warning was created) (node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:17) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'substring' of undefined at Socket. (/data/node_modules/doorbird/dist/index.js:114:99) at step (/data/node_modules/doorbird/dist/index.js:52:23) at Object.next (/data/node_modules/doorbird/dist/index.js:33:53) at fulfilled (/data/node_modules/doorbird/dist/index.js:24:58) (node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:17) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'substring' of undefined at Socket. (/data/node_modules/doorbird/dist/index.js:114:99) at step (/data/node_modules/doorbird/dist/index.js:52:23) at Object.next (/data/node_modules/doorbird/dist/index.js:33:53) at fulfilled (/data/node_modules/doorbird/dist/index.js:24:58) (node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3) (node:17) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'substring' of undefined at Socket. (/data/node_modules/doorbird/dist/index.js:114:99) at step (/data/node_modules/doorbird/dist/index.js:52:23) at Object.next (/data/node_modules/doorbird/dist/index.js:33:53) at fulfilled (/data/node_modules/doorbird/dist/index.js:24:58) (node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

ihrigb commented 2 years ago

The issue in the container logs should be fixed by this (when I release node-red-doorbird-ultimate 0.0.6). https://github.com/ihrigb/node-doorbird/commit/0f4f3493e94adc10533a63b47fa1e67e99f6f766 Working on the relay issue now.

Please bear in mind that for "ring" any Docker container in a bridge network will not work, as the ring is a UDP broadcast. Only host networks will work for this scenario.

ihrigb commented 2 years ago

@HansDamph 0.0.7 is released now. Feel free to test it. Once again thank you for reporting this issue.