# PILOT SOAK PLAN — FBOTA-3x6A2 (Ghana edition)

Five units, five phases.  Every phase has a hard pass rule; if any unit fails,
**stop the whole batch**, raise a change ticket on the failing subsystem and re-run
from Phase A after the fix.  Never ship from a batch that contains an unexplained
failure.

---

## Phase A — bench power-quality soak (72 h, 5 units in parallel)

**Goal:** prove the carrier survives Ghana-grade voltage instability and
round-the-clock switching with SSRs.

**Rig:**
* Variac 0–270 V,mano breaking supply at random times with a contactor, or —
  better — a real generator-changeover bank if you can borrow one.
* Each channel drives a **200 W incandescent** or **2 kW resistive** ohmic dummy
  (not inductive) — 2 kW across 2 units in alternating patterns.
* Log with the existing web dashboard (its history API) + a serial logger.

**Cycle pattern (loop for 72 h):**

| Step | Duration | Action |
|---|---|---|
| 1 | 30 min | 230 V, channels 1&3 ON, 2&4 OFF, then swap |
| 2 | 2 min | ramp 230 → 190 V |
| 3 | 2 min | hold |
| 4 | 2 min | ramp 190 → 255 V |
| 5 | 30 min | hold, all four channels ON |
| 6 | 5 s | hard cut (zero-cross point not guaranteed) |
| 7 | 10 min | power back; unit must re-reach `READY` in ≤ 60 s |
| repeat | | |

**Pass criteria**
* Zero dead SSRs, no SSR stuck-on after 200+ switching events per channel
* OLED shows `READY` within 60 s after every power-back
* NVS state intact (each unit keeps its tariff / boot-state settings)
* Housing wall ≤ **45 °C** at 35 °C ambient measured with a thermocouple on the
  SSR body plate, the PCB mains area, and the Var-ac-side terminals
* Fuse (T500 mA) never operated spuriously
* Free heap on the dashboard ≥ 80 kB after 72 h (leak watch)

**Deliverable:** `PhaseA-report.md` with hourly temperature/power snapshots.

---

## Phase B — OTA / rebooting endurance (bench, 5 units, 1 day)

**Pass criteria**
* 50 planned OTA cycles: `pio run -e esp32 -t upload` (dashboard build)
* 10 random hard power cuts mid-upload
* 3 explicitly corrupted flash images (truncate the .bin at 60 %, 85 %, 97 %)
* **Zero** bricks; each device must converge to a working firmware image
* Check that at least one of the intentionally broken builds gets rolled back by
  `otaSafety` (boot-cap logic), proving the watchdog logic works in the field

**Deliverable:** `PhaseB-report.md` listing the device-side OTA status per attempt.

---

## Phase C — real-field pilot (3–5 real homes, 30 days)

**Goal:** measurement + installer experience, under real Ghanaian loads and weather.

**Pilot sites:** pick from your electrician network, **diverse**:
1. coastal flat (Tema / Keta — salt + humidity)
2. inland dry (Kumasi — dust)
3. urban apartment (Accra — weak WiFi,廓 load sharing)
4. shop / small business (fan + TV 12 h/day, iron at peak hours)

**Sizing rule: light loads only.**  Set the sites up with lights, fans, TV,
decoders — **NO pumps, motors, boreholes, AC units.**

Per site a licensed electrician receives 1× device + 1× leaflet, and gets paid for
their `Phase C` installation-trip feedback.

**Remote monitoring during the pilot**
* Daily check #1: dashboard reachable, OLED still answering (`/api/pins` on the IP)
* Daily check #2: `MQ:ON · Net:ON` and the cost accumulator increases ~linearly
* Weekly check: firmware version unchanged (or exactly as intended), NVS settings intact

**Pass criteria (per site, at 30 days)**
| Metric | Threshold |
|---|---|
| Switch-command delivery latency (app → SSR state change) | < 3 s P95 |
| App-disconnected resilience (state still applies) | 100 % — offline engine |
| Site uptime (any state) | ≥ 99 % |
| Field visits | ≤ 2 technician visits per 30 days |
| SSR/thermal burn / discoloration observed on teardown | zero |

---

## Phase D — environmental / tropical watch (1 unit of the batch)

* Run one pilot unit near the **coast** (Keta or Tema fishing district) in a real
  patress box, unmodified; 30 days:
  - open, inspect, photo the PCB
  - pass: no corrosion bloom on pads, no ant/termite trails inside, glands sealed,
    face not yellowed, OLED still readable
* Any failure → improve (conformal coat, resin-based gland sealant, replace
  filament type with UV-stabilised PETG) and re-open a 14-day retest.

---

## Phase E — third-party test (optional but decides if you may stamp CE)

* Send **3 units** + technical file to an accredited lab (SGS Ghana, TÜV SA/Nig, or
  Intertek Accra).  Test:
  - EN 61000-6-1 / -6-3 (EMC immunity + emission, residential limits)
  - EN 60730-1 § 13 · § 17 · § 19 spot checks (heating, abnormal, endurance)
* Merge the lab results into `DoC.md`.  ONLY then replace `⚠️ CONFIRM`s and sign.

---

## What happens if something fails

Work with change ticket → repair → re-run **only the relevant phase**, but re-run
Phase A even for an electronic tiny fix.  No silent "hotfix" skipping.

## Costs and logistics to expect
| Item | Est. cost |
|---|---|
| 5× assembled units (JLC assembly + shipping to Ghana) | ~USD 300–470 |
| Variac rental or generator changeover bank hire | GHS-day rate |
| 200 W × 4 bulbs + sockets | small |
| Licensed-electrician installers for 5 sites | per-site fee you agreed |
| Conformal coating kit (MG Chemicals 419D or equivalent) | small |
| (Optional) 3rd-party lab test | USD 800–2 500 |
