[GH-ISSUE #538] [Question] websocket and nodered #411

Closed
opened 2026-05-07 00:23:55 +02:00 by BreizhHardware · 1 comment

Originally created by @dokho33 on GitHub (Dec 10, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/538

Hello.

I would like to use ntfy for my home automation with nodered.
I manage to connect nodered via websocket but after a while there is a disconnection.
I think the problem comes from nodered because the socket still appears as connected, but it no longer receives data.
Has anyone already encountered the problem?

ntfy logs:

2022/12/09 21:31:35 DEBUG 172.17.0.1 HTTP GET /home_automation/ws?auth=XXXX Dispatching request
2022/12/09 21:31:35 DEBUG 172.17.0.1 HTTP GET /home_automation/ws?auth=XXXX WebSocket connection opened
2022/12/10 09:32:36 DEBUG 172.17.0.1 HTTP GET /home_automation/ws?auth=XXXX WebSocket connection closed
2022/12/10 09:32:36 DEBUG 172.17.0.1 HTTP GET /home_automation/ws?auth=XXXX WebSocket error (this error is okay, it happens a lot): read tcp 172.17.0.14:80->172.17.0.1:55992: i/o timeout

nodered screenshot:
image

Regards,

Originally created by @dokho33 on GitHub (Dec 10, 2022). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/538 Hello. I would like to use ntfy for my home automation with nodered. I manage to connect nodered via websocket but after a while there is a disconnection. I think the problem comes from nodered because the socket still appears as connected, but it no longer receives data. Has anyone already encountered the problem? ntfy logs: ``` 2022/12/09 21:31:35 DEBUG 172.17.0.1 HTTP GET /home_automation/ws?auth=XXXX Dispatching request 2022/12/09 21:31:35 DEBUG 172.17.0.1 HTTP GET /home_automation/ws?auth=XXXX WebSocket connection opened 2022/12/10 09:32:36 DEBUG 172.17.0.1 HTTP GET /home_automation/ws?auth=XXXX WebSocket connection closed 2022/12/10 09:32:36 DEBUG 172.17.0.1 HTTP GET /home_automation/ws?auth=XXXX WebSocket error (this error is okay, it happens a lot): read tcp 172.17.0.14:80->172.17.0.1:55992: i/o timeout ``` nodered screenshot: ![image](https://user-images.githubusercontent.com/26525217/206851455-ec4e448e-b374-4c26-9a49-dad87e566ed9.png) Regards,
BreizhHardware 2026-05-07 00:23:55 +02:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@binwiederhier commented on GitHub (Dec 10, 2022):

If you set the log level to TRACE, you should see ntfy sending keepalive messages every 45s. That's supposed to keep the socket alive, and stop firewalls and other intermediaries from killing it.

That said, every software that keeps sockets open must deal with connection failures and retries. Sockets break, firewalls are rebooted, routers get congested. Lots of reasons why you must be able to deal with connection failures.

This does not seem to be a ntfy problem. You may also want to ask on the ntfy Discord/Matrix. Seems like a better place to ask this.

<!-- gh-comment-id:1345269062 --> @binwiederhier commented on GitHub (Dec 10, 2022): If you set the log level to `TRACE`, you should see ntfy sending keepalive messages every 45s. That's supposed to keep the socket alive, and stop firewalls and other intermediaries from killing it. That said, every software that keeps sockets open must deal with connection failures and retries. Sockets break, firewalls are rebooted, routers get congested. Lots of reasons why you must be able to deal with connection failures. This does not seem to be a ntfy problem. You may also want to ask on the ntfy Discord/Matrix. Seems like a better place to ask this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#411
No description provided.