Repository navigation
v2.0
Unrelated side notes: I've successfully ported the Guardian app control over to web bluetooth (Bluefy for iOS, or Chrome/Brave on Android). The only issue is figuring out how to get the pairing/local key using the web version. You'll need to know what your local key is by using this app, connecting to the purifier, and copying it from the settings.
I utilized Claude Opus 5 to help decipher the bluetooth packets using an nRF USB dongle into my PC with Wireshark to intercept the data transmission from my iPhone to the purifier to make web bluetooth work. Download here: #1
Fixed
- White launch flash: launch screen background, splash logo bg, native web-view background, and home-screen base layer were all hard-coded white - now black regardless of theme.
- Startup no longer waits on Guardian's dead cloud server (
_recoverDevicesData) before using the saved local pairing key. - Background/foreground handling rewritten: old
pagehide/resume listeners never fired in WKWebView, so returning to the app didn't refresh status until the next poll (up to 10s later). Now pauses polling in the background and refreshes immediately on return (with a full link reset after >25s away). - Commands sent while the device was mid-read no longer get silently dropped as "busy" - they queue and retry.
- Switching between two paired devices no longer double-stops the wrong device or permanently kills polling.
- Failed commands now revert the UI to the device's real state instead of leaving stale optimistic values.
- Control buttons work immediately instead of only after the first status read completes (up to 8s delay).
Changed
- Script loading:
jquery/hubea/aspe/guardianload via<script defer>in parallel at parse time, not sequentially afterwindow.load. - Server-type probing reduced from a 4-type (
l,p,d,s) x 15s loop to a single 10s try onl(local/offline), since the cloud types are dead. - Device search retry backoff: 500ms → 1s → 2s (was a flat 2s), with a 6s watchdog per attempt so a stuck native callback doesn't hang the search.
- Connection retry delay: 2s → 1s.
- Debug log rewritten as a capped ring buffer (500 lines kept, 200 rendered) with batched DOM flushes; previously unbounded and forced a layout per line.
- Image
srcupdates (air quality, speed, theme icons) now skip the DOM write when the value hasn't changed.
Removed
- Unused bundled assets:
css/,fonts/,locales/,js/crypto-js/, 7 unused JS files, iPad-only app icons, stale_CodeSignature/SC_Info. - iPad support (
UIDeviceFamily→ iPhone-only) and unused background modes (fetch,remote-notification), keeping onlybluetooth-central.
App package size: 3.98 MB → 3.44 MB (installed), IPA 1.53 MB → 1.25 MB.