/find

A Python3 framework for internal positioning using only a wifi-capable device

Primary LanguageCSSGNU Affero General Public License v3.0AGPL-3.0

Join the chat at https://gitter.im/schollz/find Version 0.21prealpha

Image

The Framework for Internal Navigation and Discovery (FIND) allows you to use your smartphone or laptop to determine your position within your home or office. You can easily use this system in place of motion sensors as its resoltion will allow your phone to distinguish whether you are in the living room, the kitchen or the bedroom, etc. The position information can then be used in a variety of ways including home automation, way-finding, or tracking!

Simply put, FIND will allow you to replace tons of motion sensors with a single smartphone!

The system is built on two main components - a server and a fingerprinting device. The fingerprinting device (computer or android app) sends the specified data to the machine learning server which stores the fingerprints and analyzes them. It then returns the result to the device and stores the result on the server for accessing via a web browser or triggering via hooks.

More information? Check out our splash page overview, the FAQ, and the API.

Requirements

To use this system you need to have the following

  • Linux / Mac / Cygwin (Windows). Windows is not yet supported (but will be soon). Raspberry Pi is supported!
  • Python3 installed
  • Either WiFi capable laptop or Android smartphone

Server setup

Note: you don't have to setup a server at all. If you'd like, you can use our demo server - simply follow the quickstart guide to get going.

Installation is very simple. Simply download the latest source code and install:

git clone https://github.com/schollz/find.git
cd find/
sudo python3 setup.py 

After which you will be prompted to enter the address and port of your server. If you want to run on a home network run ifconfig to check your address (it will be something like 192.168.X.Y usually). If you want to use an public address you can also use that. Note: if you are using a reverse proxy you can also set the external address, but if not, you can just leave that blank.

To run FIND simply use:

python3 server.py

To actually use the system you will need a fingerprinting device. The easiest thing to do is to use our app from Google Play or build the app yourself. Alternatively, you don't have to build an app at all and can simply use your laptop via the the fingerprinting program, more details here.

Using FIND

1. Fingerprint locations

If you want to use the app...

First download the app from the Google Play store.

Guide to starting app

To begin fingerprinting, stand in a location and enter the location name into the app. Then hit the "learn" button in the app. Then simply press ON. The app will then run at the specified interval, even in the background. To stop the fingerprinting you have to press OFF and to stop the program entirely you have to press EXIT.

If you want to use a laptop...

Any computer with a WiFi card or laptops will be able to use FIND as well. Its simple to get started. If you cloned the repository, goto computer/ to find fingerprinting.py. If you haven't cloned the repository, you can simply [download the fingerprinting.py script](the fingerprinting program).

To fingerprint locations simply use

python3 fingerprinting.py -l "name of location" -u "user name" -g "your group" -s "server" -p "port" -c 10 -r learn

which will send 10 fingerprints to the server. If you are using the demo server, simply set "server" to "finddemo.duckdns.org" and do not include the port. If you are running locally you probably want "server" to be "localhost" and port to be whatever you specified. The name of "your group" can be whatever you want.

Repeat this process for a few locations.

2. Analyze fingerprints

Now that you have learned several fingerprints, open a web browser and navigate to the dashboard page at http://address:port/ or http://finddemo.duckdns.org if you are using the demo server. Login with the name of your group that you specified in the app or in the script.

Once you login you'll be able to access the "Dashboard." This dashboard page contains all the information about the learned fingerprints and the analysis. More information about the dashboard page can be found on the API documentation.

The dashboard has many options and edits that you can do. For now, the only thing you need to do is press the button Calculate All and Find Parameters which will automatically optimize the parameters and generate the dataset you need for tracking.

Guide to analyzing fingerprints with app

3. Track locations

To see your current position classification, simply hit "Classifications" from the webpage that you visited to see the dashboard. This classifications are automatically updated as new information is available from the app/laptop. Sending the tracking information is very easy:

If you want to use the app...

Simply go back to the app and click the "track" button and then hit ON. Now you are tracking!

Guide to analyzing fingerprints

If you want to use a laptop...

To track locations simply use

python3 fingerprinting.py -u "user name" -g "your group" -s "server" -p "port" -c 1000 -r track

which will run 1000 times.

Screenshots

Sign-in

Screenshot of the signin


Landing Screenshot of the landing page


Monitor location in realtime

Screenshot of the classifications page


Visualize accuracy and errors

Charts show a clear diagnostics of the accuracy for each room


Pie charts lets you visualize the classification errors


Visualize raw data

In-depth analysis of the raw fingerprint data


Tip of the iceberg

Tip of the iceberg

There are lots of other features available which you can start investigating when you get used to the app and server. Some things to check out:

Contact us