homebridge-vera icon indicating copy to clipboard operation
homebridge-vera copied to clipboard

Support for Aeotec garage door controller

Open Knodd opened this issue 7 years ago • 7 comments

My garage door controller was showing as a switch (like in Vera) so to get it to show as a garage door in Home app I added a new device type called garageDoor based on the lock.js but used the get status and set target commands from switch. I also reversed the status since "on" is open in Vera and not "armed" as for locks.

Now my garage door operates and reports status (open/closed) perfectly, and Siri will open and close it if I say "Open the garage door" or "close the garage door"

Knodd avatar Nov 12 '17 22:11 Knodd

Really sorry if this was a bit messy, it's my first ever pull request :-)

Knodd avatar Nov 12 '17 22:11 Knodd

So quick question here: if it’s a controller and sensor could you start by installing the garage door plugin?

Unfortunately we probably want to resolve compound devices like this on Vera first.

It’ll also give you a fantastic fallback if Homebridge or HomeKit ever stop meeting your needs.

https://apps.mios.com/plugin.php?id=2998

drewcovi avatar Nov 12 '17 22:11 drewcovi

In Vera everything works great with no plugin needed. It has a toggle switch and garage door symbol and reports status. The problem is the main category is switch and subcategory is garage door and because of that Homebridge will see it as just a generic switch and give it a “light switch” symbol in the Apple Home app. If you want Siri to open it you will have to say “turn on garage door” which makes no sense. With this fix, it gets a garage door symbol, and shows a spinning wheel while closing until fully closed and door sensor reports closed. It then changes symbol to closed. It also responds to “open garage door” instead of “turn on garage door”.

There’s no need to fix this in Vera and sending users back to Vera to install plugins to get support in Homebridge seems a bit backwards to me. Adding this will give “out of the box” support for those who have an Aeotec garage door controller (or something similar) in Homebridge.

Knodd avatar Nov 13 '17 09:11 Knodd

I think @Knodd might be on to something here in that we should probably change the category and subcategory of the virtual devices that the Garage Door app creates and allow for this type handler to handle our virtual device. @Knodd's solution would offer up support for other "legitimate" garage doors. I'm giving it as spin to see if it works.

spacesuitdiver avatar Jan 10 '18 03:01 spacesuitdiver

I'm totally onboard with official device support... although now we have a few conflicts. But suffice to say I plan to look at the virtual garage door opener MiOS app to change its type and then use this addon.

drewcovi avatar Jan 23 '18 19:01 drewcovi

Hi, This is exactly what I'm looking for. My Aeotec shows up as a light bulb too and I would like it fixed. Just to clarify; the "Aeotec Garage Door Controller" is just a device in terms of Vera and Z-wave - not a 'real' controller. There is no App for this as it's just a normal z-wave device.

Everything is 100% correct in Vera when adding this device, it just needs the correct mapping over to HomeKit as suggested by @Knodd .

I don't know jack about development/programming but I can help with logs and whatever you guys need.

Thanks

mrkernels avatar Jan 26 '18 20:01 mrkernels

I have Successfully modified this code to have a working Garage door.

file-8 My garage device is a linear GD00Z-4 (Branded as Lowe's Iris), and such device works under Device type = 3 and Sub-Device ID = 5 (Unlike device 32 that @Knodd mentions here.

I have installed this version of Homebridge-vera over my NPM install, and modified functions.js. Specifically, Case 3 of the Devices Switch

This is my Modified code

`case 3: // Switch

                      HAPnode.debug('------ Adding a Switch device: %s', device.name + ' ID:' +device.id + 'Sub-Device ID: ' +device.subcategory);

                      if ((device !== null) && (device !== undefined) && (device.subcategory == 5)){

                         var GarageDoor            = require("./types/garage_door.js")(HAPnode,config,module);

                      HAPnode.debug('------ Garage Door Added: %s', device.name + ' ID:' +device.id);

                      accessories.push(GarageDoor.newDevice(device)); ;
                      } 
                   else {
                      var Switch = require("./types/switch.js")(HAPnode,config,module);

                      accessories.push(Switch.newDevice(device));

                      HAPnode.debug('------ Switch Added: %s', device.name + ' ID:' +device.id);

                        }  `

So far it works as intended.

Attached is my Functions.js (as a TXT) Please excuse me as I am not familiar with GitHub, or even complex Computer Programming; I've been more oriented to Devices programming and It has been a few years. Best Regards and thanks to all of those dedicated to make this project Happen.

RG

functions.txt

rkgeer avatar Jan 27 '19 01:01 rkgeer