SmartThings Community

Suggestion Presence detection for smart home using Wi-Fi

presence
wifi
project_presence

(Travis Prall) #1

I’m looking to develop a way to activate and deactive presence depending on when certain devices connect to my wifi network.

My situation. I live a house I own, with roommates. I’m currently using Samsung smart things to manage lots of areas of my house including security and energy usage.

Why other methods of presence detection don’t work well in this situation? I don’t want to give them access to the Samsung smarthings app for several reasons, one they can override energy controls like turning the AC way down and also, I have security monitors that keep them from going into my room without me knowing that could be overridden without me knowing. Asking roommates to install other third party apps that supposedly keep track of them seems invasive. They work great for family members, but seem a bit intrusive for roommates and some of my roommates don’t like keeping their GPS on. The Samsung presence sensor also doesn’t work well for several reasons, one device that “keeps track of you” seems invasive, it runs out of batteries, some roommates don’t have cars I can hook it to, and several roommates would find it easier to just leave the presence sensor at home at all times. Blue would work as a backup ,but has limited range.

Advantages to wifi is every automatically connects to the wifi with their phone and everyone leaves with their phone. The wifi network is powerful and spans across the entire house with no problem. Wifi can easily recognize people who don’t live here without asking them to install apps or doing anything besides connect to the wifi. I would really love the party trick of having friends stop by and my house verbally greats them and they don’t know how the house recognizing them. I tell them it’s alive. By the way I know they would first need my wifi password and connect and I don’t know about anyone else ,but I do this for my friends and people who visit with no problem.

I know [RELEASE] ASUSWRT Wifi Presence exists for older Asus routers ,but I was looking for something that works for my Net gear router.

Maybe there is a whole other way to just detect wifi signals in general?

Cable Modem: NETGEAR CM700 (32x8) DOCSIS 3.0 Cable Modem. Max download speeds of 1.4Gbps.
Cable Router:NETGEAR Nighthawk AC1750 Smart Dual Band WiFi Router (R6700)


(Stuart Buchanan) #2

the method i am using for Asus routers will also work with your network if you use the Tomato Shibby firmware

http://tomato.groov.pl/?page_id=69

this is the same firmware that i am using on my Asus router now, the only difference is that i run the Scripts from a USB stick and not JFFS as there isnt enough room left in flash as i wanted the full image with VLAN support.

but its not ASUS specific. it will work with any WRT based router which has JFFS access


#3

Several people have done these kinds of projects. There are a couple mentioned in the presence FAQ thread. The options available will depend in part on the specific router you are using.

You can also find them on the quick browse list in the community – created wiki by looking for the “presence” list in the Project Reports section:

http://thingsthataresmart.wiki/index.php?title=How_to_Quick_Browse_the_Community-Created_SmartApps_Forum_Section#Quick_Browse_Links_for_Project_Reports.2FQuestions


(Harley) #4

You can also run a script on your PC/server to scan the ARP table, and then trigger an event in Smartthings using Webhooks and IFTTT. The problem I have with using the ARP table is that iPhones don’t show an active lease when the screen is off. So for your scenario of having a house that’s alive would likely require either the Smartthings app, pairing/trusting via Bluetooth (ex: to a Raspberry Pi near the front door), or maybe even wireless packet-inspection to “catch” the initial handshakes (noting you could get multiple handshakes from the same device even though the person hasn’t left/returned, if it puts Wi-Fi to sleep when the screen is off cough iPhones cough) and then presume those people are still there for an amount of time after you “see” traffic to/from their device.
I posted about how to monitor a UPS from a Raspberry Pi, and use that to trigger changes in Smartthings using Webhooks and IFTTT. This method could be adapted to your purposes with some research and coding… If you can develop the “if THIS” portion in Linux, then my method below can help you get the “then THAT” setup to relay over to ST.
See my blog post below for details on integrating linux script outputs into ST:


(Idolpx) #5

Here is a project I put together that does what you are describing.

I needed a way to determine when my daughter was home without having to wake her up if she was asleep. That way I didn’t rush home to let the dog out when I didn’t need to since she was home. :slight_smile:

I installed it on a PogoPlug E02 with 80GB usb drive running Arch Linux and it works great.
I have also set it up before in Windows with IIS.

Let me know if you need any help getting it going.