tonesto7 / homebridge-hubitat-tonesto7

Hubitat Homebridge Plugin
107 stars 34 forks source link

Garage Door Opening does not fire off notification on V 2.90 and greater #203

Closed speedracercjr closed 1 year ago

speedracercjr commented 1 year ago

About Your Setup

Expected Behavior

On Homebridge version 2.8.3 or earlier I was getting notifications via the Home app on my iPhone of the garage door opening or closing. With version 2.90, 2.91 & 2,92 those notification no longer seem to work. If I install back to 2.8.3 on Homebridge everything works fine again.

Current Behavior

While the garage doors do open if I use the Home app on my iPhone no notification shows up of the open or closed status.

Steps to Reproduce (for bugs)

  1. Open or Close the garage either via a physical button, or via the Home app on the iPhone
  2. No notification shows up

{ "name": "Big Garage Door", "basename": "Big Garage Door", "deviceid": "696", "status": "ACTIVE", "manufacturer": "Unknown", "model": "Zooz Garage Door", "deviceNetworkId": "747-door", "lastActivity": "2023-09-09T20:14:27+0000", "capabilities": [ "Actuator", "ContactSensor", "DoorControl", "GarageDoorControl", "Refresh", "Sensor" ], "capabilities_processed": { "Actuator": 1, "ContactSensor": 1, "DoorControl": 1, "GarageDoorControl": 1, "Refresh": 1, "Sensor": 1 }, "capabilities_filtered": [

],
"commands": [
    "close",
    "open",
    "refresh"
],
"commands_processed": {
    "close": 1,
    "open": 1
},
"commands_filtered": [
    "refresh"
],
"customflags": {

},
"attributes": {
    "contact": "closed",
    "door": "closed"
},
"attributes_processed": {
    "contact": "closed",
    "door": "closed"
},
"attributes_filtered": [

],
"eventHistory": [
    "2023-09-09 15:14:27.361 | [contact] | (closed)",
    "2023-09-09 15:14:27.355 | [door] | (closed)",
    "2023-09-09 15:14:17.08 | [door] | (closing)",
    "2023-09-09 15:12:48.169 | [contact] | (open)",
    "2023-09-09 15:12:48.161 | [door] | (open)",
    "2023-09-09 15:12:32.914 | [command-open] | (null)",
    "2023-09-09 15:12:32.815 | [door] | (opening)",
    "2023-09-09 15:12:23.831 | [contact] | (closed)",
    "2023-09-09 15:12:23.826 | [door] | (closed)",
    "2023-09-09 15:12:13.327 | [command-close] | (null)",
    "2023-09-09 15:12:13.248 | [door] | (closing)",
    "2023-09-09 15:11:55.407 | [contact] | (open)",
    "2023-09-09 15:11:55.401 | [door] | (open)",
    "2023-09-09 15:11:39.999 | [command-open] | (null)",
    "2023-09-09 15:11:39.695 | [door] | (opening)",
    "2023-09-09 15:00:59.991 | [contact] | (closed)",
    "2023-09-09 15:00:59.985 | [door] | (closed)",
    "2023-09-09 15:00:49.696 | [door] | (closing)",
    "2023-09-09 14:59:06.588 | [contact] | (open)",
    "2023-09-09 14:59:06.582 | [door] | (open)"
]

}

ZeroBright commented 1 year ago

Noticed the same behavior for any lock / garage as well. Works one time after a restart then does not provide notifications or updates. Restoring to 2.8.3 returns to normal

champley38 commented 1 year ago

I am also having this issue but it is extended to devices that are manually updated. If I turn a switch on manually it reflects in homebridge but not in homekit. Rolling back to 2.8.3 resolved my issues.

evlnte commented 1 year ago

I am also experiencing significant delays in HomeKit for Lock and Open-close Sensor events logged accurately in Hubitat. The logs shows precisely when the event trigger occurs, but the Homekit notification can occur minutes to as much as 10+ minutes later than the actual event was logged in Hubitat.

tonesto7 commented 1 year ago

Thanks for sharing this! Sorry I haven't replied sooner. I will review the changes I made between 2.8.3 and the latest release and provide a fix.

I worry though that the issue might be with recent changes in HomeKit which will require Apple update to fix

tonesto7 commented 1 year ago

I am also experiencing significant delays in HomeKit for Lock and Open-close Sensor events logged accurately in Hubitat. The logs shows precisely when the event trigger occurs, but the Homekit notification can occur minutes to as much as 10+ minutes later than the actual event was logged in Hubitat.

I have been noticing this lately with many notifications (not just HomeKit)

tonesto7 commented 1 year ago

