You can go into Smart Home Monitor, hit the “settings” gear in the top right, and under the list of defaults you can hit “custom,” then “create new monitoring rule”. It’ll walk you through all the options from there.
You can, but you don’t have to create your own smartapp.You can just create a custom notification using the official smart Home monitor feature for when the door locks or unlocks:
(Appreciate and never take for granted all that you have.)
There are also two smart apps that offer more in addition to push notifications for locking/unlocking; such as, managing user codes on locks; Setting lock access based on schedules; Receiving notifications when a user used their code.