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

Rework of door position sync #61

Merged
merged 13 commits into from
Oct 8, 2023
Merged

Rework of door position sync #61

merged 13 commits into from
Oct 8, 2023

Conversation

mariusmuja
Copy link
Collaborator

This updates the door position sync to make it simpler and hopefully more accurate.

The way we show the door position in HA is by "simulating it", because we don't have any position feedback from the door opener. Currently we simulate it and hope for the best, but for example if there's anything that prevents the open/close command to be received the simulation will not match reality.

This updates the simulation to make it slightly more realistic, instead to triggering it when we send the open/close command we trigger it when the opening/closing status message is received from the opener. Also we use the actual time in the update closure instead of the scheduled time.

components/ratgdo/ratgdo.cpp Outdated Show resolved Hide resolved
@bdraco
Copy link
Member

bdraco commented Oct 7, 2023

Looks good.

Testing shortly

…should get called when status message is received
@bdraco
Copy link
Member

bdraco commented Oct 8, 2023

Ran out of time to test today. Will try to pick it up tomorrow

Copy link
Member

@bdraco bdraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing looks great 👍

Nice cleanup 👍

@bdraco bdraco merged commit 575471b into main Oct 8, 2023
5 checks passed
@bdraco bdraco deleted the door_position_sync branch November 7, 2023 23:01
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

Successfully merging this pull request may close these issues.

2 participants