Closed palfrey closed 8 months ago
To clarify some details on this, this is with Home Assistant 2023.8.4. I'm pretty sure I didn't used to see this, so guessing it's an upgrade change at some point, but not sure exactly when as I was doing auto-upgrades for a while. Generally, this only happens when I'm running a scene (i.e. a bunch of velux changes in one go), although I was able to reproduce this earlier when just clicking a whole set of windows at once, so guessing it's probably to do with the gap between commands?
I had the same issue in Home Assistant 2023.8.1 and I had to revert to 2023.7.3 which is the last working version.
I tried every new HA version since but they all have the same behavior.
I have a very hacky workaround with time.sleep
filed in Core (https://github.com/home-assistant/core/pull/100523) and we'll see where that gets to...
I mainly see this issue when activating a scene that closes all my velux window covers. It seems that the library or klf200 is overwhelmed by the requests? When playing around with only one window cover, it works as expected. When activating the scene mentioned before, not all window covers are closing/opening - and the ones not moving are always the same. I was using an automation for opening and closing, which isn't working currently. Maybe I have to work around that like @palfrey and change the automation to issue only one command at a time.
I mainly see this issue when activating a scene that closes all my velux window covers. It seems that the library or klf200 is overwhelmed by the requests? When playing around with only one window cover, it works as expected. When activating the scene mentioned before, not all window covers are closing/opening - and the ones not moving are always the same. I was using an automation for opening and closing, which isn't working currently. Maybe I have to work around that like @palfrey and change the automation to issue only one command at a time.
for me they are always different. If I run my close or open scene again in HA they eventually get to the right state.
@Julius2342 Any thoughts on a PR to add the option for minimum delays between calls to KLF 200 devices? Like https://github.com/home-assistant/core/pull/100523, but folded into the library and redone to only add delays on subsequent rapid calls, not all of them.
I implemented a semaphore to avoid parallel commands as the HA solution seems not work... Here the corresponding commit:
https://github.com/pawlizio/pyvlx/commit/70324963b0bd72835a233efc87c50584808c07d5
Hmm, probably a semaphore. I would have done it quite highlevel, e.g. in ApiEvent/do_api_call . What do you think?
Hmm, probably a semaphore. I would have done it quite highlevel, e.g. in ApiEvent/do_api_call . What do you think?
That seems sensible to me. https://github.com/Julius2342/pyvlx/pull/353 does this, and also solves the "why doesn't this first call respond?" issue I was seeing before in HA by making sure we're connected before entering the Semaphore section.
So, I've been seeing a lot of the following in my Home Assistant logs recently
which is starting to get a bit annoying. Any thoughts on how to debug this, or at least get more information than just "computer says no", because I'd love to sort this one out.