Ping phones and tablets of friends in your network with an arduino with ethernet shield, when a phone or tablet is detected send a pushover message to your own phone or tablet.
This way when friends visit you, you know who is visiting you or who visited you when you where not at home.
The idea is to receive a message before they even ring the doorbell because they are detected on your wifi network.
All you need to do is give these friends a static ip address in your router from their phones/tablets mac address.
If your friends get new phones, you never have to change the code, just assign the new mac address of their new phone in your router.