How to keep the phone unlocked when it is connected to a known WiFi network? I am using MotoG2. I would like to know, if there is any means of keeping the phone unlocked when it is connected to a known wifi network.
Firelord, I don't think Smart Lock allows Wifi as an option - at least it doesn't on my S7.
I do recall when I used to own a Moto, that Moto had some of its own smart actions, but don't know what happened to those proprietary apps of late.

Some neat tips - I do realize you have the G2, not the OG.
http://phandroid.com/2015/08/05/moto-g-2015-first-things/

You can try to use Trusted Places if your device can find your location easily enough - or -
use Trusted devices if you have a Bluetooth device you can set up such as a speaker or on your PC. 

Rick