adaptive-cover icon indicating copy to clipboard operation
adaptive-cover copied to clipboard

Venetian Blinds: Combination of Vertical and Tilted

Open jitter123 opened this issue 1 year ago • 15 comments

Checklist

  • [X] I have filled out the template to the best of my ability.
  • [X] This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • [X] This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I'm using Venetian Blinds which ar a Combination of Vertical and Tilted. Currently for each blind I have a vertical and a tilt service running simultaneously, because i want to have the close position and the tilt automated. I think, if one of this services changes a position, the other service takes it as manual override, which locks the automatic control for the override time.

Describe the solution you'd like

Another covertype "combined vertical and tilted" so you have an absolute position and a tilt position for each blind.

Describe alternatives you've considered

Multiple covertypes available at same service.

Additional context

If there already is an solution to automate vertical position and tilt position in one service, then sorry for my misunderstanding. "adaptive-cover" is great work, thank you for this.

jitter123 avatar May 22 '24 07:05 jitter123

The manual override feature of each type should only listen to their specific position attribute to set manual override. So for the tilted type it only listens and processes changes to current_tilt_position and for other types to current_position. Therefore in theory both types should not be able to interfere with each other.

To debug this a bit more can you enable debugging logs for this integration and post a snippet where both types have changed position? You can enable debugging by adding this to your configuration.yaml and preform a restart:

logger:
  default: "info"
  logs:
    custom_components.adaptive_cover: debug

basbruss avatar May 22 '24 10:05 basbruss

Thank you for the fast reply. I enabled the logs and the tilt manual override seems not to be triggered by the vertical service and vice versa. But could it be, that the manual override is triggered by the service itself and this is an problem in knx mapping? My covers are conrolled via knx-actors.

As Example I configured "Terrassentur" in configuration.yaml as cover. Example:

cover:

  • name: "Terrassentur Auf/Ab" move_long_address: "3/1/50" move_short_address: "3/1/51" stop_address: "3/1/51" position_address: "3/1/52" position_state_address: "3/1/152" angle_address: "3/1/53" angle_state_address: "3/1/153"

For this cover I only have a tilt-service running and the manual override is activated after the service sent a new angle-value.

Can I see the reason in this Log-Entry?

2024-05-23 09:31:17.293 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Processing state change event: StateChangedData(entity_id='cover.terrassentur_auf_ab', old_state=<state cover.terrassentur_auf_ab=open; current_position=1, current_tilt_position=53, device_class=blind, friendly_name=Terrassentür Auf/Ab, supported_features=255 @ 2024-05-23T09:11:13.656473+02:00>, new_state=<state cover.terrassentur_auf_ab=unavailable; device_class=blind, friendly_name=Terrassentür Auf/Ab, supported_features=255 @ 2024-05-23T09:31:17.292846+02:00>) 2024-05-23 09:31:17.293 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Wait for target: {'cover.terrassentur_auf_ab': False} 2024-05-23 09:31:17.294 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Set manual control for cover.terrassentur_auf_ab, for at least 2700.0 seconds, reset_allowed: False 2024-05-23 09:31:17.295 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Updating last updated to 2024-05-23 07:31:17.292846+00:00 for cover.terrassentur_auf_ab. Allow reset:False 2024-05-23 09:31:18.671 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.378 seconds (success: True)

In my knx-log i can see that there was no tilt-setting over knx from any source at this time.

jitter123 avatar May 23 '24 08:05 jitter123

I think I found a related bug in the code that could explain this behaviour but the provided logs are too small to fully be able to conclude that is the issue since there are no parts in it where the integration calls the service to change position.

The bug could be that if both types of positions are called closely after each other or at the same time the wait_for_target mark is removed after the first one reaches its target, while the other type is still waiting to reach its target. So when the last state-change event is received it thinks it is a non-adaptive-cover call and triggers the manual override.

basbruss avatar May 23 '24 13:05 basbruss

