Whether a trained model is active on the sensing-server (cached ~30s). Confidence is only calibrated/trustworthy with a model loaded; model-less it is uninformative (~0.5), so the confidence gates relax to avoid ever missing real presence for lack of a model.
()
| 335 | starting = bool(st.get('starting')) |
| 336 | error = st.get('error') |
| 337 | hint = st.get('hint') |
| 338 | name = st.get('name') |
| 339 | adapter = st.get('adapter') |
| 340 | autostopped = bool(st.get('autostopped')) |
| 341 | return jsonify({ |
| 342 | 'enabled': enabled, |
| 343 | 'running': running, |
| 344 | # Still registering with BlueZ. Distinct from failed: on a slow board |
| 345 | # registration can outlast the start() wait and succeed shortly after, |
| 346 | # so the UI must keep polling rather than declare it broken. |
| 347 | 'starting': starting, |
| 348 | 'error': error, |
| 349 | # Plain-language next step when the controller refused to advertise — |
| 350 | # the raw BlueZ text ("Failed to register advertisement") says nothing |
| 351 | # about what to do about it. |
| 352 | 'hint': hint, |
| 353 | 'name': name, |
| 354 | # Configured preference ('' = auto: prefer the built-in controller). |
| 355 | 'adapter': shared_data.config.get('ble_provisioning_adapter', ''), |
| 356 | 'active_adapter': adapter, |
| 357 | 'adapters': _ble_adapters(), |
| 358 | 'autostop': bool(shared_data.config.get('ble_provisioning_autostop', False)), |
| 359 | # True once a phone provisioned and the peripheral freed the adapter. |
| 360 | 'autostopped': autostopped, |
| 361 | # Power warning (under-voltage) — running BLE + a USB radio on a weak |
| 362 | # PSU can reset the Pi; None when healthy. |
no test coverage detected