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

Add ability to hide lock #11

Closed OwlBawl closed 2 years ago

OwlBawl commented 2 years ago

By default doorbell exposes the lock, regardless it is used or not. So i have 2 lock while only 1 is real... Any option to hide one?

judge commented 2 years ago

As far as I know, this is not possible in Homebridge. I can introduce a config parameter where you can specify the ID of the lock you want to hide. But for that, you would need to know the ID before the plugin registers the lock somehow.

OwlBawl commented 2 years ago

Homebridge itself doesn’t support the devise “hide”, but if you could add “disable” / comment it would work. Many plugins have such option. Would appreciate.

judge commented 2 years ago

Could you show me a plugin where this has been implemented? Would be great so I can follow some patterns.

OwlBawl commented 2 years ago

Not sure the principles of this plugins fits your case... but these one I use and know they have ability to chose items which to expose to Homekit: https://github.com/smallwood69/homebridge-cgllc-airmonitor-s1 https://github.com/ebaauw/homebridge-rpi

judge commented 2 years ago

One last question: could you show me your device's names? The plugin uses the "Device Name"/"Lock Channel"/"Lock Index" format to expose the locks, I would like to see your use case: you have multiple locks in 1 device? or does the device have multiple lock channels? or are there more devices? :)

OwlBawl commented 2 years ago

Hope this what you asked for. If need something else - please tell

Screenshot 2022-08-20 at 15 02 22 Screenshot 2022-08-20 at 15 02 40
OwlBawl commented 2 years ago

1 - is main door station - I use 2 - door ringbell, no lock in fact using (just outdoor apt. ring)

judge commented 2 years ago

Yes, this is it, now I think I understand everything. :) I think I'm going to add an ignoredLocks optional entry to the config so you can ignore the 2nd one by its name.

OwlBawl commented 2 years ago

Thank you in advance. Would wait the update from you 😊

judge commented 2 years ago

I just published a new version, could you please try it? If you update to 1.3.0 and click on the Settings, you should see an "Ignored Locks" section on the Homebridge UI. Here you can specify the name of your lock you want to ignore. So in your case: DS-KH8520-WTE1/2/0 Then you need to restart Homebridge and sadly there is one more step needed because Homebridge caches accessories. Go to "Homebridge Settings / Remove Single Cached Accessory" and remove the lock from there too, then restart again. I hope it works for you!

OwlBawl commented 2 years ago

Made all your guided steps. It really needs to be manually deleted. After the "Homebridge Settings / Remove Single Cached Accessory" and reboot - unwanted lock disappeared as supposed to. Thank you for your help !!! Now it's perfect )

judge commented 2 years ago

Great, I'm glad I could help! :)