Garage Doors, again

A plugin to integration Indigo devices into HomeKit (and Siri)
User avatar
berkinet
Posts: 3441
Joined: Tue Nov 18, 2008 2:08 pm
Location: Berkeley, CA, USA & Mougins, France

Re: Garage Doors, again

Post by berkinet »

papamac wrote: Fri Jan 02, 2026 12:40 am ...
To use VGD, you need an activation relay, a closed sensor, and an open sensor (see the wiki for details). The activation relay can simply be an Indigo virtual on/off device that executes your activation code form the START action group when the device is turned on and simply resets the onOffState when it is turned off. Ideally, the closed and open sensors could be digital input devices using signals obtained directly from the gate limit switches. This is your best option. If this is difficult as I imagine it might be, you can define two additional Indigo virtual on/off devices and turn these on or off based on your current algorithm for monitoring the warning light. Without more details on the START action group code, I can't propose a specific way of doing this, but I believe that it is possible to create virtual closed and open sensor devices using your existing logic.
So... Rather than deal with the inverse settings, I have created a second, duplicate, virtual device. VD 1 is used for the Open season, and VD 2 is used for the Closed sensor: on = open and off = closed. Then, I modified my tracking code to only provide open and closed states (no opening or closing). However, I have run into 2 problems. One easily fixable, the other more difficult[list[1]The gate actually takes 33 seconds to open, so after the travel timeout, the VGD state changed to stopped/obstructed.
I fixed this temporarily by modifying the plug-in to allow for a timeout of up to 40 seconds.
[1]This one is more difficult. The gate state transition does not seem to match the VGD logic. Here is the current state series
1. CLOSED -> closed [off]
2. START/OPENING -> opening [off/error]
3. OPEN -> open [on]
4. CLOSING -> closing [on/error
5. CLOSED -> closed [off]
VGD misses the closing state and remains open until the closed state is reached.

BTW, I tried an experiment. I created an X10 dimmer device in indigo and published it in HKLS, using brightnessLevel as the device state to track in HKLS. This let me set the brightness to the values [0-4] covered by the enumeration for a HomeKit Garage Door. However, the brightness values were not recognized, although the on/off state was, even if HKLS was set to use brightnessLevel
User avatar
berkinet
Posts: 3441
Joined: Tue Nov 18, 2008 2:08 pm
Location: Berkeley, CA, USA & Mougins, France

Re: Garage Doors, again

Post by berkinet »

Solution found. I just wrote a custom plugin. Well, actually, I tried something new, I had ChatGPT write the plugin. It was probably a little slower than If I had done it by hand, but it was an interesting experiment, and it works. The Home app perfectly tracks the actual current state of the gate and can also initiate a start.

Thanks to all for suggestions and advice. And, if you'd like a copy of the plugin, PM me.
Post Reply

Return to “HomeKitLink Siri”