indigodomo / HomeKit-Bridge

Enabled HomeKit integration via Homebridge for Indigo Home Automation
The Unlicense
46 stars 13 forks source link

Garage Door Showing Open but Closed #126

Closed ndejong5 closed 3 years ago

ndejong5 commented 5 years ago

Expected Behavior

Indigo Shows garage door is closed HomeKit should reflect.

Current Behavior

Indigo shows door closed but HomeKit shows open and vice versa.

Versions

1.0.2

Homebridge Log / Command Output

[2018-12-14 14:38:38] Homebridge is running on port 51826.
[2018-12-14 14:38:42] [HomeKit Bridge Server] Garage Door: get(CurrentDoorState) => 0
[2018-12-14 14:38:42] [HomeKit Bridge Server] Garage Door: get(TargetDoorState) => 0
[2018-12-14 14:38:42] [HomeKit Bridge Server] Garage Door: get(ObstructionDetected) => false
[2018-12-14 14:38:55] [HomeKit Bridge Server] Garage Coach Lights: get(On) => false

2018-12-14 14:53:29.735-25s [THREADDEBUG ] Plugin.ui                                      getCustomList                                  Generating custom list 'plugin' (filter: index=hkType, callback=onAfter_btnAdvDeviceAction_GetAttachedJSONDevices, ref=hideWrappedItems, nocache=true), typeId of advancedPluginActions, targetId of 0 and arguments: {u'ref': u'hideWrappedItems', u'nocache': u'true', u'callback': u'onAfter_btnAdvDeviceAction_GetAttachedJSONDevices'}
2018-12-14 14:53:29.737-25s [THREADDEBUG ] Plugin.ui                                      getCustomList                                  Generating custom list 'plugin' (filter: index=hkType, callback=serverListHomeKitDeviceTypes, ref=hideWrappedItems, nocache=true), typeId of advancedPluginActions, targetId of 0 and arguments: {u'ref': u'hideWrappedItems', u'nocache': u'true', u'callback': u'serverListHomeKitDeviceTypes'}

Device Simulation Report

2018-12-14 14:55:27.932-25s [THREADDEBUG ] Plugin.plug                                    advPluginDeviceSelected                        Advanced plugin menu validating a device was selected
2018-12-14 14:55:27.943-25s [THREADDEBUG ] Plugin.ui                                      getCustomList                                  Generating custom list 'plugin' (filter: index=hkType, callback=onAfter_btnAdvDeviceAction_GetAttachedJSONDevices, ref=hideWrappedItems, nocache=true), typeId of advancedPluginActions, targetId of 0 and arguments: {u'ref': u'hideWrappedItems', u'nocache': u'true', u'callback': u'onAfter_btnAdvDeviceAction_GetAttachedJSONDevices'}
2018-12-14 14:55:27.951-25s [THREADDEBUG ] Plugin.ui                                      getCustomList                                  Generating custom list 'plugin' (filter: index=hkType, callback=serverListHomeKitDeviceTypes, ref=hideWrappedItems, nocache=true), typeId of advancedPluginActions, targetId of 0 and arguments: {u'ref': u'hideWrappedItems', u'nocache': u'true', u'callback': u'serverListHomeKitDeviceTypes'}
2018-12-14 14:55:45.535-25s [THREADDEBUG ] Plugin.plug                                    btnAdvDeviceAction                             Advanced plugin menu performing 'simhomekit' on device 45905574
2018-12-14 14:55:45.540-25s [INFO        ] Plugin                                         onAfter_btnAdvPluginAction_Simulate            Simulating HomeKit values for Garage Door
2018-12-14 14:55:45.615-25s [THREADDEBUG ] Plugin.HomeKit.Service.GarageDoorOpener        detCharacteristicValues                        Adding ObstructionDetected attribute to Garage Door
2018-12-14 14:55:45.617-25s [THREADDEBUG ] Plugin.HomeKit.Service.GarageDoorOpener        detCharacteristicValues                        Adding TargetDoorState attribute to Garage Door
2018-12-14 14:55:45.618-25s [THREADDEBUG ] Plugin.HomeKit.Service.GarageDoorOpener        setAttributeValue                              Converting value type of bool to charateristic type of int for TargetDoorState
2018-12-14 14:55:45.620-25s [THREADDEBUG ] Plugin.HomeKit.Service.GarageDoorOpener        detCharacteristicValues                        Adding CurrentDoorState attribute to Garage Door
2018-12-14 14:55:45.621-25s [THREADDEBUG ] Plugin.HomeKit.Service.GarageDoorOpener        setAttributeValue                              Converting value type of bool to charateristic type of int for CurrentDoorState
2018-12-14 14:55:45.621-25s [THREADDEBUG ] Plugin.HomeKit.Service.GarageDoorOpener        calculateDefaultActionsForState                Not setting a default action for CurrentDoorState because that characteristic is read only
2018-12-14 14:55:45.622-25s [DEBUG       ] Plugin.HomeKit.Service.GarageDoorOpener        __init__                                       Garage Door started as a HomeKit Garage Door Opener
2018-12-14 14:55:45.628-25s [THREADDEBUG ] Plugin.ui                                      getCustomList                                  Generating custom list 'plugin' (filter: index=hkType, callback=onAfter_btnAdvDeviceAction_GetAttachedJSONDevices, ref=hideWrappedItems, nocache=true), typeId of advancedPluginActions, targetId of 0 and arguments: {u'ref': u'hideWrappedItems', u'nocache': u'true', u'callback': u'onAfter_btnAdvDeviceAction_GetAttachedJSONDevices'}
2018-12-14 14:55:45.635-25s [THREADDEBUG ] Plugin.ui                                      getCustomList                                  Generating custom list 'plugin' (filter: index=hkType, callback=serverListHomeKitDeviceTypes, ref=hideWrappedItems, nocache=true), typeId of advancedPluginActions, targetId of 0 and arguments: {u'ref': u'hideWrappedItems', u'nocache': u'true', u'callback': u'serverListHomeKitDeviceTypes'}
berkinet commented 5 years ago

My "garage door" is an Indigo Virtual Device with status controlled by a variable. (open or closed). I have observed the same issue, BUT, only on initial plugin startup. Once the virtual device state has changed to open and then back to closed, it tracks as expected. So, this would appear to be an startup issue -- the HomeKit device is not being properly initialized.

This may also be related to issue #122