Here i have a log from a cover with a tilt and a vertical service where position has changed. The manual override is triggered too.

2024-05-23 09:39:07.259 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.358 seconds (success: True) 2024-05-23 09:39:07.260 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Entity state change 2024-05-23 09:39:07.262 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Resetting manual override for cover.wohnen_auf_ab, because duration has elapsed 2024-05-23 09:39:07.262 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Reset manual override for cover.wohnen_auf_ab 2024-05-23 09:39:07.271 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Run set_cover_position with data {'entity_id': 'cover.wohnen_auf_ab', 'position': 57} 2024-05-23 09:39:08.624 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.363 seconds (success: True) 2024-05-23 09:39:08.625 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Entity state change 2024-05-23 09:39:10.034 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.408 seconds (success: True) 2024-05-23 09:39:10.035 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Entity state change 2024-05-23 09:39:11.393 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.358 seconds (success: True) 2024-05-23 09:39:11.394 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Entity state change 2024-05-23 09:39:12.781 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.386 seconds (success: True) 2024-05-23 09:39:12.830 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Cover state change 2024-05-23 09:39:12.830 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Processing state change event: StateChangedData(entity_id='cover.wohnen_auf_ab', old_state=<state cover.wohnen_auf_ab=open; current_position=53, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:31:22.915280+02:00>, new_state=<state cover.wohnen_auf_ab=opening; current_position=54, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:12.829882+02:00>) 2024-05-23 09:39:12.830 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Wait for target: {'cover.wohnen_auf_ab': True} 2024-05-23 09:39:14.244 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.413 seconds (success: True) 2024-05-23 09:39:14.245 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Cover state change 2024-05-23 09:39:14.245 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Processing state change event: StateChangedData(entity_id='cover.wohnen_auf_ab', old_state=<state cover.wohnen_auf_ab=open; current_position=53, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:31:22.915280+02:00>, new_state=<state cover.wohnen_auf_ab=opening; current_position=54, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:12.829882+02:00>) 2024-05-23 09:39:14.245 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Wait for target: {'cover.wohnen_auf_ab': False} 2024-05-23 09:39:14.246 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Set manual control for cover.wohnen_auf_ab, for at least 2700.0 seconds, reset_allowed: False 2024-05-23 09:39:14.246 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Already time specified for cover.wohnen_auf_ab, reset is not allowed by user setting:False 2024-05-23 09:39:15.629 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.384 seconds (success: True) 2024-05-23 09:39:16.479 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Cover state change 2024-05-23 09:39:16.480 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Processing state change event: StateChangedData(entity_id='cover.wohnen_auf_ab', old_state=<state cover.wohnen_auf_ab=opening; current_position=54, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:12.829882+02:00>, new_state=<state cover.wohnen_auf_ab=open; current_position=58, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>) 2024-05-23 09:39:16.480 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Wait for target: {'cover.wohnen_auf_ab': True} 2024-05-23 09:39:17.890 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.409 seconds (success: True) 2024-05-23 09:39:17.891 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Cover state change 2024-05-23 09:39:17.891 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Processing state change event: StateChangedData(entity_id='cover.wohnen_auf_ab', old_state=<state cover.wohnen_auf_ab=opening; current_position=54, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:12.829882+02:00>, new_state=<state cover.wohnen_auf_ab=open; current_position=58, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>) 2024-05-23 09:39:17.891 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Wait for target: {'cover.wohnen_auf_ab': False} 2024-05-23 09:39:17.892 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Set manual control for cover.wohnen_auf_ab, for at least 2700.0 seconds, reset_allowed: False 2024-05-23 09:39:17.892 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Already time specified for cover.wohnen_auf_ab, reset is not allowed by user setting:False 2024-05-23 09:39:19.281 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.390 seconds (success: True) 2024-05-23 09:39:19.341 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Cover state change 2024-05-23 09:39:19.341 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Processing state change event: StateChangedData(entity_id='cover.wohnen_auf_ab', old_state=<state cover.wohnen_auf_ab=open; current_position=58, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>, new_state=<state cover.wohnen_auf_ab=open; current_position=58, current_tilt_position=100, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>) 2024-05-23 09:39:19.342 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Wait for target: {'cover.wohnen_auf_ab': True} 2024-05-23 09:39:20.714 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.372 seconds (success: True) 2024-05-23 09:39:20.715 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Cover state change 2024-05-23 09:39:20.715 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Processing state change event: StateChangedData(entity_id='cover.wohnen_auf_ab', old_state=<state cover.wohnen_auf_ab=open; current_position=58, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>, new_state=<state cover.wohnen_auf_ab=open; current_position=58, current_tilt_position=100, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>) 2024-05-23 09:39:20.715 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Wait for target: {'cover.wohnen_auf_ab': False} 2024-05-23 09:39:20.716 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Set manual control for cover.wohnen_auf_ab, for at least 2700.0 seconds, reset_allowed: False 2024-05-23 09:39:20.717 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Already time specified for cover.wohnen_auf_ab, reset is not allowed by user setting:False 2024-05-23 09:39:22.084 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.369 seconds (success: True) 2024-05-23 09:39:22.138 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Cover state change 2024-05-23 09:39:22.138 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Processing state change event: StateChangedData(entity_id='cover.wohnen_auf_ab', old_state=<state cover.wohnen_auf_ab=open; current_position=58, current_tilt_position=100, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>, new_state=<state cover.wohnen_auf_ab=open; current_position=57, current_tilt_position=100, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>) 2024-05-23 09:39:22.138 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Position 57 reached for cover.wohnen_auf_ab 2024-05-23 09:39:22.138 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Wait for target: {'cover.wohnen_auf_ab': False} 2024-05-23 09:39:23.498 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.359 seconds (success: True) 2024-05-23 09:39:23.498 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Cover state change 2024-05-23 09:39:23.499 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Processing state change event: StateChangedData(entity_id='cover.wohnen_auf_ab', old_state=<state cover.wohnen_auf_ab=open; current_position=58, current_tilt_position=100, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>, new_state=<state cover.wohnen_auf_ab=open; current_position=57, current_tilt_position=100, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>) 2024-05-23 09:39:23.499 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Wait for target: {'cover.wohnen_auf_ab': False} 2024-05-23 09:39:23.500 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Set manual control for cover.wohnen_auf_ab, for at least 2700.0 seconds, reset_allowed: False 2024-05-23 09:39:23.500 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Already time specified for cover.wohnen_auf_ab, reset is not allowed by user setting:False 2024-05-23 09:39:24.840 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.341 seconds (success: True) 2024-05-23 09:39:24.878 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Cover state change 2024-05-23 09:39:24.878 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Processing state change event: StateChangedData(entity_id='cover.wohnen_auf_ab', old_state=<state cover.wohnen_auf_ab=open; current_position=57, current_tilt_position=100, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>, new_state=<state cover.wohnen_auf_ab=open; current_position=57, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>) 2024-05-23 09:39:24.878 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Wait for target: {'cover.wohnen_auf_ab': False} 2024-05-23 09:39:26.227 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.349 seconds (success: True) 2024-05-23 09:39:26.228 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Cover state change 2024-05-23 09:39:26.228 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Processing state change event: StateChangedData(entity_id='cover.wohnen_auf_ab', old_state=<state cover.wohnen_auf_ab=open; current_position=57, current_tilt_position=100, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>, new_state=<state cover.wohnen_auf_ab=open; current_position=57, current_tilt_position=35, device_class=blind, friendly_name=Wohnen Auf/Ab, supported_features=255 @ 2024-05-23T09:39:16.479512+02:00>) 2024-05-23 09:39:26.229 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Wait for target: {'cover.wohnen_auf_ab': False} 2024-05-23 09:39:26.230 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Set manual control for cover.wohnen_auf_ab, for at least 2700.0 seconds, reset_allowed: False 2024-05-23 09:39:26.230 DEBUG (MainThread) [custom_components.adaptive_cover.coordinator] Already time specified for cover.wohnen_auf_ab, reset is not allowed by user setting:False 2024-05-23 09:39:27.581 DEBUG (MainThread) [custom_components.adaptive_cover] Finished fetching adaptive_cover data in 1.353 seconds (success: True)

