judge / homebridge-hikconnect

A Homebridge plugin to communicate with Hikvision smart doorbells via Hik-Connect cloud and allows lock to be unlocked. It exposes doorbell locks as a lock accessories to Homekit.
MIT License
18 stars 1 forks source link

Expose Hik lock as garage/gate #22

Closed kapps7 closed 11 months ago

kapps7 commented 11 months ago

Hey guys, Wondering if anyone has been able to expose the locks so that it automatically shows up in CarPlay when approaching home like a normal garage/gate accessory. If it doesnt I am not sure whether Siri allows control of an accessory verbally if you are using CarPlay at the time. Thanks

judge commented 11 months ago

Hi! Currently the plugin registers locks as "LockMechanism" (https://developers.homebridge.io/#/service/LockMechanism) for Homekit. There is "GarageDoorOpener" (https://developers.homebridge.io/#/service/GarageDoorOpener) type as well, so probably if the plugin would register your locks as that type, they would show up. I will try to come up with a solution to make this configurable. Do you have multiple locks? If so, do you want all of them show up as GarageDoorOpener?

kapps7 commented 11 months ago

Hey mate. In this case yes there is a drive in gate and a walk in gate so I would only want to expose the drive in gate as the garage accessory. That way I can get it show up in CarPlay.

Great if you can add it as a configuration option. I was thinking the other way would be to use the dummy garage switch plugin and tie it to that. Doing it within your plugin would be more elegant ;)

judge commented 11 months ago

The problem with that I cannot control individual accessories. When the plugin starts, it will log in into HikConnect, gets all the devices and registers them as LockMechanism. I could create a config variable to be able to configure those as GarageDoorOpeners but then all of the locks will became that type. Maybe the plugin you mentioned (https://github.com/rasod/homebridge-dummy-garage) + an automation could be a better solution.

kapps7 commented 11 months ago

You're right because that would mess up CarPlay for all so. I'll go the dummy accessory. Thanks as always!