feat: implement auto-lock delay for Dahua door strikes no.2#2041
Conversation
|
use a script or something to do this, it does not need to be in a plugin. |
|
I dont understand the amcrest side changes, this seems like a reporting issue? does the device not report lock state? |
|
No my Dahua VTO2000A doesn't report lock state. http://IP/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=1 gives back Info.status=Close all the time which I guess most doorbells do because only electrical lock ist installed. You would need to install a seperate sensor (magnetic/reed contact) to get status. Next was I can't read timer from Dahua itself (no event) even if you can set time in DahuaUI - so I had to implant a timer in the Amcrest plugin to fake the "lock". Had to mod homekit - else the lock wouldn't show in the videostream itself but as seperate widget. |
|
any other ideas how to implent this? |
additional #2017:
Amcrest plugin changes:
lockStatetoLockedon startup so HomeKit accepts the devicelock()/unlock()now properly updatelockState(faking the state as requested)dahuaAutoLockDelayHomeKit plugin changes:
LockMechanismservice to Doorbell accessories that have theLockinterfaceaddLinkedServiceso iOS shows the lock button in the camera viewsetTimeout(150ms)beforeupdateCharacteristicto avoid HAP notification/SET-response collision - else it hangs.The HomeKit change was necessary because without it, the Lock interface on a Doorbell device is never exposed to HomeKit regardless of the Amcrest plugin state.