Skip to content

LED Flash Patterns

When no other output is available (no OLED, no serial connection), the FireFly Client communicates device state through LED flash patterns. These patterns serve the same role as POST beep codes — the LEDs are the only diagnostic output on a wall-mounted device.

Many patterns occur before WiFi or MQTT are active, so no remote diagnostic is possible.

Timing Constants

ConstantValueDescription
UNPROV_ROTATE_INTERVAL_MS200 msTime each LED stays on during the rotating chase
FLASH_ERROR_SHORT_MS500 msOn-time for a short burst in an error flash code
FLASH_ERROR_LONG_MS1000 msOn-time for a long burst in an error flash code
FLASH_ERROR_GAP_MS250 msOff gap between individual bursts within a group
FLASH_ERROR_PAUSE_MS1000 msOff pause between the short-burst group and the long-burst group

Patterns

CodePatternFull CycleMeaningResolution
All LEDs offSteadyWiFi or MQTT unavailable — connection lost after provisioningCheck network connectivity and MQTT broker
Rotating chase — one LED at a time, 1→6→1200 ms per LEDUnprovisioned — valid identity in EEPROM, no WiFi/MQTT config yetProvision via Controller
1SSS·LON 500 · OFF 250 · ON 500 · OFF 250 · ON 500 · OFF 1000 · ON 1000 · OFF 1000 · repeatUnregistered / hardware mismatch — no identity written to EEPROM, or firmware built for a different productRun HW-Reg app to write device identity; or flash correct firmware
2SSS·LLON 500 · OFF 250 · ON 500 · OFF 250 · ON 500 · OFF 1000 · ON 1000 · OFF 250 · ON 1000 · OFF 1000 · repeatReservedTBD

Notes

  • The rotating chase (unprovisioned) uses all LEDs in sequence and is produced by rotateLeds(). It is non-blocking — normal boot continues in parallel.
  • All error-code patterns (codes 1 and above) flash all LEDs simultaneously and are produced by haltWithFlashCode(shortBursts, longBursts). This function never returns; only a power cycle can exit the state.
  • When an error code is active, no WiFi, MQTT, or OTA is available — LEDs are the only diagnostic output.