# Dibby Wemo Manager **Local Wemo control โ€” no Belkin cloud required.** Dibby Wemo Manager gives you full local control of Belkin Wemo smart switches and plugs from two interfaces: | Component | Description | |---|---| | ๐Ÿ–ฅ๏ธ **Desktop App** | Cross-platform Electron app (Windows + Linux) โ€” device dashboard, power control, scheduling | | ๐Ÿ  **Homebridge Plugin** | HomeKit integration with custom scheduling UI inside Homebridge | Both share the same local-network Wemo protocol (UPnP/SOAP) and the same DWM scheduling engine. No Belkin account, no cloud dependency, no internet required. --- ## Repository Layout ``` dibby-wemo-manager/ โ”œโ”€โ”€ apps/ โ”‚ โ””โ”€โ”€ desktop/ # Electron desktop app (Windows + Linux) โ”œโ”€โ”€ packages/ โ”‚ โ”œโ”€โ”€ homebridge-plugin/ # homebridge-dibby-wemo Homebridge plugin โ”‚ โ””โ”€โ”€ wemo-core/ # Shared Wemo protocol helpers (internal) โ””โ”€โ”€ package.json # npm workspaces root ``` --- ## Quick Start ### Desktop App Download the latest installer from [Releases](../../releases): **Windows:** - **`Dibby Wemo Manager Setup 2.0.0.exe`** โ€” NSIS installer (recommended) - **`Dibby Wemo Manager 2.0.0.exe`** โ€” Portable single-file executable **Linux (x64):** - **`Dibby Wemo Manager-2.0.0.AppImage`** โ€” Universal AppImage, runs anywhere - **`dibby-wemo-manager_2.0.0_amd64.deb`** โ€” Debian / Ubuntu - **`dibby-wemo-manager-2.0.0.x86_64.rpm`** โ€” Fedora / RHEL **Linux (ARM64 โ€” Raspberry Pi 4/5):** - **`Dibby Wemo Manager-2.0.0-arm64.AppImage`** - **`dibby-wemo-manager_2.0.0_arm64.deb`** Run the installer (Windows) or AppImage (Linux). Wemo devices are discovered automatically via SSDP on your local network. ### Homebridge Plugin ```bash npm install -g homebridge-dibby-wemo ``` Then add to your Homebridge `config.json`: ```json { "platforms": [ { "platform": "DibbyWemo", "name": "DibbyWemo" } ] } ``` Restart Homebridge. Devices appear in HomeKit automatically. --- ## Features ### ๐Ÿ–ฅ๏ธ Desktop App - **Device dashboard** โ€” real-time on/off status for all Wemo devices on your network - **One-click power control** โ€” toggle any device instantly - **DWM Rules** โ€” cross-device scheduling engine: - **Schedule** โ€” turn devices on/off at specific times on selected days - **Countdown** โ€” active-window timer (on at sunset, off at midnight, etc.) - **Away Mode** โ€” randomised on/off simulation while you're away - **Always On** โ€” enforce a device stays on; auto-corrects within 10 seconds - **Trigger** โ€” IFTTT-style: when device A changes state, control device B - **Native firmware rules** โ€” read, toggle and delete rules stored on the Wemo device itself - **Background scheduler** โ€” keeps rules firing even when the GUI is closed - Windows: native Windows service (`DibbyWemoService`) - Linux: background process, runs while app is in system tray - **Web remote** โ€” optional local web interface accessible from your phone - **Sunrise/sunset support** โ€” location-aware scheduling via city search **Platforms:** Windows 10+ (x64) ยท Linux x64 ยท Linux ARM64 (Raspberry Pi 4/5) ### ๐Ÿ  Homebridge Plugin - All Wemo devices registered as **HomeKit switches** - Custom Homebridge UI panel with five tabs: - **Devices** โ€” live device list with on/off toggle - **DWM Rules** โ€” full scheduling CRUD (same rule types as desktop) - **Device Rules** โ€” native firmware rule management - **Settings** โ€” city/location search for sunrise/sunset times - **Help** โ€” built-in documentation - **Scheduler health monitor** โ€” green/amber/red status bar shows scheduler state in real time - **Catch-up on restart** โ€” rules missed while Homebridge was restarting fire automatically on startup - No cloud required; all communication is local SOAP/UPnP --- ## Supported Devices Tested and confirmed working: | Model | Name | |---|---| | WLS0403 | Wemo 3-Way Smart Switch | | WLS040 | Wemo Light Switch | | F7C030 | Wemo Light Switch (older) | | F7C027 | Wemo Switch / Mini Smart Plug | | F7C029 | Wemo Insight Smart Plug | | F7C063 | Wemo Mini Smart Plug v2 | > **Note:** Wemo Dimmer V2 (WDS060) with newer RTOS firmware does not expose the `FetchRules`/`StoreRules` UPnP service. These devices are detected and support on/off control but native firmware rule editing is unavailable. --- ## Architecture ### Wemo Protocol All communication is local UPnP/SOAP over HTTP โ€” no Belkin cloud: | Operation | Method | |---|---| | Discovery | SSDP M-SEARCH multicast to `239.255.255.250:1900` | | Device info | HTTP GET `http://:/setup.xml` | | On/Off | UPnP SOAP `SetBinaryState` / `GetBinaryState` | | State query | UPnP SOAP `GetBinaryState` | | Native rules | UPnP SOAP `FetchRules` / `StoreRules` (ZIP + SQLite) | ### Native Firmware Rules Database The Wemo device stores rules in a SQLite database inside a ZIP archive: 1. `FetchRules` returns a URL to download the ZIP 2. The ZIP contains `temppluginRules.db` (SQLite) 3. Modify the SQLite, re-ZIP, base64-encode 4. `StoreRules` uploads the encoded database > **Critical:** `StoreRules` requires the base64 body wrapped in entity-encoded CDATA: > `<![CDATA[base64data]]>` > Standard XML builders cannot produce this format โ€” the SOAP envelope must be hand-crafted. ### DWM Scheduling Engine The DWM (Dibby Wemo Manager) scheduler is a Node.js process that: - Loads rules from a JSON store - Ticks every **30 seconds**, reloading rules on each tick (live edits take effect without restart) - Pre-schedules events within a **65-second look-ahead window** - On startup, catches up any rules missed within the last **10 minutes** - Runs a **health monitor** every 10 seconds for AlwaysOn and Trigger rules - Writes a **heartbeat** to the store on every tick so the UI can show scheduler status ### Shared Core `packages/wemo-core` contains shared constants and utilities (day numbers, time conversions, sunrise/sunset calculator) used by both the desktop app and the Homebridge plugin without duplication. It is an internal npm workspace package, not published to npm. --- ## Development ### Prerequisites - Node.js โ‰ฅ 18 - npm โ‰ฅ 9 ### Install all dependencies ```bash # From repo root โ€” installs all workspaces npm install ``` ### Desktop App โ€” dev mode ```bash cd apps/desktop npm run dev ``` ### Desktop App โ€” build ```bash # Windows installer + portable exe cd apps/desktop npm run build:win # Linux AppImage + .deb + .rpm (x64) cd apps/desktop npm run build:linux # Linux ARM64 (Raspberry Pi) cd apps/desktop npm run build:linux:arm64 # Windows x64 + Linux x64 in one command cd apps/desktop npm run build:all ``` Output in `apps/desktop/dist/`. ### Homebridge Plugin โ€” install locally ```bash cd packages/homebridge-plugin npm install -g . ``` Then restart Homebridge. --- ## Release Assets Each [GitHub Release](../../releases) includes: | File | OS | Description | |---|---|---| | `Dibby Wemo Manager Setup 2.0.0.exe` | Windows | NSIS installer (recommended) | | `Dibby Wemo Manager 2.0.0.exe` | Windows | Portable executable | | `Dibby Wemo Manager-2.0.0.AppImage` | Linux x64 | Universal AppImage | | `dibby-wemo-manager_2.0.0_amd64.deb` | Linux x64 | Debian / Ubuntu package | | `dibby-wemo-manager-2.0.0.x86_64.rpm` | Linux x64 | Fedora / RHEL package | | `Dibby Wemo Manager-2.0.0-arm64.AppImage` | Linux ARM64 | Raspberry Pi 4/5 AppImage | | `dibby-wemo-manager_2.0.0_arm64.deb` | Linux ARM64 | Raspberry Pi OS package | | `homebridge-dibby-wemo-1.0.0.tgz` | Any | Homebridge plugin npm package | --- ## License MIT โ€” see [LICENSE](LICENSE) --- *Built by SRS IT. All Wemo communication is local โ€” your device data never leaves your network.*