Depending on what router you have, I have a node server running on my NAS that listens for network events(syslog) piped from my router. Then it can listen for certain device(identified by mac address) connect and disconnect event, and fire ifttt events, which can then feed into smartthings...