wogri / hass-blinds

Homessistant Blind library
Apache License 2.0
17 stars 1 forks source link

Issue: Feature request - Add delay when operating more then 10 blinds at once #2

Closed kaczkalolo closed 3 years ago

kaczkalolo commented 3 years ago

Hi Please add a delay when automating more then 10 devices at once. I have blinds controlled by Somfy Tahoma custom integration which whenever i send a command to open or close more then 10 blinds at the same time i get an error:

2021-08-02 12:35:44 ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Execution queue is full on gateway: #1224-5031-1539 (soft limit: 10) 2021-08-02 12:35:44 ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Execution queue is full on gateway: #1224-5031-1539 (soft limit: 10) 2021-08-02 12:35:45 ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Execution queue is full on gateway: #1224-5031-1539 (soft limit: 10) 2021-08-02 12:35:45 ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Execution queue is full on gateway: #1224-5031-1539 (soft limit: 10) 2021-08-02 12:35:45 ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Execution queue is full on gateway: #1224-5031-1539 (soft limit: 10) 2021-08-02 12:35:45 ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Execution queue is full on gateway: #1224-5031-1539 (soft limit: 10) 2021-08-02 12:35:45 ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Execution queue is full on gateway: #1224-5031-1539 (soft limit: 10) 2021-08-02 12:35:45 ERROR (MainThread) [custom_components.tahoma.tahoma_entity] Execution queue is full on gateway: #1224-5031-1539 (soft limit: 10)

To resolve that or workaround that problem is to divide the quantity of blinds into groups (lets say 5 blinds in group) and then add delay between sending command to open/close groups e.g. 60s - so preferably it would be nice to have two variables- device count per group and delay between commands

Thanks

wogri commented 3 years ago

the blinds don't know about each other in the code, so grouping them can be complicated as they can't count it's neighbors. The execution time of a blind (when decisions are made to put them up or down) are made every minute, and it's the same time for all blinds at once. One trivial fix I can do is to make every single blind decide a random execution time each minute. That would spread the load when they would send the commands to move them up or down. The question is though: Would this work? If 11 blinds have a runtime of 70 seconds and they send a command to the gateway - let's say every 5 seconds - would this overload the gateway because the first blind is still running when the 11th command is sent?

kaczkalolo commented 3 years ago

It takes around 25 seconds to close/open the longest blind at my house. And yes if 11th command was sent while 1st was still running then it would fail. But since it takes 25s then it will never be the case.

kaczkalolo commented 3 years ago

Let's forget about it for now