Local RF control for a Hampton Bay Zandra ceiling fan (the "Powered by Hubspace" Wi‑Fi model) directly from a Flipper Zero — no cloud, no app, no Wi‑Fi.
The fan ships with an RF remote whose receiver lives in the fan canopy and works independently of the Hubspace cloud. This app reproduces that remote's signal using the Flipper's built‑in CC1101 radio, giving you a fully local, offline controller.
⚠️ Personal project for a device I own. Sub‑GHz transmission is regulated — use it only on your own equipment and within your local rules.
- All 18 remote buttons, organized into submenus: General / Light / Fan / Timer
- "Transmitting…" popup feedback
- Runs entirely on the Flipper's internal CC1101 — no extra hardware
Captured and decoded from the physical remote (via the Flipper's Sub‑GHz Read):
| Property | Value |
|---|---|
| Frequency | 304.25 MHz |
| Modulation | OOK / ASK (Ook650Async preset) |
| Protocol | CAME, 24‑bit, fixed code (no rolling code) |
| Timing | te_short ≈ 380 µs, te_long ≈ 760 µs (2×) |
| Frame | start high pulse → 24 bits (MSB first) → ~10.6 ms guard, repeated ~8× |
| Bit encoding | 1 = long‑low + short‑high · 0 = short‑low + long‑high |
Why not just use the Flipper's built‑in CAME protocol? Its encoder transmits with
te ≈ 320 µs — about 20 % off — and the fan's receiver rejects it. This app builds the
waveform in C with the correct 380/760 µs timing, which the receiver accepts.
| Category | Button | Code |
|---|---|---|
| General | Power (All) | D0BC9A |
| Light | Toggle | D0BC1B |
| Light | Brightness + | D0BC1C |
| Light | Brightness − | D0BC1D |
| Light | Color Temp − | D0BC4B |
| Fan | Toggle | D0BC0A |
| Fan | Speed 1 | D0BC06 |
| Fan | Speed 2 | D0BC05 |
| Fan | Speed 3 | D0BC04 |
| Fan | Speed 4 | D0BC03 |
| Fan | Speed 5 | D0BC02 |
| Fan | Speed 6 | D0BC01 |
| Fan | Direction Up | D0BC0F |
| Fan | Direction Down | D0BC0E |
| Fan | Breeze | D0BC30 |
| Timer | Off 2h | D0BC21 |
| Timer | Off 4h | D0BC22 |
| Timer | Off 8h | D0BC23 |
Uses ufbt inside a
uv virtual environment.
# create the venv and install ufbt
uv venv
uv pip install ufbt
# build (downloads the Flipper SDK on first run) -> dist/hampton_fan.fap
.venv/bin/ufbt
# generate VS Code integration (tasks + clangd)
.venv/bin/ufbt vscode_dist
# plug in the Flipper, CLOSE qFlipper, then install + launch
.venv/bin/ufbt launchThe app appears on the Flipper under Apps → Sub‑GHz → Hampton Bay Fan.
VS Code: install the clangd extension and disable the Microsoft C/C++ extension for this workspace (they conflict).
ufbt vscode_distalready wires upcompile_commands.json.
Open the app, pick a category, select a button, and point the Flipper at the fan. Start with Light → Toggle to confirm it works.
hampton_fan/
├── application.fam # app manifest (id, entry point, icon, category)
├── hampton_fan.c # the app: GUI + CAME encoder + CC1101 TX
├── icon.png # 10×10 app icon
└── dist/hampton_fan.fap
- Frequency
304.25 MHzis what the Flipper's frequency analyzer measured and what a raw replay confirmed works; the CC1101 is tuned exactly there. - A parallel project reproduces the same codes on an ESP32 + CC1101 with ESPHome
to expose the fan as native
fan+lightentities in Home Assistant.