Node Red Restarts when Doorbird doorbell button pressed

Hello,

I am running node red v1.1.3 on Nodejs v10.22.0 via Docker created using IOTstack.

I am trying to use my doorbird doorbell button press to trigger a flow. I have tried two different methods. Both methods are triggering node red to restart upon pressing the doorbell button.

Method one was using node-red-contrib-doorbird-ultimate. I know I set it up properly because I can create a flow to trigger the relay in the doorbird and view details about the device pushed to the debug. But when I use the node that monitors the doorbell press, upon pressing the doorbell button, it causes node red to loose connection with the server, which is actually node red restarting.

For method two, I went for a simpler route of triggering an HTTP call from the doorbird. I know I am setting this up correctly within the doorbird because I got it to work with IFTTT via web hooks. I also know my simple flow is setup correctly because when I hit my URL via the web browser, it works as expected. BUT when I set the doorbird to call the HTTP URL from node red, it too triggers a restart.

I've tried to look at the node red logs within docker, but it fails to find the logs, even though I checked the settings file and have logging active.

I'm thinking that I should kill this container and rebuild, but I wanted to check with the community for other ideas before I take this next step.

thanks!
Ryan

Welcome to the community Ryan.

Without the logs, it is impossible to say what is causing this. Generally nothing in a flow should be able to cause Node-RED to restart and it normally means a node hasn't captured an error correctly.

Honestly, if you don't really need Docker, it is best not to use it as it just adds a layer of complexity.

Considering that version of node-red is quite old and that version of nodejs is end of life, I'd say yes.

Regarding your issue, you might have created a loop or be triggering a node that is faulty. Without seeing your flow or the log, it is impossible to say.

I rebuilt the docker to the newest version of node red and nodes and it solved the problem. Thanks!

Yeah, normally, I don't have problems with the complexities of docker, but a simple pull of a new docker image and all is good. thanks!

1 Like

So taking your advice I rebuilt using docker, it worked using the HTTP call. Out of curiosity, I used the doorbird module and It didn't work. I decided to remove docker from the equation and install directly. Same result as before, it causes node red to restart. Doorbird throws this error:

28 Mar 10:27:55 - [red] Uncaught Exception:

28 Mar 10:27:55 - [error] TypeError: this.strech is not a function

at Socket.DoorbirdUdpSocket.onMessage (/home/pi/.node-red/node_modules/doorbird/dist/index.js:120:14)

at Socket.emit (events.js:400:28)

at Socket.emit (domain.js:475:12)

at UDP.onMessage [as onmessage] (dgram.js:931:8)

nodered.service: Main process exited, code=exited, status=1/FAILURE

nodered.service: Failed with result 'exit-code'.

nodered.service: Service RestartSec=20s expired, scheduling restart.

nodered.service: Scheduled restart job, restart counter is at 1.

Stopped Node-RED graphical event wiring tool.

Started Node-RED graphical event wiring tool.

Thoughts?

thanks!

What package are you using? One of the node-red nodes? Library - Node-RED

Or are you using an npm module in a function node?

You should submit an issue for this on the node's github page. A node should catch all errors and not pass them up to node-red, which has no option other than to terminate.

I've tried it two ways: #1: having the doorbird device make an http call on press, which is captured by an HTTP in node and #2 using this node-red node installed via the palette manager.

At first in the docker container, I thought both were triggering a restart on doorbell press. So I rebuilt the container and found the same issue.

Next, I installed directly and still saw the restart from the node-red node but not from the HTTP in node. I saw the error I have posted in this thread, which is tied to the node-red node. I deleted that flow and it's configuration node, but didn't uninstall from the palette manager. Then randomly using only the flow with the HTTP in node, it restarted displaying the same error referencing the installed doorbird node. I then deleted it from the palette manager and have had zero problems since.

Following someone's advice, I submitted an issue to it's creator.

For now, it is working without a problem. The node-red node would make things easier, but I can do everything needed via http api calls.

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