Skip to content

M-1: honour the launch preset without WiFi (setup card no longer forced at every boot) - #9

Open
Bunton33 wants to merge 3 commits into
mainfrom
fix/no-wifi-launch-preset
Open

Bunton33 wants to merge 3 commits into
mainfrom
fix/no-wifi-launch-preset

Conversation

@Bunton33

@Bunton33 Bunton33 commented Oct 25, 2026 •

Copy link
Copy Markdown

Fixes the bug Justin reported: unless the M-1 is added to a WiFi network, it ignores your launch preset and shows the dog logo and connection instructions at every power-on.

Cause

b8's first-boot signpost (wled.cpp, beginStrip) applied preset 9 (dog, then setup card) at every boot while WiFi was unconfigured, whatever launch preset the owner had set. The choice was saved (it shows in the UI) but never ran. That contradicts D20 (full control with no network); no decision or QA row covered it, which is how it passed the b8 gate.

Fix

The signpost now plays only while all of these hold: no WiFi configured, launch preset still the factory one (4), the owner has not chosen one, and preset 9 exists.

"Chosen" is a new saved flag (cfg.json def.psc), set by:

  • saving Config > LED & Hardware (field Apply preset ___ at boot under Power up) while no WiFi is configured, or
  • ticking Apply at boot on a different preset in the preset editor. (That box is pre-ticked on the current launch preset, so just renaming the dog preset does not count.)
Situation (no WiFi) b8 b9
Factory-fresh, nothing chosen dog, then card same
Owner set launch preset 3 dog, then card (bug) Sound Bars
Owner chose the dog (4) in LED & Hardware dog, then card (bug) dog only
b8 unit with launch preset != 4, updated by OTA dog, then card its preset, no re-save
Factory reset (filesystem wiped) missing preset 9 (black, "Preset not found", from code reading) plain Apollo blue
WLED-MM upgrade without preset 9 its own/missing preset 9 its own launch preset
Any unit with WiFi configured its launch preset unchanged
  • No apollo/fs change, so it works by OTA.
  • Compiled in only by [env:apollo_m1] (-D FACTORY_SIGNPOST_PRESET=9 -D FACTORY_BOOT_PRESET=4; platformio.ini change needs maintainer OK). Other envs of the fork now boot exactly like upstream (b8 forced preset 9 in every env).

Product trade-off (D27): accepted by Justin, 2026-10-25

Saving LED & Hardware without WiFi for any reason (for example the color order from #8) counts as choosing, so the setup card stops at power-on. It stays available as preset 5 "Setup". There is no UI way back to the boot signpost short of a full install; launch preset 9 is not a good substitute (it keeps showing the hotspot card after WiFi is set up), so the docs no longer suggest it.

Verified (no hardware)

  • apollo/boot-signpost-test.js (runs in npm test): reads the boot condition from wled.cpp and the flags from [env:apollo_m1], checks them against apollo/fs, runs 12 boot cases, and checks both triggers. It fails on b8/main (reproduces the bug); six deliberate mutations of the fix are all caught. npm test: 20/20.
  • Builds: apollo_m1 (+112 bytes vs b8), esp32s3dev_16MB_opi_hub75, esp32dev. ESP8266 can't build on this Mac (x86-only toolchain); CI covers it.
  • Independent review (boot/persistence, compile gating, docs): its findings are fixed here (dog-preset re-save, missing preset 9, LED save while online, QA order, menu names, preset 9 advice).

Bench (QA_CHECKLIST.md, new D27 section)

Run on a separate factory-fresh unit (it marks the launch preset as chosen, which would break D13's final provision row). Key checks: nothing saved: dog then card every boot; rename the dog preset: still dog then card; launch preset 3 via LED & Hardware: Sound Bars, no card; 4: dog only; OTA from b8 with launch preset 3: Sound Bars without re-saving.

Customer docs (for you to publish; nothing posted from here)

Suggested addition for the docs repo page docs/products/m1/setup/use-without-wifi.md, matching apollo/wiki-rewrites/no-wifi-mode.md:

Choose what your M-1 starts with (firmware b9 or later). Open Config > LED & Hardware, scroll to Power up, set Apply preset ___ at boot (4 = Apollo dog, 1 = Scrolling Text, 2 = Apollo Blue) and press Save. Unplug and replug: it starts on that preset, without the setup card. Saving that page without WiFi for any reason also counts as choosing. The card is always in the preset list as "Setup".

🤖 Generated with Claude Code

Bunton33 and others added 2 commits October 25, 2026 12:42
… the setup signpost

b8 applied preset 9 (dog, then setup card) at every boot while WiFi was unconfigured, whatever launch preset the owner had chosen. The choice was saved and shown in the UI but never ran, so owners using the M-1 without WiFi could not pick what it starts with.

The signpost now plays only while WiFi is unconfigured AND the launch preset is still the factory one AND the owner has not chosen one AND presets.json has preset 9. A new persisted flag (cfg def.psc) records the choice: saving Config > LED & Hardware while no WiFi is configured, or ticking "Apply at boot" on a different preset (re-saving the pre-ticked dog preset does not count). No filesystem change: b8 units get the fix by OTA, and an owner who already set a launch preset other than the factory one gets it immediately. A wiped filesystem or a WLED-MM upgrade without preset 9 now runs its own launch preset instead of a missing preset 9.

The signpost is compiled in only by [env:apollo_m1] (-D FACTORY_SIGNPOST_PRESET=9 -D FACTORY_BOOT_PRESET=4); other envs of the fork boot like upstream. apollo/boot-signpost-test.js (npm test) reads the condition from wled.cpp and checks the boot cases and both triggers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
D27 records the bug, the fix and the trade-off that needs sign-off. QA gains a D27 section run on a separate unit (the b8 gate never set a launch preset without WiFi). The no-WiFi wiki draft explains how to choose what the M-1 starts with, uses the real menu name (Config > LED & Hardware) and fixes the stale "Apollo M-1-xxxxxx" hotspot name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Saving LED & Hardware without WiFi for any reason ends the boot setup card; accepted 2026-10-25. The narrower rule was rejected because it would stop owners from choosing the Apollo dog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant