Page 1 of 2

Garagedoor shows open in Homekit when it is closed...

PostPosted: Mon Jun 13, 2022 5:44 am
by PeteVis
Thanks for making this plugin, it's much more elegant than previous attempts I tried to integrate with Homekit... but I'm stumbling on a small issue.

I have added my garagedoor opener (which is a simple relay controlled by a Raspberry), and while it works, the status in Homekit is inverted from what I see insided Indigo.

The device in Indigo is a virtual device that uses a variable for it's status. GateOpen = yes and GateOpen = no
Should I perhaps use true and false instead (does that even matter) ?

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Mon Jun 13, 2022 7:34 am
by FlyingDiver
You need to invert your Indigo status states. For those kinds of devices, True is closed and False is open. Rename your variable to "GateClosed". :)

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Mon Jun 13, 2022 3:20 pm
by GlennNZ
Hi

Ditto Joe above.

That is the easier way - or create a new device with Masquerade plugin (for example) and invert states.

There was a request to allow inversion of garage door states (like we do for blinds as a selector in the plugin). To my mind its a extra complication, to a problem which is best solved elsewhere — may revisit this option if more straightforward than I recall.


Sent from my iPad using Tapatalk

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Wed Jun 15, 2022 1:11 am
by PeteVis
Thanks for the tip.. I'll rename my variable to GateClosed then...

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Fri Jun 24, 2022 12:37 pm
by jltnol
So one thing I love about Indigo is there is usually more than one way to accomplish a task. What may be easy, efficient, and obvious to you, may not be the same for all. In the previous plugin, I basically created a "ghost" x-10 device, and as the garage door opened, a trigger would turn my ghost switch on, and vice versa. My "ghost" device was what I populated into Home, but thru the plugin, was able to invert the state. If HOME turned on the switch, it would open the door, and if something else opened the door, that would turn on the ghost switch, and change the state in HOME. May not have been the most efficient way to get this to work, but I understood the concept, and was able to put together a few very basic python scripts to make it all work, including building in some delays so the door would always complete opening or closing.

FF to the new plugin, and now my garage door shows Open when its closed, and vice versa.

It was pretty trivial to change the door trigger that changed my ghost X10 device to ON when closed, and OFF when open, and to change how the switch interacted with the garage door, basically flipping the on/off & open/ close commands.

Again, my not have been the most efficient way to do this, but I got it to work perfectly.

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Thu Jul 07, 2022 3:17 pm
by 7rdr7
Since Masquerade is only for sensors, does that mean that my only option to reverse the state of a garage door opener is to create a virtual switch and variable to track the garage door opener status?

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Thu Jul 07, 2022 3:22 pm
by FlyingDiver
7rdr7 wrote:
Since Masquerade is only for sensors, does that mean that my only option to reverse the state of a garage door opener is to create a virtual switch and variable to track the garage door opener status?


What's the source of the current door state?

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Thu Jul 07, 2022 3:40 pm
by 7rdr7
It’s an Aeotec Garage Door Controller x 3. I could invert with HKB, but as stated above that is not supported in HKL.

***Update***

Finished migrating to HKL from HKB. Garage Door invert workaround seems to be functioning. 143 HomeKit devices migrated.

Thanks again Glenn! Great replacement, and the response feels faster.

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Fri Aug 05, 2022 7:10 pm
by Monstergerm
I have a similar problem using the I/O linc garage door kit. I have a magnetic sensor that reports in Indigo device UI that the garage door is closed when it is indeed closed. The older HomeKitBridge plugin transferred this correctly to the Home app.

However, HomeKitLink Siri at first reports the status of the door to the Home app as OPEN although the door is closed. Once I go through a cycle of open and close the states are reported correctly in the Home app. Great!

But, here is the problem, as soon as I restart the HKL-S plugin or add a new device, things become reversed again (the closed door reports as open). So it looks like HKL-S plugin does not get the status of the open/close sensor of the I/O linc at startup.

Garagedoor shows open in Homekit when it is closed...

PostPosted: Fri Aug 05, 2022 10:18 pm
by GlennNZ
Monstergerm wrote:
I have a similar problem using the I/O linc garage door kit. I have a magnetic sensor that reports in Indigo device UI that the garage door is closed when it is indeed closed. The older HomeKitBridge plugin transferred this correctly to the Home app.

However, HomeKitLink Siri at first reports the status of the door to the Home app as OPEN although the door is closed. Once I go through a cycle of open and close the states are reported correctly in the Home app. Great!

But, here is the problem, as soon as I restart the HKL-S plugin or add a new device, things become reversed again (the closed door reports as open). So it looks like HKL-S plugin does not get the status of the open/close sensor of the I/O linc at startup.


Hi

What you are describing is somewhat different - and likely relates to the I/O linc garage door kit support.

The I/O Linc is a very odd & very old indigo device - until this plugin I didn’t realise it existed. Apparently there was plans to remove and convert it into one of the standard relay like devices - which are far more uniform in their support.

HKLS support of such - may have a issue as you describe, will relate to the ‘getter’ side of the code. I’ll check and update. Support was added blind as no example I/O linc devices are available - and as noted it will be a device that gets removed, still supported but converted to one of the more standard devices in the future it would seem.

Meanwhile or otherwise - could try converting/masquerading your current device as something more standard - relay for example and then add this relay-device as a garage door to HLKS. An extra device to smooth out this difference - and similar to what is needed if want to reverse logic. May not be possible given how unusual I/O linc is - but unsure of support across the various masquerade like plugins.

