elad-bar / DahuaVTO2MQTT

Listens to events from Dahua VTO unit and publishes them via MQTT Message
103 stars 38 forks source link

Does mqtt send message for lock status? #44

Open markbegma opened 3 years ago

markbegma commented 3 years ago

Hello,

I am only planning to get a Dahua doorbell, so I cannot test plugin physically now, and there is something I need to figure out before buying it.

Thing is, I have a very specific lock control, where my current doorbell actually “unlocks” a dry contact sensor, which is intercepted by another system that opens the lock on its own. So the question is simple, but I just can’t check it now: does this plugin actually have a specific MQTT message where the doorbell reports that the lock has been opened on its side (like when somebody inserted a card), so that I can subscribe my lock management system to this message?

Thank you in advance!

elad-bar commented 3 years ago

There is no indication regarding the lock status, but... in the vto unit you can define the time between unlocks, so you can define a virtual sensor that do the job, That's what i've done

markbegma commented 3 years ago

There is no indication regarding the lock status, but... in the vto unit you can define the time between unlocks, so you can define a virtual sensor that do the job,

That's what i've done

I think I might have lost you a little. Are you trying to say that the doorbell logs all its opening attempts, so by looking at the timestamp for the latest entry I can figure out that I have to open the door with my handler system now?

Just to make the point of what bothers me: there are cases when the doorbell opens the door without any command from plugin, like when it scans a correct fingerprint or someone taps it with a keycard. So I need some way to capture these, since in my case this doorbell won't physically be able to open a door on its own…

elad-bar commented 3 years ago

not sure i understood, anyway, in the vto unit web manager, you can set the interval between unlocks, meaning, if you opened the door with an api call or the button, it will be allowed to request again to open the door in X seconds, for instance 5 seconds between attpempt.

you can manually set a lock component (template) that unlocks using MQTT command to the DahuaVTO2MQTT, using automation or node-red - for 5 seconds the status will be unlocked and then you will switch it back to locked, which will allow you to unlock it again.