com.swttt.homekit
com.swttt.homekit copied to clipboard
Support Garage Door class
Hi!
Now that athom has added support for the garage door class (Homey v6.0.0), would it be possible to add that to the list of virtual devices?
I could try to make a pull request if you want.
Feel free to submit a PR :)
Hi, Looking for this as well! Appears that Carplay will show you a shortcut for your garage door once you get close to home and I would really like to give it a try. Unfortunately, the class still doesn't seem to be supported though.. 😔
@MrBlue90 I've added support for the garagedoor class in the current test version of the app: https://homey.app/a/com.swttt.homekit/test/
I can't test this myself because the Virtual Devices app doesn't support this device class, so please let me know if it works or not.
Awesome! The first test seems to be succesful! I created a virtual garage door with the Device Capabilities app. Still needs some tinkering, but at least it showed up on my Carplay dashboard. I'll let you know once I managed to get it to work completely!
@MrBlue90 I looked at the Device Capabilities app but I couldn't find how to add a capability (garagedoor_closed) to a device. How did you manage that?
This is what I have now:

However, once I open/close the virtual garage door, I get the following error in Apple Home:

I need to find a way to prevent this variable being set, maybe with a status?? https://developer.apple.com/documentation/homekit/hmcharacteristictypeobstructiondetected?language=swift
@MrBlue90 no, I just made a mistake 😅
Homey doesn't have a capability that correlates with the "obstruction detected" characteristic, so it should always return "false", but I mistakenly used the "is the door closed" capability instead. Will fix ASAP (and will try with the Device Capabilities app to create a similar virtual device so I can test it myself a bit better, too).
@MrBlue90 try the latest test version, it should be fixed now.
That worked! The virtual garage door is now opening/closing without the obstruction warning. Would you see a way where this functionality could actually be used? Maybe by checking a status or being set by a flow?
It can only work with a capability that would reflect the "obstructed" status, and because Homey doesn't have such a capability, it would need to be a custom capability too, which HomeyKit cannot handle.
So in short: it's not possible to use it 😕
Hmm.. Maybe your original line of thought wasn't so bad after all then. If your code would check for a specific type of status (sensor/contact alarm) for the obstruction, it's a capability that can be added easily with Device Capabilities. Thoughts?
I could possibly add support for the alarm_generic capability, since that's actually the best matching one in the list of supported capabilities.
Support for alarm_generic added in current test version.
Thanks! I'll test over the next days!
Hi Robert,
Quick update.
I added the generic alarm capability to my virtual garage door, but because of that, the Homeykit app doesn't seem to recognize the device anymore.
Any chance this is a unsupported combination in your code?
Thanks!

@MrBlue90 that looks very similar to what I've been testing with, and for me it's working fine.
Can you find the device on this page: https://tools.developer.homey.app/tools/devices
And then make a screenshot of the list of capabilities for the device. For me, they look like this:

(the "button" and "text" capabilities aren't relevant)
This was my original device:

Not sure where that measure status capability is coming from, so just in case, I created a new one:

Both don't show up in Homeykit.
That should work, not sure why it doesn't.
It's strange though that the Device Capabilities app adds a "sub capability" to mine (the .button1 and .boolean1 suffixes) and it doesn't for you.
I agree! Could you make some screenshots of the device settings? Maybe I'm able to locate a difference.
PS: For what it's worth, I'm using Device Capabilities v2.8.10
I'm using the same version, let me check if I can create the same device as you.
No, same subcapabilities:

These are the device settings I use:


It's appearing on iOS just fine:

So this is getting weird (and a bit frustrating..)
I tried all different combinations and even reinstalled both applications, but for some reason, none of the garage door devices will show up in Homeykit.
I even managed to get the exact same device as you:

Help? 😅
Are you sure you're using the test version of the app?
Okay, this is pretty awkward.. It seemed to reverted back to the production version instead. Please ignore my stupidity. I'll continue some testing for the next days.