1. Setup your home router to give family phones static ip addresses.
2. Use the ping block so that when the phone is on the wifi you know they are home.
3. Wire up actions based on that.
NB some phones may switch off wifi when in active.
This area is ripe for a 3rd party app