rainlake / homebridge-platform-myq

19 stars 6 forks source link

Incorrect "Opening" status #10

Open teraraid opened 7 years ago

teraraid commented 7 years ago

If accessory status is "Open" and door is closed outside of accessory, accessory status changes to "Opening..." and remains in that status indefinitely unless accessory tapped by user. At that point status immediately (and correctly) changes to "Closed".

rainlake commented 7 years ago

Thanks, I have noticed this recently and I'm investigating. Seems compatible issue with iOS 10.

On Sunday, October 9, 2016, teraraid notifications@github.com wrote:

If accessory status is "Open" and door is closed outside of accessory, accessory status changes to "Opening..." and remains in that status indefinitely unless accessory tapped by user. At that point status immediately (and correctly) changes to "Closed".

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rainlake/homebridge-platform-myq/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYg3UM8Vxu3dtvEEAvIFez2TGsPqpFDks5qyYGngaJpZM4KSJ9R .

bobobox commented 7 years ago

I've been seeing this too... any updates on that?

Thanks for the great plugin btw.

rainlake commented 7 years ago

I think it's a bug in either home bridge based HAP-Node. Or HomeKit itself. Opening or closing is treated wrong. I think we should disable these two status since HomeKit never show them. It's either open or close. Thanks and happy holidays. On Thu, Dec 8, 2016 at 10:57 PM Robin Miller notifications@github.com wrote:

I've been seeing this too... any updates on that?

Thanks for the great plugin btw.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/rainlake/homebridge-platform-myq/issues/10#issuecomment-265927728, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYg3d05smqzndDpngpoX2L8K7ZmghOmks5rGNGrgaJpZM4KSJ9R .

ctgreybeard commented 5 years ago

Let me jump in here on this old issue. Today I noticed that one of garage doors was “opening...” but ONLY in the Home app. Three other apps (Eve, Home 3, and the MyQ app) all show “Closed” and visual inspection shows it is closed. Once I tapped the icon in Home it changed to “Closed”. I suspect Apple won’t be interested as this isn’t “blessed” but I think it’s an issue on their end for this one ...

dbavatar commented 5 years ago

I debugged this for a while. This is NOT an Apple bug.

This happens because when the door is operated remotely, targetState is not updated. If currentState != targetState, then Apple will display opening or closing. If you tap the icon in app, it does setDoorState(), at the top of which this plugin assigns targetState, and now it's happy again.

Still trying to navigate javascript myself here, the mix of classes and functional style are making my intended improvements difficult. For example, the additional refresh in updateDoorState() does nothing at all. It would seem to fullfill the intent, you'd have to run MyQPlatform.prototype.deviceStateTimer faster, but you cannot do this from here without writing some boilerplate to plumb through the classes I haven't figured out yet. The same goes for using the pull event from homekit to poll MyQ directly (within some minimum interval to not slam the server), instead of getting stale status. I may try to rewrite it to be flatter, smaller, and more logical so it's clear what it's doing all the time.