FIND
THE FRAMEWORK FOR INTERNAL NAVIGATION AND DISCOVERY
NOTE: these instructions have been updated for FIND version 3
FIND is an inhouse locator software to run on your Android mobile or other portable Linux device. A mobile to run FIND will detect WiFi access points in range and their signal strength that correlates with the distance to the access point. The set of signals can be compiled into a fingerprint which can be used to uniquely classify the current location of that device relative to the (immobile) set of WiFi APs in range.
You can extend the learnt data set at any time. Itās not limited to a building or area.
You can use your mobile to learn your home, but also your workplace, school, supermarket, summer cottage or other favorite place youāre regularly staying at.
The only major requirement is to have stationary senders, so it might not work well in public places with many mobile users or cars if those provide a mobile (tethering) hot spot.
To get FIND to work with openHAB, you need at least a client and a FIND server.
FIND setup
The official FIND app client is available for Android only (sorry to iPhone users, but thereās an Apple policy restriction). Search Play Store for āfind hypercubeā. Search for āfind3ā to find the new app to only work with FIND v3 servers.
You do can find alternative download places for it such as here. Note that in order to install the .apk
, you need to allow for āinstallation from unknown sourcesā in your Android settings.
Same as with the enhanced app: I have not yet used Room+ yet so cannot confirm itās working. Please let me know when youāve tried it.
Alternatively, you can still run the Linux findclient
binary on any fully accessible ARM hardware such as a Pi Zero. Thereās a number of devices suggested on the FIND website.
Server side installation
If youāre running openHABian, thereās a menu option to install the FIND3 server.
You can still run your own find server, but unlike the previous version, FIND 3 is really hard to setup manually. See install instructions at Setup Ā· FIND.
The passive monitoring
feature has hardly been tested so be prepared to meet issues.
You will eventually also want to setup Nginx to proxy your connection to the API (and dashboard) through SSL so you can safely access from outside your LAN. Thatās including API access it takes to learn a location.
Ensure JSON transformations are enabled in openHAB. When theyāre not, install the addon by adding it to the transformation
line in services/addons.cfg
or via the transformations category in PaperUI.
Configuration
Once installed, fire up the app and select a āfamilyā name. The family usually means right that.
Technically it is a group of devices associated with a location you want to learn.
Weāll reference what you enter here as YOURGROUP
.
You can choose anything you want as long as thereās no one else using this on the FIND server and you can have multiple āfamiliesā.
You can have multiple mobiles contribute to a family in the database on the FIND server, just use individual device names but the same group.
Use either http://openhab:8005/
for direct server access inside your LAN or https://openhab.my.domain:8003/
when youāve setup Nginx to proxy access through your firewall.
Learning mode
Click to switch to āLearningā and enter a location (room) name, then āStart Scanā. The app will connect to the server and start submitting fingerprints.
āLearnā a room for 2 or 3 minutes and do no forget to click āstop scanā before moving on to the next room. Move on and repeat the procedure in every room of your house you want FIND to cover.
You can access the server dashboard at http://openhab:8005/, enter your group name there. Use this to delete specific rooms if you feel thereās a need because say recognition rate is bad. This can happen if a sender (WiFi access point) is being moved (note āsendersā are mostly the APs of your neighbors, too, so you donāt get informed when they change).
Pi as a learning client
FWIW, you can also use any Linux machine as a learning client to ātrainā the FIND server by running the fingerprint
client. It usually does not make much sense to use your PC or smart home server thatās connected to mains power because you actually cannot move it, meaning you can just learn a single ālocationā (the room it is installed in). To use a phone is easier.
Still you might want to use a Pi running off a smartphone power bank for this.
If you encounter problems such as
14:27:35.615 scanWifi - INFO 008 Gathering fingerprint with '/sbin/iw dev wlan0 scan -u'
14:27:35.625 main - WARN 009 Scan failed, will continue after a rest
then try sudo ./fingerprint -iwlist
.
openHAB2 integration
You need to use the MQTT v2 binding including to get the data from find3server
into openHAB.
Check the section on generic things and channels.
- create a broker thing to contain IP address of the broker. This can be
127.0.0.1
if you run mosquitto (or any other MQTT broker) on the same box as OH2. - create a āGenericā type MQTT thing and name it
Find3-YOURGROUP
or similar,YOURGROUP
being the āfamilyā that you have setup the database for in FIND - create a āStringā type channel for each device you will be using for tracking
Name it after the user this channel is meant to track and set MQTT state topic asYOURGROUP/location/DEVICE-X
. Use DEVICE-X as the device name on this userās phone.
UseJSONPATH:$.location
as the Incoming Value transformation.
Use e.g. mosquitto_passwd -b /etc/mosquitto/passwd openhab2 secret
to create a MQTT user in the mosquitto password table.
You can also add authentication using curl -X PUT "http://<yourfindserverip>/mqtt?group=YOURGROUP
then FIND will automatically manage the passwd file and restart mosquitto using a SIGHUP signal.
FIND3 publishes to mqtt channel āYOURGROUP/location/YOURUSERā.
You can watch mqtt events like this: mosquitto_sub -v -h mymqttserver -u mymqttuser -p secret -p 1883 -t 'YOURGROUP/location/#'
.
openHAB items
You need to add the username of the person to track to get the information in.
The JSONPATH definition will pull in the current location.
In your location.items
file, you simply need to reference the channel you created by name
String mqttfind_johndoe "John Doe is @ [%s]" (All) { channel="mqtt:topic:aabbccddee:findjohndoe" }