Geofencing/HUE

Im looking for a way to get my synology NAS ( thats already is on 24/7) to be the control center for my smart home. Smart home for now is some wificams ,HUE lightningg, and a multimedia setup…

Is it with openhab somehow posibble to make a kind of geofencing so that all household phones will be " flagged" in or out ( of wifi reach/pairred) so that hue dont turn of bulbs when im leaving the house and kids or wife is still at home…

Found this http://www.developers.meethue.com/content/geofencing-multi-person-homes-solved

So it can be done i just want it to be done with my nas . No need to spend more co2 than needed :wink:

It is absolutely possible and there are lots of different ways you can do it.

First some general concepts (this is super high level and I’m skipping over a lot of stuff). OH is based around Items and Rules. An Item represents a thing in your home automation (sensor or actuator). There is a concept among Items called a Group which is a way to aggregate the state of a lot of Items into one. A Rule is a set of logic which gets triggered by an event and usually causes something to happen. In a Rule you can check the state of items and do different things based on their state.

So, you can have a set of one or more Items to detect whether or not a specific phone is present or not. Those Items can be aggregated into Group, and all the Items for all members of the household can further be aggregated into a Group.

I say more than one per person because you may decide it works better to have a variety of ways to detect when a phone is present. Several ways include:

  1. Network Health Binding: This binding periodically pings an IP address and if the machine responds it sets an OH Switch to ON, otherwise it sets it to OFF.

  2. Mqttitude Binding: Now called OwnTracks, it lets you set up geofences and the phone reports its location and messages when it enters or exits a geofense

  3. Bluetooth (works best in OH 2): if you have BT on the device where OH is running, detect when a device with a given address is nearby.

  4. External to OH you can have your router report when a phone joins the network (DD-WRT), run a script on a device that does have BT to report when it is present or not (I do this in addition to Network Health), etc. On Android you can do a lot with Tasker as well.

  5. IFTTT integration: With IF installed on the phone with their respective phone channels activated for location tracking, as well as my.openhab, you can have IFTTT flip a switch in OH to indicate when a phone enters or exits a geofence.

So in short, if your NAS will run OH at all, it can do it.