add throttling to simultaneous triggered command nodes
Closed this issue · 2 comments
Given I have 10 command nodes (linked to the same Hubitat hub)
When I trigger these command nodes by one message at the same time
Then HE return 500 on some commands
Result: commands may or not be processed
Expected: no error occurs
Reason: HE API doesn't like to have a bunch of requests at the exact same millisecond
Workaround: add random delay before sending command if you have many command triggered by the same message or chain your command nodes
Best solution: add internal throttling to simultaneous requests by HE (same mechanic as the init process)
I typically chain the commands when I have many that need to be sent, or use a delay node with random delay.
I guess as long as the throttling isn't too long, then an internal throttle would be OK/unnoticeable though.
I guess as long as the throttling isn't too long, then an internal throttle would be OK/unnoticeable though.
The internal throttle should be unnoticeable (maybe 50-100ms). At the same rate that initialization and I guess that no one seen that device nodes don't display the status at the same time 😆
Chaining nodes make sense when triggering action for the same device, but for different devices, it's not intuitive
IMO, designing (by adding delay or chaining nodes) your flow based on HE limitation is really annoying and it's to hubitat-nodes to abstract these techy details