Helium Positioning API
Project description
Helium Positioning API
Features
Prediction of the location of devices belonging to an organization in the Helium Console. Several different methods and models are available.
Docker
The easiest way to run the positioning-API is to prepare an .env file (see below for further instructions what should be in it) and run it as docker-container:
docker run -p 8000:8000 --env-file=.env ghcr.io/emergotechnologies/helium-positioning-api:main
Installation
Developer install
The following allows a user to create a developer install of the positioning api.
pip install -r requirements.txt
poetry install
poetry shell
pip install git+https://github.com/emergotechnologies/helium-api-wrapper
Prerequisites
Before use, ensure that there is an .env file in the root directory of the repository where the API_KEY variable is entered (see .env.sample). You can generate and copy the API_KEY at https://console.helium.com/profile.
Usage
The service allows usage via command line interface or locally hosted REST interface.
CLI
Get Device Position
python -m helium_positioning_api predict --uuid 92f23793-6647-40aa-b255-fa1d4baec75d
Currently defaults to the "nearest_neighbor" model.
Advanced Requests
The location prediction command is
python -m helium_positioning_api predict --uuid 'your uuid' --model 'your model selection'
See the table below for a list of currently available models.
| Model | Position estimation explanation | Suggested use |
|---|---|---|
| nearest_neighbor | Location of hotspot with the best signal | Purchase of at most one packet from a device (see Packet Configurations for more details) |
| midpoint | Point of equal distance from the two hotspots with the best signals | Purchase of at least two packets from a device (see Packet Configurations for more details) |
| linear_regression (experimental) | Trilateration with an linear regression distance estimator | Experimental. Purchase of at least three packets from a device (see Packet Configurations for more details) |
| gradient_boosting (experimental) | Trilateration with a gradient boosted regression distance estimator | Experimental. Purchase of at least three packets from a device (see Packet Configurations for more details) |
REST-API
- Start local REST-API (default)
python -m helium_positioning_api serve - Open Browser and navigate to
127.0.0.1:8000/docs - Click on
predict_tfpath to drop down the endpoint details - Click on the
Try it outbutton. - Fill in the
uuidof your device and click on the buttonExecuteto get an estimation using thenearest_neighbormodel - You can see the location prediction response in the
Responsessection below.
The mapping of available models to paths can be seen in the table below.
| model | path |
|---|---|
| nearest_neighbor | predict_tf |
| midpoint | predict_mp |
| linear_regression | predict_tl_lin |
| gradient_boosting | predict_tl_grad |
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the MIT license, Helium Positioning API is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Credits
This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file helium_positioning_api-0.0.2.dev1683125793.tar.gz.
File metadata
- Download URL: helium_positioning_api-0.0.2.dev1683125793.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8826b0ef970acc6cd945ee3bf5530288eade83e3acfe46ab88d0c5155b08be4c
|
|
| MD5 |
205d44b0b45cb4673736c5d511edf668
|
|
| BLAKE2b-256 |
9337570fb2199af8cc6783e87cdcbc2cbc5817456720e51e9ef9084fa8f1e0fc
|
File details
Details for the file helium_positioning_api-0.0.2.dev1683125793-py3-none-any.whl.
File metadata
- Download URL: helium_positioning_api-0.0.2.dev1683125793-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30286479ab8def022a9393d8792ac7f8c27c85f2ca8c9f15dbf4f9410c5cd297
|
|
| MD5 |
30bf542ccd91e01291cb759edf34d647
|
|
| BLAKE2b-256 |
9699f7a11ec79e10968000e72c9fcbb4ca0ed33a8455293774280df3563a6167
|