I've reviewed the code, and I didn't change anything that would affect you... I honestly think this is a HomeKit issue (locally) Not sure what homekit hub devices (apple tv's, homepods) you have but it might be a good idea to reboot all of them

I have been getting my garage door notifications and many others for windows, etc. In fact the last couple of days my notifications have stopped being delayed.

speedracercjr commented 1 year ago

Will give that a spin, everything is getting updated with the new OS's that came out. Will report back with hopefully better results.

jtp10181 commented 1 year ago

This is happening for multiple people as posted in the forums. Here is the errors from my Homebridge logs below. My Forums post: https://community.hubitat.com/t/release-homebridge-hubitat-v2-0/54056/1213?u=jtp10181

Seems like the same issue for everyone and has occurred since the 2.9.x updates as OP stated.

change: {
  deviceid: '334',
  attribute: 'door',
  value: 'opening',
  data: null,
  date: '2023-09-19T19:12:01+0000'
}
char:  {
  format: 'uint8',
  perms: [ 'ev', 'pr' ],
  minValue: 0,
  maxValue: 4,
  minStep: 1,
  validValues: [ 0, 1, 2, 3, 4 ]
}
[9/19/2023, 2:12:00 PM] [Hubitat-v2] [Garage Door] Attribute (door) | OldValue: closed | NewValueIn: [opening] | NewValueOut: [undefined] | Characteristic: (Current Door State
[9/19/2023, 2:12:00 PM] [Hubitat-v2] [Device Event]: (Garage Door) [DOOR] is opening
[9/19/2023, 2:12:14 PM] [Hubitat-v2] [Device Event]: (Garage Door) [DOOR] is open
[9/19/2023, 2:12:14 PM] [Hubitat-v2] [Device Event]: (Garage Door) [CONTACT] is open
[9/19/2023, 2:12:34 PM] [Hubitat-v2] [Device Event]: (Family Room Sensor) [MOTION] is inactive
change: {
  deviceid: '334',
  attribute: 'door',
  value: 'closing',
  data: null,
  date: '2023-09-19T19:12:36+0000'
}
char:  {
  format: 'uint8',
  perms: [ 'ev', 'pr' ],
  minValue: 0,
  maxValue: 4,
  minStep: 1,
  validValues: [ 0, 1, 2, 3, 4 ]
}
[9/19/2023, 2:12:35 PM] [Hubitat-v2] [Garage Door] Attribute (door) | OldValue: open | NewValueIn: [closing] | NewValueOut: [undefined] | Characteristic: (Current Door State
[9/19/2023, 2:12:35 PM] [Hubitat-v2] [Device Event]: (Garage Door) [DOOR] is closing
[9/19/2023, 2:12:38 PM] [Hubitat-v2] Error getting value for Characteristic [Current Door State] Using Attribute (door) for Garage Door (Garage Door)
[9/19/2023, 2:12:38 PM] [homebridge-hubitat-tonesto7] This plugin generated a warning from the characteristic 'Current Door State': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.
tonesto7 commented 1 year ago

I promise to set aside time tomorrow to investigate this

jtp10181 commented 1 year ago

No problem, it is not super urgent for me, I just wanted to point out that I think it has to do with the 2.9.0 update since multiple people all started having this issue recently, AND there seems to be errors in the log that only appear when I open and close my garage door. I think I speak for everyone when I say we appreciate this awesome app and plugin you have provided FOR FREE and understand bugs happen from time to time! Hope everyone raising concerns has at least donated something once.

tonesto7 commented 1 year ago

Please test the new plugin version 2.8.3 and let me know

jtp10181 commented 1 year ago

https://github.com/tonesto7/homebridge-hubitat-tonesto7/commit/d2f3e46c546038163ba14368a9e66872f9344521 v2.9.3 of the HB plugin did the trick for me. Thanks! Working as expected again.

evlnte commented 1 year ago

I am not seeing an improvement on the status changes from Hubitat. While I see the changes occur in Hubitat, door open/close changes take several minutes to appear in Home app; if at all. Updating to iOS 17 had no effect. For example, I opened my front door at 10:27:29 AM and closed it at 10:27:36 as shown in Hubitat log. I received the Homekit notification that it closed at 10:43 am. Never received notification that it opened.

tonesto7 commented 1 year ago

I just pushed out another app and plugin and was able to duplicate the issue you guys were seeing... It should be fixed now with v2.9.4 of the plugin

evlnte commented 1 year ago

I just pushed out another app and plugin and was able to duplicate the issue you guys were seeing... It should be fixed now with v2.9.4 of the plugin

Thank you for excellent support! Issue resolved.

speedracercjr commented 1 year ago

Thanks @tonesto7 for the quick fix, confirmed the updates fixed the issue!