{"_id":"@davidterranova/homebridge-rika-firenet","_rev":"4-b95f720d917b91415a9d8f3d1cff1933","name":"@davidterranova/homebridge-rika-firenet","dist-tags":{"beta":"1.0.0","latest":"1.0.3"},"versions":{"1.0.0":{"name":"@davidterranova/homebridge-rika-firenet","version":"1.0.0","keywords":["homebridge-plugin","rika","firenet","pellet","stove","thermostat","homekit"],"author":{"name":"David Terranova"},"license":"MIT","_id":"@davidterranova/homebridge-rika-firenet@1.0.0","maintainers":[{"name":"davidterranova","email":"davidp.terranova@gmail.com"}],"homepage":"https://github.com/davidterranova/homebridge-rika-firenet#readme","bugs":{"url":"https://github.com/davidterranova/homebridge-rika-firenet/issues"},"dist":{"shasum":"8b34e8b49dea308049e092bafec75ba84ebbe4b2","tarball":"https://registry.npmjs.org/@davidterranova/homebridge-rika-firenet/-/homebridge-rika-firenet-1.0.0.tgz","fileCount":52,"integrity":"sha512-EUnwuK9j4G3vanj7nUPvmHkQfM8lvTTuJNo2ukKfABxilPl7tz2Jf/YpsFz8cHTdzkBEfZyKzY0VhNDIQrr4cw==","signatures":[{"sig":"MEUCIGRUyMmvwPWzGf5ucJqsnMUAd9LnP2pRSFcXB4ssGrTnAiEAyiIUEEos3WzzZGG7n/PiBSuCgjco/kgcKwuKP3Ck5rU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107797},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":"^22.12.0 || ^24.0.0","homebridge":"^1.8.0 || ^2.0.0"},"exports":"./dist/index.js","gitHead":"0bbd92d86698ab975dfeea6d77b2cd33a3fb15fc","scripts":{"lint":"eslint src test --max-warnings 0","test":"vitest run","build":"tsc","clean":"rimraf dist","watch":"tsc --watch","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run lint && npm run build","test:integration":"vitest run --config vitest.integration.config.ts"},"_npmUser":{"name":"davidterranova","email":"davidp.terranova@gmail.com"},"repository":{"url":"git+https://github.com/davidterranova/homebridge-rika-firenet.git","type":"git"},"_npmVersion":"11.11.0","description":"Memory-efficient Homebridge v2 plugin to control RIKA Firenet pellet stoves as a HomeKit thermostat.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.17.0","rimraf":"^6.0.1","vitest":"^2.1.8","@eslint/js":"^9.17.0","homebridge":"^2.0.0","typescript":"^5.7.2","@types/node":"^22.10.0","hap-controller":"^0.10.2","typescript-eslint":"^8.18.0","@vitest/coverage-v8":"^2.1.8","@typescript-eslint/parser":"^8.18.0","@typescript-eslint/eslint-plugin":"^8.18.0"},"_npmOperationalInternal":{"tmp":"tmp/homebridge-rika-firenet_1.0.0_1780498450240_0.7528318677259844","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@davidterranova/homebridge-rika-firenet","version":"1.0.1","keywords":["homebridge-plugin","rika","firenet","pellet","stove","thermostat","homekit"],"author":{"name":"David Terranova"},"license":"MIT","_id":"@davidterranova/homebridge-rika-firenet@1.0.1","maintainers":[{"name":"davidterranova","email":"davidp.terranova@gmail.com"}],"homepage":"https://github.com/davidterranova/homebridge-rika-firenet#readme","bugs":{"url":"https://github.com/davidterranova/homebridge-rika-firenet/issues"},"dist":{"shasum":"ba1a8aa09b5b6520a128fcdfb7bf6094884e9135","tarball":"https://registry.npmjs.org/@davidterranova/homebridge-rika-firenet/-/homebridge-rika-firenet-1.0.1.tgz","fileCount":52,"integrity":"sha512-lwsGvwUhx6tKsSgqL6M3jcY4TBNgEmKkm4gyhxMffyCIY/4bUZYgDPl4500Lp0WAvTky4nLVtG2icAeOK/RK0Q==","signatures":[{"sig":"MEUCIQCj8MAjyn/SEHVlxBEkOEsTag62ubAmger18Bc3BKEYjwIgIaHU2jylvKgxcG8gumbpVIZ+w5feNenzq2ZaoNy5RsQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107699},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":"^22.12.0 || ^24.0.0","homebridge":"^2.0.0"},"exports":"./dist/index.js","gitHead":"d7394f64eb397cf808f357cc566748e3b9fbdb47","scripts":{"lint":"eslint src test --max-warnings 0","test":"vitest run","build":"tsc","clean":"rimraf dist","watch":"tsc --watch","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run lint && npm run build","test:integration":"vitest run --config vitest.integration.config.ts"},"_npmUser":{"name":"davidterranova","email":"davidp.terranova@gmail.com"},"repository":{"url":"git+https://github.com/davidterranova/homebridge-rika-firenet.git","type":"git"},"_npmVersion":"11.11.0","description":"Memory-efficient Homebridge v2 plugin to control RIKA Firenet pellet stoves as a HomeKit thermostat.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.17.0","rimraf":"^6.0.1","vitest":"^2.1.8","@eslint/js":"^9.17.0","homebridge":"^2.0.0","typescript":"^5.7.2","@types/node":"^22.10.0","hap-controller":"^0.10.2","typescript-eslint":"^8.18.0","@vitest/coverage-v8":"^2.1.8","@typescript-eslint/parser":"^8.18.0","@typescript-eslint/eslint-plugin":"^8.18.0"},"_npmOperationalInternal":{"tmp":"tmp/homebridge-rika-firenet_1.0.1_1780509053146_0.2190354348622947","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@davidterranova/homebridge-rika-firenet","version":"1.0.2","keywords":["homebridge-plugin","rika","firenet","pellet","stove","thermostat","homekit"],"author":{"name":"David Terranova"},"license":"MIT","_id":"@davidterranova/homebridge-rika-firenet@1.0.2","maintainers":[{"name":"davidterranova","email":"davidp.terranova@gmail.com"}],"homepage":"https://github.com/davidterranova/homebridge-rika-firenet#readme","bugs":{"url":"https://github.com/davidterranova/homebridge-rika-firenet/issues"},"dist":{"shasum":"ff2c14319b6803a61569e3300182bc03457eddf4","tarball":"https://registry.npmjs.org/@davidterranova/homebridge-rika-firenet/-/homebridge-rika-firenet-1.0.2.tgz","fileCount":52,"integrity":"sha512-RQ+99whGOBXMDgMF4n7eqHJTBNtlTZblbSh44qGpf701VfqVKrVb71pyiNU3zRcSHEdKjQU1LCDHGcj9Utxgsw==","signatures":[{"sig":"MEUCIQDFW2I7bOcPaC7tNUkZlXiDqlMiZUi4LCdQAeKo8PSy/wIgPPWrgIMml5DxOk61/enhSsHY7XtxNZLnqA8M8rngd/Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107699},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":"^22.12.0 || ^24.0.0","homebridge":"^2.0.0"},"exports":"./dist/index.js","gitHead":"c88f8972b2de0511868639b2b25c243b1e6e7e98","scripts":{"lint":"eslint src test --max-warnings 0","test":"vitest run","build":"tsc","clean":"rimraf dist","watch":"tsc --watch","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run lint && npm run build","test:integration":"vitest run --config vitest.integration.config.ts"},"_npmUser":{"name":"davidterranova","email":"davidp.terranova@gmail.com"},"repository":{"url":"git+https://github.com/davidterranova/homebridge-rika-firenet.git","type":"git"},"_npmVersion":"11.11.0","description":"Memory-efficient Homebridge v2 plugin to control RIKA Firenet pellet stoves as a HomeKit thermostat.","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.17.0","rimraf":"^6.0.1","vitest":"^4.1.8","@eslint/js":"^9.17.0","homebridge":"^2.0.0","typescript":"^5.7.2","@types/node":"^22.10.0","hap-controller":"^0.10.2","typescript-eslint":"^8.18.0","@vitest/coverage-v8":"^4.1.8","@typescript-eslint/parser":"^8.18.0","@typescript-eslint/eslint-plugin":"^8.18.0"},"_npmOperationalInternal":{"tmp":"tmp/homebridge-rika-firenet_1.0.2_1780519805596_0.558189892882972","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@davidterranova/homebridge-rika-firenet","version":"1.0.3","description":"Memory-efficient Homebridge v2 plugin to control RIKA Firenet pellet stoves as a HomeKit thermostat.","license":"MIT","type":"module","author":{"name":"David Terranova"},"homepage":"https://github.com/davidterranova/homebridge-rika-firenet#readme","repository":{"type":"git","url":"git+https://github.com/davidterranova/homebridge-rika-firenet.git"},"bugs":{"url":"https://github.com/davidterranova/homebridge-rika-firenet/issues"},"keywords":["homebridge-plugin","rika","firenet","pellet","stove","thermostat","homekit"],"engines":{"homebridge":"^2.0.0","node":"^22.12.0 || ^24.0.0"},"main":"dist/index.js","exports":"./dist/index.js","publishConfig":{"access":"public"},"scripts":{"build":"tsc","clean":"rimraf dist","prepublishOnly":"npm run lint && npm run build","lint":"eslint src test --max-warnings 0","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:integration":"vitest run --config vitest.integration.config.ts","watch":"tsc --watch"},"devDependencies":{"@eslint/js":"^9.17.0","@types/node":"^22.10.0","@typescript-eslint/eslint-plugin":"^8.18.0","@typescript-eslint/parser":"^8.18.0","@vitest/coverage-v8":"^4.1.8","eslint":"^9.17.0","hap-controller":"^0.10.2","homebridge":"^2.0.0","rimraf":"^6.0.1","typescript":"^5.7.2","typescript-eslint":"^8.18.0","vitest":"^4.1.8"},"gitHead":"9a405cd5de0527dd453235561278614d3a4e8cb6","types":"./dist/index.d.ts","_id":"@davidterranova/homebridge-rika-firenet@1.0.3","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-eZB/i/ez8pCvZVlANjmKKJAZfn8m35C/dN5/mTPs0I4PjxgXkuYtX6k4Gdk3QAMTw/8qAxCmuyA9hCCLLlFuOA==","shasum":"a6f713b59e8d42e18ece550867c3ea6ecc1f0f2f","tarball":"https://registry.npmjs.org/@davidterranova/homebridge-rika-firenet/-/homebridge-rika-firenet-1.0.3.tgz","fileCount":52,"unpackedSize":107518,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDPJ7mh8ru951H24bANuHmQa4VQueY2EZFBW5INn2w6+AiEA0MtpNsiPehhlwlGe+tEXubhpdW5OBcYlrUcCGpMFfWM="}]},"_npmUser":{"name":"davidterranova","email":"davidp.terranova@gmail.com"},"directories":{},"maintainers":[{"name":"davidterranova","email":"davidp.terranova@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/homebridge-rika-firenet_1.0.3_1780521284094_0.094405791017657"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-03T14:54:10.077Z","modified":"2026-06-03T21:14:44.377Z","1.0.0":"2026-06-03T14:54:10.385Z","1.0.1":"2026-06-03T17:50:53.274Z","1.0.2":"2026-06-03T20:50:05.716Z","1.0.3":"2026-06-03T21:14:44.266Z"},"bugs":{"url":"https://github.com/davidterranova/homebridge-rika-firenet/issues"},"author":{"name":"David Terranova"},"license":"MIT","homepage":"https://github.com/davidterranova/homebridge-rika-firenet#readme","keywords":["homebridge-plugin","rika","firenet","pellet","stove","thermostat","homekit"],"repository":{"type":"git","url":"git+https://github.com/davidterranova/homebridge-rika-firenet.git"},"description":"Memory-efficient Homebridge v2 plugin to control RIKA Firenet pellet stoves as a HomeKit thermostat.","maintainers":[{"name":"davidterranova","email":"davidp.terranova@gmail.com"}],"readme":"# homebridge-rika-firenet\n\n[![Homebridge](https://img.shields.io/badge/Homebridge-v2-blue)](https://homebridge.io)\n[![Node](https://img.shields.io/badge/node-22%20%7C%2024-green)](https://nodejs.org)\n\nA memory-efficient, [Homebridge v2](https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0) compatible plugin that exposes a [RIKA Firenet](https://www.rika-firenet.com) pellet stove to Apple Home (and any Matter platform bridged by Homebridge) as a HomeKit **thermostat**.\n\nIt is a modern, ESM, fully type-checked and unit-tested implementation built for Homebridge v2 with a focus on low memory usage.\n\n## Features\n\n- **Thermostat** – current room temperature and target (Comfort) temperature.\n- **Operating modes** mapped onto the HomeKit thermostat state:\n  - **Off** – stove powered off.\n  - **Heat** – RIKA *Comfort* mode (the stove heats to reach the target temperature).\n  - **Auto** – RIKA *Automatic* mode (the stove follows its configured heating-time schedule).\n- **Manual mode** – exposed as a *Heating Power* fan: turning it on switches the stove to Manual mode, and the rotation speed sets the heating power in percent.\n- **Status & faults** – errors (out of pellets, ignition failure, offline, ...) are surfaced through the thermostat's *Status Fault* characteristic, and a cleaning request is surfaced via a *Filter Maintenance* service.\n\n### HomeKit characteristics\n\n| Service | Characteristic | RIKA mapping |\n| --- | --- | --- |\n| Thermostat | CurrentTemperature | `sensors.inputRoomTemperature` |\n| Thermostat | TargetTemperature | `controls.targetTemperature` (Comfort) |\n| Thermostat | TargetHeatingCoolingState | Off / Heat (Comfort) / Auto (Automatic) |\n| Thermostat | CurrentHeatingCoolingState | Heat while igniting/running, otherwise Off |\n| Thermostat | StatusFault | error / offline / out-of-pellets |\n| Fan (Heating Power) | Active + RotationSpeed | Manual mode + `controls.heatingPower` |\n| Filter Maintenance | FilterChangeIndication | cleaning/service requested |\n\n## Requirements\n\n- Homebridge `v2`.\n- Node.js `v22` or `v24`.\n- A RIKA stove with the RIKA Firenet module and an account at <https://www.rika-firenet.com>.\n\n## Installation\n\nInstall via the Homebridge UI (search for \"Rika Firenet\") or from the command line:\n\n```bash\nnpm install -g @davidterranova/homebridge-rika-firenet\n```\n\n## Configuration\n\nAdd the platform through the Homebridge UI, or manually in `config.json`:\n\n```json\n{\n  \"platforms\": [\n    {\n      \"platform\": \"RikaFirenet\",\n      \"name\": \"Rika Stove\",\n      \"email\": \"your-account@example.com\",\n      \"password\": \"your-password\",\n      \"stoveID\": \"1234567\",\n      \"pollingInterval\": 60,\n      \"minTemperature\": 14,\n      \"maxTemperature\": 28\n    }\n  ]\n}\n```\n\n| Field | Required | Default | Description |\n| --- | --- | --- | --- |\n| `email` | yes | – | Your rika-firenet.com account email. |\n| `password` | yes | – | Your rika-firenet.com account password. |\n| `stoveID` | no | auto | The numeric stove id (visible in the rika-firenet.com URL). If omitted and the account has exactly one stove, it is detected automatically. |\n| `pollingInterval` | no | `60` | Status refresh interval in seconds. RIKA recommends a minimum of 60 seconds; lower values are clamped. |\n| `minTemperature` | no | `14` | Minimum selectable target temperature (°C). |\n| `maxTemperature` | no | `28` | Maximum selectable target temperature (°C). |\n\n## How it works\n\n```\nApple Home  ⇄  Homebridge  ⇄  RikaFirenetPlatform\n                                   │\n                                   ├── RikaFirenetClient  (single session cookie, native fetch)\n                                   └── StovePoller        (single ≥60s loop, write coalescing)\n                                           │\n                                           └── StoveAccessory  →  Thermostat / Heating Power / Maintenance\n```\n\n- A **single** `RikaFirenetClient` holds one `connect.sid` session cookie and re-authenticates automatically when the session expires.\n- A **single** `StovePoller` owns the only timer, caches one in-memory status snapshot, and pushes updates to the HomeKit characteristics (no per-characteristic polling).\n- Control changes are applied optimistically and **coalesced** into a single API call; stale-revision conflicts are retried with a fresh revision.\n- All HTTP uses the built-in Node `fetch`, so there are no heavy HTTP-client dependencies.\n\n## Development\n\n```bash\nmake install         # install dependencies\nmake build           # compile TypeScript to dist/\nmake test            # run the unit tests (Vitest), plus the smoke test if creds are set\nmake coverage        # run tests with a coverage report\nmake test-integration # headless Homebridge + HAP controller end-to-end test (no credentials needed)\nmake smoke           # read-only API smoke test against a real stove (STOVE_ID, RIKA_EMAIL, RIKA_PASSWORD)\nmake lint            # eslint\nmake update          # update dependencies within package.json ranges\n```\n\nRun `make` (or `make help`) to list all available targets. The codebase favors a composable architecture: pure domain functions in `src/domain/`, a dependency-injectable API client in `src/api/`, and small composable HomeKit service modules in `src/accessory/services/`.\n\n## Testing\n\nTesting happens in five complementary layers, ordered from fastest feedback to\nthe most production-like. Full step-by-step instructions are in\n[`doc/testing.md`](doc/testing.md).\n\n1. **Unit tests** — logic only, no network, runs in CI. Covers the domain\n   mappers, the API client (mocked `fetch`), the poller (fake timers), and the\n   HomeKit service modules. Run with `make test` / `make coverage`.\n2. **API smoke test** — drives the real `RikaFirenetClient` against your stove\n   to confirm credentials and that the API field names, status codes and\n   `revision` round-trip match your stove model. Run it with `make smoke`; it\n   also runs automatically at the end of `make test` when `STOVE_ID`,\n   `RIKA_EMAIL` and `RIKA_PASSWORD` are set (and is skipped with a message\n   otherwise). This is the most valuable real-world check; see\n   [doc/testing.md](doc/testing.md#2-api-smoke-test).\n3. **Local Homebridge dev instance** — `npm link` into an isolated\n   `homebridge -D -U` instance to validate the HomeKit services, characteristics\n   and v2 (ESM) loading. See [doc/testing.md](doc/testing.md#3-local-homebridge-dev-instance).\n4. **Automated HomeKit integration test** — layer 3 with no human: a headless\n   Homebridge process loads the plugin against a mock RIKA backend and a HAP\n   controller pairs and drives the characteristics. Run with\n   `make test-integration`. See\n   [doc/testing.md](doc/testing.md#4-automated-homekit-integration-test).\n5. **Homebridge UI child bridge** — install the `npm pack` artifact and run it in\n   a child bridge: the closest match to how end users run the plugin, and a check\n   that `config.schema.json` renders correctly. See\n   [doc/testing.md](doc/testing.md#5-homebridge-ui-child-bridge).\n\nBefore releasing, work through the\n[pre-release checklist](doc/testing.md#pre-release-checklist).\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}