You could take a look at this thread to see if WiFi presence would work for you.
Then just use a routine triggered by presence to perform the actions you want.
There may be other threads on using WiFi for presence. Use the forum search, the quick-browse lists, or check the community wiki.