homebridge-hubitat-tonesto7 icon indicating copy to clipboard operation
homebridge-hubitat-tonesto7 copied to clipboard

(BUG) VERY long delays in notifications for lock/unlock of locks attached to Hubitat

Open mschwartz opened this issue 2 years ago • 10 comments

Verify the following before opening an trouble issue

Go over all the following points, and put an x in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!

  • [ x] That OAuth is Enabled for the Hubitat App under the Homebridge v2 App under App Code.
  • [ x] The Hubitat App and Homebridge Plugin are updated to the latest code available.

About Your Setup

  • How many devices are detected?: Many, 35-50 or so
  • Hubitat App Version: Latest
  • Homebridge Plugin Version: Latest
  • Homebridge Version: Latest
  • NodeJS Version: 18

Expected Behavior

Tell us what you think should be happening

When I lock/unlock a lock, I should see notifications from the home app everywhere appropriate.

Current Behavior

What happens instead of the expected behavior?

When I lock/unlock a lock, I see notifications from the home app as long as an hour later.

Steps to Reproduce (for bugs)

Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant

  1. Lock or unlock the lock
  2. Wait for notification on iPhone, iPad, Watch, or Apple TV

Context

How has this issue affected you? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world

Obviously, if you want to have some rule depend on the lock being locked/unlocked, up to an hour delay is not acceptable/workable.

I have been using homebridge and this plugin for years and the problem has persisted over all that time.


Please include a copy of any relevant log output to assist in tracking down the bug

mschwartz avatar Nov 03 '23 18:11 mschwartz

I want to be clear that this is a wonderful project. Thanks!

mschwartz avatar Nov 03 '23 18:11 mschwartz

There are 2 causes for this:

  • The hubitat app can't send events to the homebridge-hubitat plugin because of firewall or configured port is in use or blocked.
  • One of the home hubs used by HomeKit is acting up. I sometimes need to block the device or reboot the appletv or HomePod.

tonesto7 avatar Nov 03 '23 19:11 tonesto7

Thanks for your reply.  I am getting all sorts of opted-in notifications for other devices.  It’s just the locks that have the issue.

I have seen the issue for years. I don’t think I’ve ever seen the “unlock” or “lock” notification within even a minute.

Call it 2 years+.

I have no firewalls configured anywhere.

I do have multiple iPod minis and a few Apple TVs.

EDIT:

Consider with the Ring plugin, the doorbell rings and I see the Ring camera video playing live on the TV connected to the Apple TV (picture in picture) within 5 seconds.

mschwartz avatar Nov 03 '23 19:11 mschwartz

I'm not sure then. All of that is handled outside of Homebridge. I would still try power cycling all of your HomeKit hubs (AppleTVs and HomePods)

tonesto7 avatar Nov 03 '23 19:11 tonesto7

I had to reboot them all to install updates in the past 2 years…

I can see from the Maker API that the lock is immediately locked.

It’s something between the fact it locked and getting that information to HomeKit in a timely manner that seems busted.

Again, thanks for your reply.

(I can’t imagine I’m the only one seeing the issue…)

mschwartz avatar Nov 03 '23 19:11 mschwartz

Some more details.

If I lock a lock in the Home App (which I never do….), I see a spinner/busy icon, even though the lock has changed from unlocked to locked. I got bored waiting for the spinner to go away :)

image

mschwartz avatar Nov 03 '23 19:11 mschwartz

Watch the homebridge logs in the homebridge web interface. When the lock is locked if you don't see the lock event shown then the hubitat hub can't send events to the homebridge plugin.

tonesto7 avatar Nov 05 '23 19:11 tonesto7

I’m not sure, but why do the switches, dimmers, and fan controls connected to the Hubitat show immediate status change in the home app if I turn them on/off in the Hubitat UI? Seems like those are being communicated to Homebridge.

The locks state changes do show up in Home app but many minutes or an hour+ later.

locks are a special thing. The native HomeKit support by Hubitat doesn’t support locks, AFAIK.

but somehow the data are getting to HomeKit / HomeBridge…

mschwartz avatar Nov 05 '23 20:11 mschwartz

Maybe this is useful, too. The HomeBridge Ring plugin works immediately. I have 2 cameras and a doorbell. When there’s motion or doorbell pressed, I see picture in picture of the camera or doorbell immediately on the Apple TV…

mschwartz avatar Nov 05 '23 20:11 mschwartz

Has anyone that was seeing this issue figured out how to resolve it? I am seeing same thing, using Schlage lock with Reliable Locks plugin. I can confirm that there is not a communication issue between Hubitat and Homebridge, using the "Test Communication with Plugin" works fine, and I see the test request in Homebridge console. However, looking at "View Command and Event History" in plugin, I see that there are (0) events sent to Homebridge for the lock. It appears that it is not sending status update, and that the status only gets updated on the hourly interval that Homebridge polls Huibtat. Screenshot attached.. hubitat1

bigeazy000 avatar Dec 30 '23 22:12 bigeazy000

This issue has been marked stale automatically after no activity for the last 180 days.

github-actions[bot] avatar Jun 28 '24 08:06 github-actions[bot]