jitter123 avatar May 23 '24 14:05 jitter123

Thanks! I will look for a solution, but it is still not very clear why the mark was removed. Will also add some more debugging tools to get better logs for it.

I do notice that events are sometimes called double for the same position, but that shouldn't affect the wait for target mark in theory

basbruss avatar May 23 '24 15:05 basbruss

I have this setup working (currently 🤞) with the two modes. The bug described didn't occur to me up until now.

But still a combined option would be nice. @basbruss how easy do you reckon this would be to implement as a newcomer to the repo?

Apsysikal avatar Jun 06 '24 05:06 Apsysikal

Hey, @Apsysikal and @jitter123. Would you mind showing your config? As long as there is no "official" way to do this, it would be nice to have a working config here.

ymarkus avatar Jun 24 '24 11:06 ymarkus

A combined Option would be awesome

theovermaze avatar Jun 25 '24 10:06 theovermaze

I have already been tinkering with how to imply a combined mode, but it involves some rewriting/restructuring of the code, for which I don't have the time in the coming weeks

PS. I am converting this into a proper feature request

basbruss avatar Jun 25 '24 11:06 basbruss

Hey, @Apsysikal and @jitter123. Would you mind showing your config? As long as there is no "official" way to do this, it would be nice to have a working config here.

Could you help me out where to find the config? I've used the GUI to set it up and nothing is in my configuration.yaml

