Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retries if blind position is not correct? #313

Open
3 tasks done
MRobi1 opened this issue Oct 4, 2024 · 2 comments
Open
3 tasks done

Retries if blind position is not correct? #313

MRobi1 opened this issue Oct 4, 2024 · 2 comments

Comments

@MRobi1
Copy link

MRobi1 commented Oct 4, 2024

Checklist

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

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

Not related to a problem

Describe the solution you'd like

Does the integration implement any sort of retry if the blind does not respond to the initial request?

Describe alternatives you've considered

None

Additional context

Initially I thought this issue was primarily due to manual override, but I've since disabled that completely.
I'm finding several times that I'll have sun very obviously coming in through the windows. I'll check the integration and it will say the blind level is set to something like 18%, but my row of 9 windows will all have the blinds open. I'm not entirely sure why because the blinds respond perfectly to manual controls and have responded perfectly to my manual automation I had running for approximately a year now.

Here's an example from as I'm writing this. Integration shows side door blind should be open to 99%.
image

But the blind state is currently closed in Zigbee2MQTT
image

Does the integration do any sort of logic to ensure the blinds have responded to the request? Maybe after X seconds to account for transition check the blind position vs the calculated position and re-send the command to reposition the blinds if it is not correct?

@MRobi1
Copy link
Author

MRobi1 commented Oct 4, 2024

Some initial testing....

  • I set the minimum interval between position changes to 5 mins.
  • Triggerred the presence entity to cause the blinds to change to the closed position.
  • Let the presence entity expire which caused the position entity to go back to an open position, which as-expected did not send a command to the blinds to change position because of the 5 minute interval set.
  • Let the 5 minutes expire and watched Z2M logs. No command was sent to the blinds after the 5 minutes expired to change to the proper position.
  • Let it sit for 5 more minutes, no change.

So I guess this is a 2 part FR.
1: After a position change, verify the position with the blind and resend command if not in the correct position. This could even be done with a time setting where the user could input the # of seconds for the blind to fully open/close.
2: After the minimum interval expires, check if there was a position change which may have been triggered by the presence entity and send command to set blinds to proper level.

@basbruss
Copy link
Owner

basbruss commented Oct 4, 2024

Hi @MRobi1,

Should we first start by debugging why your blinds aren't reaching the calculated position?

1: After a position change, verify the position with the blind and resend command if not in the correct position. This could even be done with a time setting where the user could input the # of seconds for the blind to fully open/close.

This is actually already in the code. After a command is sent, it waits for a state event that confirms whether the blinds are in the correct position and reports that internally.

However, the minimum time interval works a bit differently than you described. The code records the timestamp of the last state event and sets a virtual timer based on the user's x-minute setting. During this timer, it recalculates based on updates from the sun's position, but it doesn’t send a new command to the blinds. Once the timer ends, it waits for the next update from the sun's position before sending another command. So, the interval between commands is at least x minutes, but usually longer since the sun's updates come at different intervals depending on the time of day.

To debug this, you should enable debug logging from the integrations menu and let it run for several minutes. It will track the steps the code goes through and report whether the blinds reached the desired position. Additionally, you can share the diagnostics, which show the settings you've configured in the integration options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants