Garage door opener

I have an electric "garage door", but it's not an "overhead" door that opens upwards, as seems to be common in the US. This is a motorized sliding gate. It can be told to open fully for a car to cross, or stopped anywhere in the middle, for example for a person to go out.


I want to make a HomeKit bridge for it, and looking at the non-commercial HAP spec, I'm struggling to see how it fits into the predefined HomeKit services.


The "Garage Door Opener" service has a "Current door state" characteristic, which can report the door is open, closed, opening, closing, or stopped while not fully open or closed. This seems great for my use case. However, the "Target door state" characteristic can only be used to "open" or "close". This is more problematic; I don't see a way to tell it to stop it while it's moving, before it reached the end state.


In the "Door" service, there is a "Hold Position" optional characteristic, which "causes the service such as door or window covering to stop at its current position". That, too, sounds great for me. However, the Door service has required "Current Position" and "Target Position" characteristics, but I can't know what's the exact position of the gate, and I can't tell the gate to move from its current position to another exact one, I can only tell it to "open" or "close". So it seems the "Door" service is unsuitable for this kind of electric gate.


What's the appropriate configuration for this? Can I use the Hold Position characteristic in the Garage Door Opener service? Does the Home app support it? Or should I use the Door service?

Add a Comment

Replies

Maybe I don't understand your question, but ...


For "Door Service", the "Target Position" characteristic lets you set a value from 0% (closed) to 100% (fully opened) and anywhere in between. So when you say you can't tell the gate to move to another exact position, its not clear what you mean as that is what "Target Position" does. Or do you meant that the underlying hardware that you are trying to control has no way of giving such a fine-grained control? If the underlying hardware only supports an open / closed binary control, does it at least give its feedback which can then be reported via Current Position? If so, then you may need to poll the Current Position and then set Open / Closed depending on the direction you want to move until you get to target and then stop the motion.

I meant a limitation in the underlying hardware. The device lets me tell the door to start opening, to start closing, or to stop. However, I can't tell it to open to 40% (a feature that the Door Service seems to require), other than by *looking at it* and sending the stop command at the right moment. I think I can't know the current position either but maybe that just needs more invasive poking at the motor's circuit board... I will investigate some more.

Hi nicolas17,


You can create your own custom Garage door Profile. Do a search for the word "custom" on the HAP spec to get more info.


Basically you need to define your custom Garage door service using Apple's defined "Current Door state" and "Obstruction Detected" characteristics plus adding your custom target state in which you can define the format, min, max and step values. You will also need to create your custom UUID as per RFC 4122, which is also documented in the HAP spec.

i'm also facing same issue on my this site https://garagedoorrepairnewportnews.com