Hatred does not cease by hatred, but only by love; this is the eternal rule.
-- The Buddha
Now you are intruding on my private baliwick: psychotic mechanical inventions.
A coincidence. I once met a Japanese gentleman who had an intelligent gate. Him or his family and his friends could just walk up and unlatch the gate. No amount of fiddling and prying however, by anyone else, could get it to open.
He had a Myna bird in a cage across the yard. Whenever someone unknown was present the bird would retreat to it's perch and remain there. When family was present, it would hop down in the hopes of getting tidbits. Friends whom the man wished access to the gate were introduced to the bird and permitted to feed it and of course, it would then hop down when it saw them. The release for the gate of course was attached to the perch.
Even more odd, I once read an obscure little book on these methods that the Japanese have perfected. With walls of paper, the entry gate is the only security. The permission, or latch release principle, is a lot of fun.
There are a number of pull rings outside a gate. Pull the correct one, the gate opens. The rest lock it. Change rings each day with a simple hook. Friends call and ask for the correct number of the ring before coming over.
Beside the gate is a bench. Please have a seat for a half a minute before, while sitting, opening the gate. Opening the gate turns the sand container back over, reloading the lock for next time. (Much more simple to make than it sounds)