-
Notifications
You must be signed in to change notification settings - Fork 132
Dry Contact Limit sensor improvements #398
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
base: main
Are you sure you want to change the base?
Conversation
fda9849
to
a4d84d1
Compare
Hm, sometimes the door can still report CLOSED state if interrupted several times and left halfway mid-close (obstruction sensors, wall button, etc). This is with both sensors off It probably shouldn't report a definite CLOSED unless the limit sensor is engaged, need to find out where it is being set (I think a timeout is). |
The original idea was that a discrete This is a trade off, but the expectation is that a partially opened door combined with a ratgdo reboot should be a very rare situation. |
Hm, I'm not 100% certain, but this doesn't seem to be working as intended in current main:
With this patch the discrete operations are properly declined by the device when at their limit. I'll test a bit more though. I also took a look last night at modeling We can also use this MR to address the interrupt/obstruction enhancements noted at #344. I'm not sure right away if my obstruction sensors have the low pulse state, but I see where it's defined in the code so I should be able to follow along. Semi off-topic, but I had enough reed switches and snap clips left over from the project to set up a smaller harness at my desk. Now I can test these changes without wearing my GDO motor out 😁 |
A toggle command is used if no obstruction sensors are detected. Most ROW Sec+ 2 openers don't actually have obstruction sensors, and as such they ignore the discrete close command, but accept a toggle command. For that reason the firmware detects if sensors are present, and if not, it issues a toggle instead of a close. I have to check but its possible that's causing this behavior in the dry contact firmware. We might have to put a check on the protocol before using toggle in lieu of close when no sensors are attached. |
I noticed that behavior when testing away from the actual motor unit (with no obstruction sensors). This remap does properly resolve when the obstruction sensors are present, the controller processes a discrete If it's being incorrectly called while intended for Sec+ 2 though, then perhaps it should be put behind a protocol check, but I noticed those are sparsely used, if at all in the main For full context, my GDO is a Sommer Synoris Direct Drive 550 (1042v004), single-button. The ratgdo has no trouble interfacing with it and detecting obstruction state 👍 |
Circling back here, the other dry-contact patches I've drafted are based off this core adjustment to the limit sensor reporting, it should be ready to go on it's own.
I double-checked and can confirm that It may still be best to make a protocol distinction rather than checking for existence of a common sensor across protocols, but I don't think it's related to this one, as the correct door action is returned. We can fold that into the PR for the Obstruction sensor improvements. Also, I only see the preprocessor Even with the protocol distinction made for obstruction sensors, these changes to drycontact's limit sensors will:
All ears for suggestions and feedback! |
819af20
to
477d22c
Compare
Hey @bdraco, I noticed the rebase from main, went ahead and squashed the commits here. Thanks! |
a0ea51c
to
3ae648b
Compare
Branches and forks now actually test correctly on the CI. You should be able to update this PR now and the CI will actually test it |
Thanks yes! It looks like now that it's properly testing the branch, it's failing due to the recent optimizations. Will re-visit, thanks again for fixing the tests |
ab93124
to
cdbcf8a
Compare
Set door position when limit sensors are triggered
cdbcf8a
to
8fddca0
Compare
All dry-contact setups require two limit switches for the open+closed positions. We can utilize these sensors for additional checks and awareness, especially with the OPEN status potentially representing a partially-opened state.
The existing checks for the open+closed state in
dry_contact.cpp
are updated to check the sensors before ignoring the open/close command.The limit sensor methods in
ratgdo.cpp
are updated to manually set the door position for the cover once triggered.Opening
state.drycontact::sync
, for testing i've set them in the main routine. The sensors and door state could potentially be tracked there more efficiently.Prerequisite for:
#396
#401