Update:
Try 0.3.14+ HKLS -- use the Green Download Code button on main page
A bit of a guess as to what you are seeing - but prioritises the binaryinput1 over the onOffState . I'm guessing the onOffState momentarily changes...

If no difference - need a debug log, with that device selected and a few on/off, open/close HK apps..

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Sat Aug 06, 2022 12:10 pm
by Monstergerm
Hi Glenn,

I installed v. 0.3.16 and it did not fix the issue.
But I found out part of the problem. I have 7 devices published to HomeKit: 4 actions, 1 light bulb dimmer device, 2 I/O Lincs.

The changes you made regarding binaryInput1 are going in the right direction but somehow the I/O lincs are not getting updated properly. At startup of the plugin, the def Plugin_getter_callback(self, accessoryself, statetoGet) routine only gets called for the light bulb device. Therefore, the plugin does not know about the state of the I/O Lincs.

When I open and close the garage door I still do not see a log entry for Plugin_getter_callback but the open/close states now report correctly.

To make things more complicated, the Input sensor logic can be reversed for legacy input (OFF is open, ON is closed). The garage door kit uses the legacy input logic.


Here are the properties/state for the I/O Linc

analogInputCount : 0
analogInputs : []
batteryLevel : None
binaryInputCount : 1
binaryInputs : [True]
binaryOutputCount : 1
binaryOutputs : [False]
buttonGroupCount : 1
configured : True
description : garage door sensor
deviceTypeId :
displayStateId : binaryOutputsAll
displayStateImageSel : PowerOff
displayStateValRaw : 0
displayStateValUi : 0
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 1247794882
globalProps : MetaProps : (dict)
com.GlennNZ.indigoplugin.HomeKitLink-Siri : (dict)
HomeKit_audioSelector : false (bool)
HomeKit_bridgeUniqueID : 175014 (integer)
HomeKit_deviceSubtype : GarageDoor (string)
HomeKit_inverseSelector : false (bool)
HomeKit_publishDevice : true (bool)
HomeKit_tempSelector : false (bool)
homekit-name : East Garage Door (string)
id : 1284197523
lastChanged : 2022-08-05 17:52:42
lastSuccessfulComm : 2022-08-05 17:52:42
model : I/O-Linc Controller
name : East Garage Door
ownerProps : emptyDict : (dict)
pluginId :
pluginProps : emptyDict : (dict)
protocol : Insteon
remoteDisplay : True
sensorInputCount : 0
sensorInputs : []
sharedProps : com.indigodomo.indigoserver : (dict)
states : States : (dict)
binaryInput1 : on (on/off bool)
binaryInput1.ui : closed (string)
binaryInputsAll : 1 (string)
binaryOutput1 : off (on/off bool)
binaryOutputsAll : 0 (string)
subModel :
subType :
supportsAllLightsOnOff : False
supportsAllOff : True
supportsStatusRequest : True
version : 65

Garagedoor shows open in Homekit when it is closed...

PostPosted: Sat Aug 06, 2022 4:14 pm
by GlennNZ
GlennNZ wrote:

The I/O Linc is a very odd & very old indigo device - until this plugin I didn’t realise it existed. Apparently there was plans to remove and convert it into one of the standard relay like devices - which are far more uniform in their support.

If no difference - need a debug log, with that device selected and a few on/off, open/close HK apps..


Hi

Need the log -describing it to me isn’t quite the same, it like describing the noise the car is making as to what the problem is!

Having said that standby.. can see the issue this device is being treated as an activate only device:
Have a try of 0.3.17

Thanks

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Sun Aug 07, 2022 12:58 pm
by Monstergerm
Great, the fix in 0.3.17 now correctly gets the state of the garage door at startup of plugin.

But opening and closing did not work properly. I made the following changes and this fixed it. Regardless of the open/close state the binaryOutput needs a ON signal (value=True) to operate the door.

Code: Select all
                    elif type(indigodevice) == indigo.MultiIODevice:
                        ## Insteon likely Garage Door device
                        ## How are we getter value
                        if "On" in valuetoSet:
                            if valuetoSet["On"] == 1:  ## This runs when garage door is open, i.e. binaryInput1 = off
                                self.logger.debug("I/O Device valuetoSet is 1")
                                indigo.iodevice.setBinaryOutput(accessoryself.indigodeviceid, index=0, value=True)
                            elif valuetoSet["On"] == 0:  ## This runs when garage door is closed, i.e. binaryInput1 = on
                                self.logger.debug("I/O Device valuetoSet is 0")
                                indigo.iodevice.setBinaryOutput(accessoryself.indigodeviceid, index=0, value=True)

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Sat Apr 22, 2023 11:55 am
by juntta
I'm in middle of process migrating to HKL and bumped into same issue: garage door been closed in Indigo but HKL shows its open. Are the Masquerade Plugin or creating virtual device only option with Aeotec Garage Door Controller (ZW062)? No invert option yet in HKL?

So far HKL has been massive progressive from HKB and I also have to thank Glenn for this great plugin :D

Re: Garagedoor shows open in Homekit when it is closed...

PostPosted: Sat Apr 22, 2023 12:41 pm
by Monstergerm
For me garage door sensor logic is working fine now with the the more recent upgrades to the plugin. But I am using Insteon I/O linc with a magnetic sensor to detect close/open. Indigo and HKL are in sync with this setup.