Door locks generate events of type device_events each time they are locked and unlocked. Depending on the door lock model, certain locks provide more granular information such as the method by which the door was locked or unlocked, which access code was used...etc.
As the level of event information granularity varies on a door-lock model basis, please check with us first if you have a specific use case in mind and we can help recommend the right device model.
Triggered whenever the doorlock is unlocked
Triggered whenever the doorlock is switched to a locked state
An unlock event that indicates a user manually entered a pin code to open the door: