3

I am looking for a way to automate some stuff in my household depending on who entered home. The only way I can think of implementing this is by checking which device connected to the WiFi.

For example when I come home I want the water heater to start while when my girlfriend comes home she wants the oven to start preheating.

Now I want a way to recognize which device connected to the WiFi (maybe get the MAC address which is unique?) and from there send different commands to different appliances.

Now I am aware that this will start as soon as I park my car given that my garage is in range of the router but this is ok.

My question is, how would I implement such a service?

John Demetriou
  • 360
  • 4
  • 16

1 Answers1

5

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
Romain BOURDY
  • 251
  • 1
  • 2
  • I have never used something like this. How do I install it at my home and how do I connect different devices to it? – John Demetriou Nov 06 '14 at 10:06
  • Hi, you can find a getting started here : http://www.openhab.org/gettingstarted.html but depending on what you want to do you might need to crawl the wiki to gather informations. – Romain BOURDY Nov 06 '14 at 10:13
  • 2
    Just noticed that you were also the person asking for temperature monitoring, this can be integrated aswell in OpenHAb - Wife back home -> Temperature < 20°C -> Heater On – Romain BOURDY Nov 06 '14 at 10:47
  • 1
    I am so going to try out OpenHAB, thanks for making me aware of it! – Thomas Jensen Nov 07 '14 at 11:43
  • 1
    No problem, it's a win-win here, that will be more ideas for my own home when you'll come with yours :D – Romain BOURDY Nov 07 '14 at 11:49