Difference between revisions of "Developer mode"
(Update: V1/V2 naming, remove ESP32/Pi distinction) |
(Add Identify Device section (Morse code LED blink)) |
||
| Line 112: | Line 112: | ||
* '''Skip for now:''' Hides for 2 days (stored in localStorage + cookie). | * '''Skip for now:''' Hides for 2 days (stored in localStorage + cookie). | ||
* '''Don't show again:''' Permanently disables onboarding by writing <code>onboarding_done: true</code> to device config. | * '''Don't show again:''' Permanently disables onboarding by writing <code>onboarding_done: true</code> to device config. | ||
=== Identify Device === | |||
The Developer tab includes an '''Identify Device''' button that blinks the status LED in a distinctive Morse code pattern (spelling "bcmeter") for 30 seconds. This helps visually locate a specific device when multiple units are deployed in the same area. | |||
* '''API call:''' <code>/api/control?action=identify</code> | |||
* '''Duration:''' 30 seconds | |||
* '''Pattern:''' Morse code at ~10 WPM (dot = 120 ms, dash = 360 ms) | |||
* '''LED reverts''' to its previous mode (idle, sampling, or error) after the pattern completes. | |||
Latest revision as of 15:22, 26 March 2026
Developer Mode
The bcMeter interface includes a hidden developer mode for advanced hardware tuning and diagnostics. Changes in developer mode affect hardware directly — only modify settings if you understand their impact.
Activating Developer Mode
- Open Settings (gear icon).
- Click on the device name text (next to "Configuration") 7 times within 3 seconds.
- The name will change to show
[DEV]in yellow. - A new Developer tab appears in the settings panel.
Developer mode persists until the page is reloaded.
Developer Settings
The Developer tab exposes low-level configuration organized into sections:
Calibration (dev:calibration)
| Parameter | Description | Default |
|---|---|---|
| LED duty cycle (880nm) | Brightness of the 880nm IR LED (0–255) | Auto-set during calibration |
| LED duty cycle (520nm) | Brightness of the 520nm green LED | Auto-set |
| LED duty cycle (370nm) | Brightness of the 370nm UV LED | Auto-set |
| Calibration factor K (per channel) | Ratio Ref/Sen from last calibration | Auto-set |
| LED duty floor | Minimum duty before "no filter" is declared | 30 |
Optical (dev:optical)
| Parameter | Description | Default |
|---|---|---|
| Sample spot diameter | Diameter of the filter area exposed to sample air (cm). Critical for absorption calculation. | 0.4 cm |
| Filter scattering factor | Correction factor for filter material light scattering | 1.39 |
| Number of channels | Active wavelength channels (1–3) | 1 (880nm only) |
Pump (dev:pump)
| Parameter | Description | Default |
|---|---|---|
| Pump duty cycle | Base pump PWM speed (0–255) | 40 |
| Min pump duty | Minimum duty to maintain airflow | 35 |
| Max pump duty | Maximum pump speed limit | 255 |
| Min airflow (mL) | Stall detection threshold | 70 mL/min |
| PWM frequency | Pump control frequency (Hz) | 40 |
| Disable pump control | Manual mode — bypasses automatic pump management | false |
| Enable 12V output | Activate 12V auxiliary power rail | false |
Auto Flow Control (dev:afc)
| Parameter | Description | Default |
|---|---|---|
| AFC flow low | Minimum airflow when AFC is active | 0.05 L/min |
| AFC flow high | Maximum airflow when AFC is active | 0.5 L/min |
| AFC BC low/high | BC concentration thresholds for flow lookup table | Varies |
Hardware (dev:hardware)
| Parameter | Description | Default |
|---|---|---|
| is_ebcMeter | Enable direct emission mode (µg units instead of ng) | false |
| IoT enable | 4G/LTE modem available | false |
| Enable WiFi | WiFi connectivity available | true |
| Show undervoltage warning | Display warning when 12V rail not detected | true |
System (dev:system)
Internal system parameters. Modifying these may affect device stability.
Development Build Detection
When the device is running a development build, the API returns "env":"dev" in the status response and a red banner appears at the top of the interface:
DEVELOPMENT BUILD — connected to dev backend
12V Power Warning
If the optical ADC is not detected (because 12V power is missing), a warning modal appears:
⚠ 12V Power Missing — The optical ADC is not detected. Optics and light sensors will not function. Pump and airflow control (5V) are unaffected.
Onboarding Skip Mechanism
The welcome/onboarding screen can be bypassed:
- Skip for now: Hides for 2 days (stored in localStorage + cookie).
- Don't show again: Permanently disables onboarding by writing
onboarding_done: trueto device config.
Identify Device
The Developer tab includes an Identify Device button that blinks the status LED in a distinctive Morse code pattern (spelling "bcmeter") for 30 seconds. This helps visually locate a specific device when multiple units are deployed in the same area.
- API call:
/api/control?action=identify - Duration: 30 seconds
- Pattern: Morse code at ~10 WPM (dot = 120 ms, dash = 360 ms)
- LED reverts to its previous mode (idle, sampling, or error) after the pattern completes.