{"id":21631091,"url":"https://github.com/nunum/where-am-i-server","last_synced_at":"2025-04-11T14:08:52.923Z","repository":{"id":42470515,"uuid":"186308314","full_name":"NunuM/where-am-i-server","owner":"NunuM","description":"Implement and test indoor position algorithms using Wi-Fi signal information","archived":false,"fork":false,"pushed_at":"2023-07-07T21:55:27.000Z","size":5198,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T10:12:33.786Z","etag":null,"topics":["fingerprinting","java","javadoc","localization-tool","maven","open-source","swagger","wifi"],"latest_commit_sha":null,"homepage":"https://whereami.nunum.me","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NunuM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-12T21:55:45.000Z","updated_at":"2022-04-04T11:44:01.000Z","dependencies_parsed_at":"2022-09-08T22:20:50.970Z","dependency_job_id":null,"html_url":"https://github.com/NunuM/where-am-i-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NunuM%2Fwhere-am-i-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NunuM%2Fwhere-am-i-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NunuM%2Fwhere-am-i-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NunuM%2Fwhere-am-i-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NunuM","download_url":"https://codeload.github.com/NunuM/where-am-i-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248413447,"owners_count":21099309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fingerprinting","java","javadoc","localization-tool","maven","open-source","swagger","wifi"],"created_at":"2024-11-25T02:13:10.420Z","updated_at":"2025-04-11T14:08:52.902Z","avatar_url":"https://github.com/NunuM.png","language":"Java","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=5F3L26AKGKLR2\u0026source=url"],"categories":[],"sub_categories":[],"readme":"## WhereAmI\r\n\r\n[![Build Status](https://travis-ci.org/NunuM/where-am-i-server.svg?branch=master)](https://travis-ci.org/NunuM/where-am-i-server)\r\n\r\n### Motivation\r\n\r\nThis is a free, collaborative platform with the goal of helping researchers to test and develop indoor tracking algorithms using Wi-Fi signal information. Apart of the server, we also build an [Android application](https://github.com/NunuM/where-am-i-android-app) to help users to collect raw data more easily.\r\n\r\nAndroid Application already available on [market](https://play.google.com/store/apps/details?id=me.nunum.whereami\u0026hl=pt_PT)\r\n\r\n### Table Of Contents\r\n* [Get Start](#get-started)\r\n* [Data Model \u0026 Lifecycle](#data-model--lifecycle) \r\n* [Data Flow](#data-flow)\r\n* [Android Application](#android-application)\r\n* [How to become a Algorithm Provider](#how-to-become-a-algorithm-provider)\r\n* [REST API Docs](https://whereami.nunum.me/swagger/)\r\n* [Java API Docs](https://whereami.nunum.me/javadoc/)\r\n* [FAQ](#faq)\r\n\r\n### Get Started\r\n\r\nTo get start you will **Java 8** and Maven in you machine. To start the server you need to type the following commands. \r\n\r\n```\r\nmvn compile\r\nmvn exec:exec -Dexec.executable=\"java\"\r\n ```\r\n\r\n*Note:* You must take a look and change the default System Arguments in the [pom.xml](https://github.com/NunuM/where-am-i-server/blob/master/pom.xml#L158)  \r\n\r\n### Data Model \u0026 Lifecycle\r\n\r\n\r\nThis is a brief summary of the entities. Let's begin with **Localization**. This entity represents a point on the map, like your home in a satellite view. Within your home, you have various rooms, there are **Positions**. With this, we have the relationship of **one localization** can have **zero or more positions**. The localizations can be private for the device that created it. In other words, you can share with other users your localizations. The privacy is declared at its creation.\r\n\r\n\r\nA **Training** entity is created with the desired algorithm and the respective provider. An **Algorithm** can be proposed by everyone. This is because several people like more reading than implementing and vice versa, thus **the same algorithm** can be provided by several providers and their results can be compared and competition (\"I have a better random algorithm 😅\")  may also be resulted by this design.\r\n\r\nAn **AlgorithmProvider** can be, for now, either a user with their own server or a user that has a git repository ready to be deployed. Both must apply to be a provider. This is just e email verification and there are ready to go.\r\n\r\nThe provider with their own server will receive all fingerprints for the **Training requests**  via HTTP. Remember that a Training request belongs to a localization that has multiples positions and each position have hundreds of Wi-Fi fingerprints. When you train the model, you must update the respective **Training** to inform that you are ready to predict the user localization. After that, your server will be queried. From this description, the server owner registers as to be an algorithm provider by giving two required HTTP resources, one for data ingestion, and another for the prediction phase. For the git owners, we integrate the repository with the platform.\r\n\r\n\r\nWhen exists a training request for a given provider, the subsequent training request, will reactivate the sinking of the data to the HTTP provider, the cursor is preserved. In other words, your server will receive only newer data. \r\n\r\n\r\nThe visible **Localizations** and **Positions** can be reported as **Spam** by sanity. And only the localization owners can submit training requests.\r\n\r\n\r\nTo conclude this chapter, the use case that this platform offers is the integration of two actors, a user who shares Wi-Fi information and a Provider who predicts the user localization using their algorithm implementation. \r\n\r\n### Data Flow\r\n\r\n1 - User requests a new prediction model from **Algorithm Provider**\r\n\r\n![Training Request](https://i.ibb.co/mN5DjjN/Untitled-Diagram-5.png)\r\n\r\nThe diagram above shows how the user can have a training model for a given localization.\r\n\r\nThe user starts by making a [POST request](https://whereami.nunum.me/swagger/#/localization/submitTrainingRequest) server indicating the algorithm and the implementor.\r\n\r\nThe server queues the task and responds to the user. Meanwhile, the server gets all samples for the user's localization, and starts sending to the server implementor the samples in batch fashion.\r\n\r\nWhen the algorithm provider [registers the service](https://whereami.nunum.me/swagger/#/algorithm/addAlgorithmProvider)  it has to send in the request two URL's (for who has a server)\r\n\r\n```json\r\n{\r\n  \"method\": \"http\",\r\n  \"properties\": {\r\n    \"url_to_receive_data\": \"https://provider.com/sink\",\r\n    \"url_to_predict\": \"https://provider.com/predict\"\r\n  }\r\n}\r\n```    \r\n\r\nOr for who has a repository:\r\n\r\n```json\r\n{\r\n   \"method\":\"git\",\r\n   \"properties\":{\r\n      \"repository_url\":\"https://rep.provider.com/sink\"\r\n   }\r\n}\r\n```\r\n\r\nThe server start sending the samples with the following body:\r\n\r\n```json\r\n{\r\n   \"id\":0,\r\n   \"isDrained\":false,\r\n   \"fingerprints\":[\r\n      {\r\n         \"id\":0,\r\n         \"uid\":\"UUID\",\r\n         \"bssid\":\"\",\r\n         \"ssid\":\"\",\r\n         \"levelDBM\":0,\r\n         \"centerFreq0\":0,\r\n         \"centerFreq1\":0,\r\n         \"channelWidth\":0,\r\n         \"frequency\":2,\r\n         \"timeStamp\":\"\",\r\n         \"localizationId\":0,\r\n         \"positionId\":0\r\n      }\r\n   ]\r\n}\r\n```\r\n\r\nThe **isDrained** value is set `true` when the server has no more samples to push, with this, the provider can start the model training. Once a model is trained, the provider makes a [POST request](https://whereami.nunum.me/swagger/#/task/updateTask). The id that must be sent is the id of the root object when samples are pushing to the provider. Until then, the user cannot use your model. The server is expecting a `2XX` as a response, otherwise, the error will be send via email to the provider and the sinking will be postponed.\r\n \r\n2 - In the **prediction phase**, the server makes regular POST requests to the provider's model with the following body:\r\n\r\n```json\r\n{\r\n   \"localizationId\":0,\r\n   \"samples\":[\r\n      {\r\n         \"bssid\":\"\",\r\n         \"ssid\":\"\",\r\n         \"levelDBM\":0,\r\n         \"centerFreq0\":0,\r\n         \"centerFreq1\":0,\r\n         \"channelWidth\":0,\r\n         \"frequency\":0,\r\n         \"timeStamp\":\"\"\r\n      }\r\n   ]\r\n}\r\n```\r\n\r\nAnd expects as a response the following body:\r\n\r\n```json\r\n{\r\n   \"positionId\":0,\r\n   \"accuracy\":100.0\r\n}\r\n```\r\n\r\nIf the provider responds with the **positionId** equal to zero, it means that was not able to determine user's positions and the prediction will not be seen by the user. \r\n\r\nAll request between the server and the provider, the server will send in the headers the `X-APP` and `x-request-id` headers.\r\n\r\nThe provider can [delete one of their algorithm implementations](https://whereami.nunum.me/swagger/#/algorithm/deleteAlgorithmProvider) and the affected users will be notified.\r\n\r\n### Android Application\r\n\r\n#### Table Of Contents\r\n* [Features](#features)\r\n* [Permissions](#permissions)\r\n* [FAQ Android](#faq-android)\r\n* [ScreenShots](#screen-shots)\r\n\r\n##### Features\r\n* Posts view with related material about the state of art;\r\n* Localizations management;\r\n* Positions management;\r\n* Customizable privacy of localizations;\r\n* Notification center;\r\n* Offline localizations and posts visualization;\r\n* Offline fingerprinting collection;\r\n* Automatic synchronization of locally stored data;\r\n* Highly configurable REST API;\r\n* All lists views use endless scrolling and swipe to refresh gesture;\r\n* No collect or sell information that is shared by the users;\r\n* Open Source;\r\n* No Ads;\r\n\r\n##### Permissions\r\n\r\n* [Internet](https://developer.android.com/reference/android/Manifest.permission.html#INTERNET) - To communicate with server;\r\n* [Access WI-FI State](https://developer.android.com/reference/android/Manifest.permission.html#ACCESS_WIFI_STATE) - For collect WI-FI samples;\r\n* [Change WI-FI State](https://developer.android.com/reference/android/Manifest.permission#CHANGE_WIFI_STATE) - For Turning On the Wi-Fi card;\r\n* [Access Coarse Location](https://developer.android.com/reference/android/Manifest.permission.html#ACCESS_COARSE_LOCATION) - For localization associated data at their creation;\r\n\r\n##### FAQ Android\r\n\r\n###### There are a ton of localizations, can I only see mine?\r\n\r\nYes, you can. Click on top right button **\u0026#8942;** -\u003e **settings** -\u003e **HTTP API** and activate the option **List only my localizations**.\r\n\r\n###### Why the screen of my Android device is always ON when I am sending samples or requesting to predict my localization?\r\n\r\nWhen the screen goes dark (by inactivity), the WI-FI card no longer scans the available networks. This was the behavior on my device, I also have tried to build the sink service as a background job, but without success. If you know a better way, let me know, or open an issue.\r\n\r\n###### Do I need an Internet connection to see my localizations?\r\n\r\nNo, the localization will be displayed from the application cache directory. If you clean it, you will need Internet.\r\n\r\n###### Do I need an Internet connection when am I collecting samples?\r\n\r\nNo, the application will store locally and automatically sync with server when you are back online.\r\n\r\n###### When I delete one localization, what data is deleted?\r\n\r\nThe server will hard delete all data associated with the localization. There is no coming back;\r\n\r\n###### You pretend to implement more indoor tracking algorithms, besides the Mean?\r\n\r\nYes, when the community starts to share information (currently is a cold start), I will provide more implementations.\r\n\r\n###### Can I suggest posts and/or algorithms?\r\n\r\nYes, you can use the feedback form to propose new material.\r\n\r\n###### I have more than one device, can I share my localizations to another specific device? \r\n\r\nKind of, currently either you mark the localization as public or private for a list and/or predict, and is for all users. However, you can go to the **settings** -\u003e **general** and click on **Installation ID** and set on all devices the same installation, and all will see the same localizations.\r\n\r\n##### Screen Shots\r\n\r\n\u003cimg src=\"https://i.ibb.co/n3GY6Kf/65846243-359964648034468-7578109312891879424-n.jpg\" alt=\"Posts Fragment\" width=\"300\"/\u003e \u003cimg src=\"https://i.ibb.co/gSGs1td/66173223-678601435899829-4638181899309678592-n.jpg\" alt=\"New Localization Fragment\" width=\"300\"/\u003e \u003cimg src=\"https://i.ibb.co/18p0QsF/66383260-378099049729668-3632568727754506240-n.jpg\" alt=\"Localizations Fragment\" width=\"300\"/\u003e \r\n\u003cimg src=\"https://i.ibb.co/HFgkTZX/66438572-348106275883337-2898324556466880512-n.jpg\" alt=\"Localizations Dashboard Fragment\" width=\"300\"/\u003e \u003cimg src=\"https://i.ibb.co/QpSkLsZ/66269079-2181320211980385-4407071160810864640-n.jpg\" alt=\"New Training Fragment\" width=\"300\"/\u003e \u003cimg src=\"https://i.ibb.co/VHHQQ5K/66240579-638161973344689-8484108607871254528-n.jpg\" alt=\"Notification Fragment\" width=\"300\"/\u003e\r\n\u003cimg src=\"https://i.ibb.co/ftSGHRk/66526400-1527989434003740-864574528682983424-n.jpg\" alt=\"Notification Fragment\" width=\"300\"/\u003e\r\n\r\n### How to become a Algorithm provider\r\n\r\nOpen the swagger API, find the resource **provider**, make a POST request by filling your email and wait for it in your mailbox (**verify the spam**). click on the link and voila. You can use the **provider** sub-resource of **algorithm** to tell what implementations you have to offer.\r\n\r\n### FAQ\r\n\r\n##### What is a Wi-Fi fingerprint?\r\n\r\n[Wikipedia knows better](https://en.wikipedia.org/wiki/Wi-Fi_positioning_system#Fingerprinting_based)\r\n\r\n##### I know that you do not have won anything besides knowledge building this project, can I pay you a beer?\r\n\r\nThank you for your kindness, you can via \u003ca href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=5F3L26AKGKLR2\u0026source=url\"\u003ePayPal\u003c/a\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnunum%2Fwhere-am-i-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnunum%2Fwhere-am-i-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnunum%2Fwhere-am-i-server/lists"}