- apps/android/: Capacitor project wrapping the mobile web UI
- www/index.html: full DWM remote UI with first-run server IP setup screen
- capacitor.config.json: app ID com.dibby.wemo, allowMixedContent enabled
- .github/workflows/build-android.yml: builds debug APK on Ubuntu via Gradle
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All production deps (sql.js, ws, xml2js, etc.) are pure JS or WASM —
none need native rebuilding for the Electron runtime. Disabling npmRebuild
skips the @electron/rebuild step that was failing to find
app-builder-lib/out/util/rebuild/remote-rebuild.js in CI.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app-builder-bin v5 alpha ships the binary inside the npm package itself
(no GitHub release assets). Copy the npm-bundled binary to /usr/local/bin
using the path from require('app-builder-bin').appBuilderPath so
USE_SYSTEM_APP_BUILDER=true can find it in PATH.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The binary disappears from node_modules between the verify step and the
electron-builder step (likely re-installed/cleared during dep scan).
Install it to /usr/local/bin/ and use USE_SYSTEM_APP_BUILDER=true so
electron-builder looks it up by name in PATH — bypassing all path
resolution and caching issues.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app-builder-bin/index.js supports CUSTOM_APP_BUILDER_PATH env var which
overrides the default binary resolution. Set this explicitly on both
Linux build steps to ensure electron-builder finds the binary regardless
of working directory or npm workspace hoisting quirks.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The postinstall script for app-builder-bin does not download the binary
automatically in the GitHub Actions environment. Add an explicit step
to download and chmod the binary before running electron-builder.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app-builder runs npm install --production inside the app dir during
packaging. node-windows has a Windows-only postinstall script that
fails on Linux with ENOENT. Moving it to optionalDependencies makes
npm treat install failures as non-fatal on non-Windows platforms.
Also simplify build-linux.yml — removes unnecessary app-builder binary
verification steps that were masking the actual root cause.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
UI: Active Window Start/End time inputs on countdown form.
Leave blank = runs any time. End before start = crosses midnight.
Scheduler: checks current time against window before starting timer;
supports cross-midnight windows (e.g. 9:00 AM to 4:00 AM next day).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Store.mergeDevices(): updates existing by UDN, adds new, keeps offline devices
- platform.js: merges discovered into cache; registers cached-offline devices
in HomeKit so they remain visible; only removes truly orphaned accessories
- server.js: discover endpoint merges and returns full known device list
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Countdown is now state-change-driven (no scheduled window):
- 'If turns ON → auto-OFF after duration' (on_to_off)
- 'If turns OFF → auto-ON after duration' (off_to_on)
Scheduler polls device state; timer only starts when state matches
the chosen condition. Cancels any pending timer if state changes again.
Away Mode startAction/endAction already wired; _stopAwayLoop uses endAction.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Countdown: new 'Action when timer fires' dropdown (Turn ON / Turn OFF);
scheduler uses rule.countdownAction instead of hardcoded 1/0
- Away Mode: scheduler now reads startAction/endAction from the rule
(UI already exposed these fields); _stopAwayLoop respects endAction
instead of always forcing OFF at window end
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The app-builder binary (electron-builder's internal tool) fails to spawn
on plain ubuntu-latest runners due to missing shared libraries.
The official electronuserland/builder Docker image has all required
dependencies pre-installed and is the recommended build environment.
This eliminates the ENOENT spawn error entirely.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- npm install at root with --ignore-scripts --legacy-peer-deps
(prevents node-windows and other Windows postinstall scripts failing)
- CSC_IDENTITY_AUTO_DISCOVERY=false disables electron-builder cert search
- Split vite build, standalone bundle, and electron-builder into separate steps
so failures are easier to identify in CI logs
- Added libarchive-tools for AppImage generation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Run npm install --ignore-scripts inside apps/desktop only
(avoids node-windows postinstall breaking on Ubuntu runner)
- Run electron-rebuild explicitly after install
- Run build commands directly in apps/desktop working directory
- arm64 reuses vite output from x64 build step
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Scheduler:
- Import sun.js calculator (already existed, never wired in)
- resolveSecs() maps -2=sunrise/-3=sunset sentinels + offset to actual seconds
- getTodaySun() reads stored location from store
- _loadSchedule(), _resumeAwayLoops(), _startAwayLoop() all resolve sun times
Server:
- Add /sun-times endpoint returning today's sunrise/sunset in seconds
UI:
- Start Time and End Time fields now show Fixed/Sunrise/Sunset dropdown
- Offset field (minutes before/after) shown when sun type selected
- Live preview shows today's base time + fires-at time with offset
- Save handler writes -2/-3 sentinels + startType/endType/startOffset/endOffset
- openDwmEdit() restores sun type and offset when editing existing rules
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sun-based rules (startTime -2=sunrise, -3=sunset) were silently skipped
with 'if (startSecs < 0) continue'. The sun.js calculator existed but
was never called.
- Import calcSunTimes from ./core/sun
- Compute today's sunrise/sunset once at start of _loadSchedule()
- resolveSecs() maps -2/-3 sentinels to actual seconds + offset
- Both Away Mode and Schedule sections now fire at correct sun times
- Rules with no location set continue to be skipped gracefully
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>