14 Commits

Author SHA1 Message Date
ThaMunsta d7e9f0d3d3 state is still being weird
Build Images and Deploy / Update-PROD-Stack (push) Successful in 19s
2026-03-30 23:09:04 -04:00
ThaMunsta 9e6101dc3c another shot at brightness adjustments
Build Images and Deploy / Update-PROD-Stack (push) Successful in 19s
2026-03-30 22:57:42 -04:00
ThaMunsta 7ea32cee8c bugfix for rule fetch, feat: device info and trying to fix dimmer
Build Images and Deploy / Update-PROD-Stack (push) Successful in 18s
2026-03-30 22:38:52 -04:00
ThaMunsta da2693ae68 dimming and fix for manual add
Build Images and Deploy / Update-PROD-Stack (push) Successful in 19s
2026-03-30 22:16:17 -04:00
SRS IT 3c155f7cfd feat: add active time window to countdown rules
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>
2026-03-28 22:32:29 -04:00
SRS IT e8b365e5a7 feat: persist and cache all known devices; discovery only adds/updates
- 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>
2026-03-28 22:28:11 -04:00
SRS IT e52b3578dc feat: countdown rule fires only when device matches configured condition
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>
2026-03-28 22:24:11 -04:00
SRS IT 5024996523 fix: simplify countdown action to plain Turn ON / Turn OFF, no auto-reverse 2026-03-28 22:17:14 -04:00
SRS IT 4c09fd0b66 feat: add ON/OFF action config for Countdown and Away rules in Homebridge plugin
- 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>
2026-03-28 22:15:01 -04:00
SRS IT 5a5155c216 chore: add root package.json, lock files, and gitignore *.tgz
- Root package.json (workspace definition) was missing from initial commit
- Commit root package-lock.json for reproducible installs
- Commit packages/homebridge-plugin/package-lock.json
- Add *.tgz to .gitignore (built npm tarballs are release assets, not source)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 20:34:13 -04:00
SRS IT 3bcc427683 feat: add Import/Export for DWM rules in Homebridge UI
Export:
- '⬇ Export' button downloads all rules as dwm-rules-YYYY-MM-DD.json
- Compatible with desktop app rule format

Import:
- '⬆ Import' button opens file picker (accepts .json)
- Preview panel shows rule names + types before committing
- Merge mode: adds rules, skips any whose name already exists
- Replace mode: deletes all current rules then imports
- Server strips imported IDs/timestamps — fresh ones are assigned
- Reports imported/skipped count on completion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 20:25:12 -04:00
SRS IT 951d4c4eaa feat: add sunrise/sunset support to Homebridge plugin
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>
2026-03-28 20:20:32 -04:00
SRS IT 328a607e28 docs: update all READMEs for cross-platform support and add wemo-core docs
- Root README: add Linux x64 + ARM64 download targets, update release
  assets table, document background scheduler differences per OS,
  add wemo-core shared package description, use repo name dibby-wemo-manager
- apps/desktop README: full rewrite covering Windows installer/portable,
  Linux AppImage/.deb/.rpm (x64 + ARM64), all build commands per OS,
  data storage paths per OS, requirements table
- packages/wemo-core: new README documenting all exports, constants,
  helper functions, day number convention, sun sentinel codes
- about.html: fix version string from "2.0" to "2.0.0"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 16:38:31 -04:00
SRS IT 27be1892ed Initial release — Dibby Wemo Manager v2.0.0
Desktop (Electron/Windows): device dashboard, DWM scheduling engine,
native firmware rules editor, Windows background service, web remote,
sunrise/sunset support.

Homebridge plugin (homebridge-dibby-wemo v1.0.0): HomeKit switches for
all local Wemo devices, custom UI with DWM rules, device rules,
scheduler heartbeat, and location-based sunrise/sunset scheduling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 16:30:43 -04:00