Skip to main content

Helium Positioning API

Project description

Helium Positioning API

PyPI Status Python Version License

Read the documentation at https://helium-positioning-api.readthedocs.io/ Tests Codecov

pre-commit Black

Features

Prediction of the location of devices belonging to an organization in the Helium Console. The implementation of several different methods and models is planned.

Currently, only the nearest-hotspot-prediction method is implemented. This method uses the position of the hotspot with the highest signal strength to the corresponding device (RSSI value).

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 commands and models.

command position estimation model
nearest_neighbor location of hotspot with the best signal
midpoint point of equal distance from the two hotspots with the best signals
linear_regression trilateration with an linear regression distance estimator
gradient_boosting trilateration with a gradient boosted regression distance estimator

REST-API

  1. Start local REST-API (default)
    python -m helium_positioning_api serve
    
  2. Open Browser and navigate to 127.0.0.1:8000/docs
  3. Click on predict/{uuid} endpoint to drop down the endpoint details
  4. Click on the Try it out button.
  5. Fill in the uuid of your device and click on the button Execute
  6. You can see the location prediction response in the Responses section below.

You can also just simply get the prediction by navigating to:

https://127.0.0.1:8000/predict/your-uuid

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


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

File details

Details for the file helium_positioning_api-0.0.2.dev1675376200.tar.gz.

File metadata

File hashes

Hashes for helium_positioning_api-0.0.2.dev1675376200.tar.gz
Algorithm Hash digest
SHA256 56a3eae52ce8b66f62c26f4b18a04ec9fc101c7dfeb35e2990ca591f43266b46
MD5 4546dc1f680c17960f8e8b1e0743e77f
BLAKE2b-256 31ee16e6a15f4e4b73a51521eccb67ee89496e2c6418b272ef17c8c623c69d47

See more details on using hashes here.

File details

Details for the file helium_positioning_api-0.0.2.dev1675376200-py3-none-any.whl.

File metadata

File hashes

Hashes for helium_positioning_api-0.0.2.dev1675376200-py3-none-any.whl
Algorithm Hash digest
SHA256 f596d381e1f44b132286d89d86296baca95ff07e45b4cdda78407efb40df63c6
MD5 195ae1a7a2f2e9ef79f633c35a881580
BLAKE2b-256 a33147e0f61810bee68f64d67f4386a8d06eca146462c3bf5b4d09f28bc30e1a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page