PLCHome / node-red-contrib-velux

Provides nodes to talk to Velux® KLF-200 io-homecontrol® Gateway
9 stars 2 forks source link

Timeout shutdown node red #24

Open vigeland opened 8 months ago

vigeland commented 8 months ago

I have 3 shutters, 4 Velux Nodes. One to get the state by home monitor, and 3 to close the shutter. When I close the 3 shutter, triggered at the same time ( may be ) , node red logs a timeout and shutdown.

9 Oct 19:10:55 - [red] Uncaught Exception: 9 Oct 19:10:55 - [error] Error: timeout GW_COMMAND_SEND_CFM at Object. (/data/node_modules/velux-klf200-api/lib/net.js:190:19) at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7)

node-red-docker@3.1.0 start

Any idea for work around

KNXsmart commented 2 days ago

Quite some time ago, but maybe also helpful for other with the same issue.

For me, node-red always crashes if I send multiple write requests simultaneously or shortly after each other. As a workaround, I don't send the messages directly to the Velux Nodes but instead add a device property to the message, route all of the write messages through the same rate limiting/delay node (1 message per 0.5s in my case) and then switch again by the device property to forward the message to the correct device node. This actually solved the issue for me.