Home automation depending on who entered the home
This heavily depends on your HA supervisor, for example with OpenHAB this can be done with the NetworkHealth binding : https://github.com/openhab/openhab/wiki/Network-Health-Binding.

The key here is to know your devices IP Address and monitor it.

Item in Openhab format:


Switch Phone_WIFI   "Phone 1"   (Status, Network)   { nh="192.168.1.101" }
Switch Phone2_WIFI   "Phone 2"   (Status, Network)   { nh="192.168.1.102" }


More details for OpenHAB: the binding will check the connection status of a given device with it's IP Address, then you can use a rule such as :


rule "Wife back home - Lights On"
when
    Item Phone_WIFI received update ON
then
    // turn on all lights
    postUpdate(All_Lights, ON)

end