Automatic Home/Away detection

I can recommend this relative easy to follow guide (by @seiko) :

It makes use of the Tasker app on android.