The settings routes expose the RSSI threshold configuration that determines how raw BLE signal strength values are classified into the three proximity zones:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AngelAmoSanchez/TFG-RaspberryPi-BLE/llms.txt
Use this file to discover all available pages before exploring further.
near, medium, and far. Thresholds are stored in the system_settings database table and can be updated at runtime without restarting the server.
Proximity zones are defined as follows:
| Zone | RSSI range |
|---|---|
near | RSSI ≥ near_threshold |
medium | medium_threshold ≤ RSSI < near_threshold |
far | RSSI < medium_threshold |
near_threshold = -60 dBm and medium_threshold = -75 dBm.
All endpoints are mounted under /api/v1/settings.
GET /api/v1/settings/thresholds
Return the current RSSI threshold values and a human-readable description of each zone’s range. ResponseRSSI cutoff (in dBm) above which a detection is classified as
near. Example: -60.RSSI cutoff (in dBm) above which a detection is classified as
medium (and below near_threshold). Example: -75.Human-readable zone boundary strings.
PUT /api/v1/settings/thresholds
Update the RSSI zone thresholds. After saving the new values, the server immediately reclassifies all existing detection records and returns counts of how many records were moved to each zone. Request bodyNew RSSI cutoff for the
near zone, in dBm. Must be in the range [-127, -1]. Must be strictly greater than medium_threshold.New RSSI cutoff for the
medium zone, in dBm. Must be in the range [-127, -1]. Must be strictly less than near_threshold.Both thresholds are required and must satisfy
near_threshold > medium_threshold. Supplying equal values returns HTTP 400.Confirmation string, e.g.
"Umbrales actualizados correctamente".The threshold values that were saved.
Statistics from the retroactive reclassification pass.
POST /api/v1/settings/thresholds/reset
Reset both thresholds to the factory defaults:near_threshold = -60, medium_threshold = -75. This triggers the same retroactive reclassification as PUT /thresholds, but returns a simpler confirmation body without reclassification counts.
Response
Confirmation string, e.g.
"Umbrales reseteados a valores por defecto".The restored default values.