Apsysikal avatar Jun 26 '24 18:06 Apsysikal

I don't think there is a file it saves to, I was hoping you could send some screenshots. Thanks!

ymarkus avatar Jun 27 '24 07:06 ymarkus

I don't think there is a file it saves to, I was hoping you could send some screenshots. Thanks!

Ok, yeah sure. I have two configs. One is called "Tilt" and the other "Vertical". The first one here is the "Tilt", image image

the second ones are for the "Vertical". image image

Apsysikal avatar Jun 27 '24 08:06 Apsysikal

I have these blinds as well so i am 100% waiting. But i do have them infront of a balcony door. Should i create separate feature request for add door sensor to open the blinds if door is open or can i just leave it here?

JirikP avatar Aug 22 '24 11:08 JirikP

Hi,

I also observe the same issue described by jitter123. After setting up two services for one Venetian blind, these two seem to interfere and trigger the other ones manual override. If further logs are required for debugging, I could assist here.

Otherwise great work here! I really like this integration :-)!

christic73 avatar Jan 29 '25 15:01 christic73

I guess there are different versions of venetian blinds. Maybe the separation for vertical/tilt function might work for blinds that also have completly separated motor for controlling it.

In my case it is only one motor which is controlling both. When the vertical closes, also the tilt is closed. When vertical opens, also tilt is open. E.g.: If the vertical should close but tilt should stay the same (open), then vertical will close all the way. During that time also tilt is closed. When vertical finished closing, the motor will turn back up a bit to just open the tilt (vertical stays closed). There are still different parameters to control tilt and vertical. But because of this shared behavior during open/close vertical, it will always trigger the manual mode in the tilt automation.

My solution for the moment is to add offset of 1 minute to the tilt function for sunrise/sunset to open/close. With that at least the vertical position is working. The tilt will open/close delayed after manual overwrite time. But this only works during winter mode. In summer mode it may always trigger the manual overwrite during changes of vertical/tilt.

The only solution (besides completly disabling overwrite) to get this work might be a combined version of vertical/tilt.

geryyyyyy avatar Mar 26 '25 17:03 geryyyyyy