bruxy70 / Venetian-Blinds-Control

Control Shutters or Venetian blinds via buttons and MQTT. Use 2 relays (up and down) and 2 binary inputs to independently control position and tilt.
MIT License
44 stars 19 forks source link

Tilting for longer time than in configuration. #5

Closed pawelma closed 1 year ago

pawelma commented 1 year ago

Hello. Thanks for the great extension. I just installed it and testing with my blinds, and it works awesome, but there is one caveat with tilting. My tilt time is around 2100 ms, but from HA it takes around 2800. So to make it work, I need to select around 70% of the slider to perform the full 180* flip, without opening.

image

When selecting non corner position, my logs show difference between cover start and stop in milliseconds, and it's similar to the config that is set up (around 2100).

Does HA send tilt position to ESP and then ESP loop take over to monitor the tilt, or could that be related with network lag? Is there any config how to decrease 'loop sleep' interval If ESP is handling the tilt position?

pawelma commented 1 year ago

I guess it might be caused by adding +1 to tilt position % on the time >= https://github.com/bruxy70/Venetian-Blinds-Control/blob/102f6257dce26912dd81345920f71372bb07fd17/components/venetian_blinds/venetian_blinds.cpp#L68-L71 Maybe Time based cover approach would work better in that case (If I'll have some time I'll try to refactor) https://github.com/esphome/esphome/blob/e5b8dd7f2d596ff820314b61dee8848b6fe4ea7f/esphome/components/time_based/time_based_cover.cpp#L164.

DaniEll-AT commented 1 year ago

Will the test-branch be merged to master? I am currently using the test-branch because of better precision when tilting. Maybe it's possible modifying it so there is no inverted tilt position (not an issue for me, but for others...)?

Thanks for the great work to all participants 👍

bruxy70 commented 1 year ago

I think I will leave it for now. There are at least two issues reported with it. So I'd leave the two for the time being. People can use one or the other by changing the ref. I use them in my house for some time now. It seems to work, but I have noticed that the position does not update whilst the blinds move. Not a big deal, for this kind of blinds I use wither 0 or 100, and control the light by the tilt. But interesting nevertheless.

DaniEll-AT commented 1 year ago

The issue is fixed with #13 :+1: