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

Fix for Open/Close Door Status Bug #12

Merged
merged 1 commit into from
Oct 4, 2016
Merged

Conversation

u2jrmw
Copy link
Contributor

@u2jrmw u2jrmw commented Feb 5, 2016

For my specific setup (Chamberlain opener with separate MyQ hub), the Open/Close status of the door would always return closed. I narrowed it down to a "break" command that was exiting the loop through the attributes that in my data set had not yet reached the "doorstate" attribute. This was forcing my door to always assume the default status of 2 which is closed. By removing the break, the code now correctly returns my status.

Maybe on other configurations door status always comes before "desc", but not for me.

I assume the break was entered for efficiency, but it was simply occurring too soon for my setup.

For my specific setup (Chamberlain opener with separate MyQ hub), the Open/Close status of the door would always return closed. I narrowed it down to a "break" command that was exiting the loop through the attributes that in my data set had not yet reach the "doorstate" attribute. This was forcing my door to always assume the default status of 2 which is closed. By removing the break, the code now correctly returns my status.

I assume the break was entered for efficiency, but it was simply occurring too soon for my setup.
@@ -115,7 +115,6 @@ LiftMasterAccessory.prototype = {
var thisAttributeSet = device.Attributes[j];
if (thisAttributeSet.AttributeDisplayName == "desc") {
thisDoorName = thisAttributeSet.Value;
break;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This break seems to assume that the "doorstate" attribute will have already been iterated through. In my case "doorstate" is later in the list and therefore breaking at this point means "doorstate" never gets set. Hence the removal of the break.

@bobobox
Copy link

bobobox commented Jun 24, 2016

Would like to see this fix merged in...

@jstevison
Copy link

This happens to me as well

@caseywebdev
Copy link

caseywebdev commented Sep 14, 2016

I can confirm this fixes the open/closed status issue. I suspect homebridge traffic will increase now that iOS 10 with the Home app is out and it'd be nice to have an official release with this fix.

Also, this fixes #11.

@AppleTechy
Copy link
Collaborator

Hmm. I don't have this issue. I have chamberlain garage door with the separate MYQ hub. Would you being willing to give my fork a try? The code got reworked but has only worked to varying degrees for certain people.

@AppleTechy AppleTechy merged commit 6617056 into nfarina:master Oct 4, 2016
@nfarina
Copy link
Owner

nfarina commented Oct 13, 2016

Published!

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.

6 participants