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

feat: add support for disabling the obstruction pin #39

Merged
merged 17 commits into from
Aug 26, 2023
Merged

feat: add support for disabling the obstruction pin #39

merged 17 commits into from
Aug 26, 2023

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Aug 24, 2023

Fall back to reading the obstruction state if the obstruction pin is disabled.

This is a subpar experience currently but better than nothing.

@mariusmuja
Copy link
Collaborator

I implemented support for no obstruction pin at one point and the issue I was having was that there was not status message reliably sent when the instruction was cleared, so I had to ask for a status message in that case. Also there are two bits involved in reporting the obstruction, one gets cleared when an obstruction is present (byte1 - bit 6 - maybe a motor enabled bit?) and one gets set (byte2 - bit 2, obstruction detected bit?). Sometimes a status message with the motor enabled bit set is sent, but no obstruction clear bit is sent.

See here the branch with these changes: ESPHome-RATGDO@f0b8380#diff-8ec49aa77fc5c9af707edd16a08e03e3673aa20fc288a014c9d117f0edc5c2a3R159

@bdraco
Copy link
Member Author

bdraco commented Aug 24, 2023

I implemented support for no obstruction pin at one point and the issue I was having was that there was not status message reliably sent when the instruction was cleared, so I had to ask for a status message in that case. Also there are two bits involved in reporting the obstruction, one gets cleared when an obstruction is present (byte1 - bit 6 - maybe a motor enabled bit?) and one gets set (byte2 - bit 2, obstruction detected bit?). Sometimes a status message with the motor enabled bit set is sent, but no obstruction clear bit is sent.

I found bit 6 is reliable (its a bit delayed) when the door is open but not when the door is closed

@mariusmuja
Copy link
Collaborator

I found bit 6 is reliable (its a bit delayed) when the door is open but not when the door is closed

Nice. I don't remember for sure, but it is quite possible I was testing with the door closed (but with the opener light on, otherwise the obstruction sensors go into sleep mode).

base.yaml Outdated Show resolved Hide resolved
@bdraco bdraco marked this pull request as ready for review August 24, 2023 23:12
@bdraco bdraco merged commit a1b166e into main Aug 26, 2023
4 checks passed
@bdraco bdraco deleted the no_obst branch August 26, 2023 13:11
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