You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
3.0 KiB
22 lines
3.0 KiB
7 years ago
|
# Wifi Presence
|
||
|
Detect a person with his/her smartphone entering or leaving the wireless home network.
|
||
|
|
||
|
Using the network binding does not do the job for Android and iOS based devices as these devices enter deep sleep at some point and are not pingable anymore and would appear as offline.
|
||
|
|
||
|
In my special case I need to check the devices on a Fritzbox 7490 and two DD-WRT based Atheros routers (TP-Link Archer C7, DD-WRT v3.0-r33525 std 10/17/17) I use as additional access points to cover the whole house.
|
||
|
|
||
|
For getting data from the Fritzbox I use the [Fritzbox TR064 Protocol Binding](http://docs.openhab.org/addons/bindings/fritzboxtr0641/readme.html) which works for a bunch of different Fritzbox models.
|
||
|
|
||
|
The data from the DD-WRT devices is sent by a script and REST to openHAB. I used these howtos but needed to change some details as it was not working here.
|
||
|
* [openHAB Fritzbox TR064 Binding zur Anwesenheitserkennung](http://blog.its-webtime.de/2017/01/29/openhab-fritzbox-tr064-binding-zur-anwesenheitserkennung/)
|
||
|
* [DD-WRT Presence Detection with ARP for openHAB](https://community.openhab.org/t/dd-wrt-presence-detection-with-arp-for-openhab/9521)
|
||
|
* [openHAB Presence Detection with a DD-WRT Router](http://tinsley.io/2015/03/openhab-presence-detection-with-dd-wrt/)
|
||
|
|
||
|
The main difference here is that I kicked out user and password (as this cannot be set in openHAB 2.0/2.1 at the moment) and also I changed the command which gets the MAC addresses for all online devices. *wl_atheros assoclist* gets all online devices from all ath wireless interfaces, which is exactly what we want here.
|
||
|
|
||
|
* **ddwrt.items**: Put this file into your */etc/openhab2/items* directory and modify it for your specific setup.
|
||
|
* **ddwrt.sh**: Modify the content of this file for your specific setup and put it in your DD-WRT Startup Script (if you already have one please paste it under what you already have) and save it like described [here](https://community.openhab.org/t/dd-wrt-presence-detection-with-arp-for-openhab/9521) and [here](http://tinsley.io/2015/03/openhab-presence-detection-with-dd-wrt/). If you have two DD-WRT devices like me then you need to modify the script again for the second router (DDWRT1 to DDWRT2). I left two other devices in this script, but I only use the first two devices for presence detection. Leave these devices as well or remove them (then you need to change some other parts of the script, too).
|
||
|
* **fritzboxtr064.items**: Put this file into your */etc/openhab2/items* directory and modify it for your specific setup. Don't forget to install/activate the fritzboxtr064 binding first and prepare the Fritzbox like described [here](http://blog.its-webtime.de/2017/01/29/openhab-fritzbox-tr064-binding-zur-anwesenheitserkennung/).
|
||
|
* **presence.items**: Put this file into your */etc/openhab2/items* directory and modify it for your specific setup.
|
||
|
* **presence.map**: Put this file into your */etc/openhab2/transform* directory and modify it for your specific setup.
|
||
|
* **presence.rules**: Put this file into your */etc/openhab2/rules* directory and modify it for your specific setup.
|