homebridge-decaid
v1.0.2
Published
Homebridge plugin exposing a Decaid-connected DE1 espresso machine as a switch, temperature sensors, and a water level sensor via Decaid's REST and WebSocket API.
Maintainers
Readme
homebridge-decaid
A Homebridge dynamic platform plugin that exposes a Decaid-connected Decent DE1 espresso machine to HomeKit:
- A switch to wake (
idle) / sleep the machine. - Temperature sensors for mix, group head, and steam temperatures.
- A water level sensor (modeled as a humidity sensor, since HomeKit has no native tank-level service), reported as a percentage of a configurable tank height.
It talks to Decaid's REST + WebSocket API (port 8080 by default): telemetry (temperatures, machine
state, water level) is streamed live over WebSocket, and the on/off switch issues a REST state-change
request. See assets/api/rest_v1.yml
and assets/api/websocket_v1.yml
in the Decaid repo for the full API contracts.
This plugin is a rewrite of homebridge-decent-advanced-rest-api
targeting Decaid's newer API (the original targets the legacy de1app REST API and is not compatible with Decaid).
Installation
Once published to npm:
sudo npm install -g homebridge-decaidThen add a decaid platform block to your Homebridge config.json (or use the Homebridge UI's plugin
settings screen, which uses config.schema.json):
{
"platform": "decaid",
"machines": [
{
"name": "Decent Espresso",
"host": "192.168.1.50:8080",
"waterTankHeight": 60
}
]
}Configuration reference
| Field | Description | Default |
|---|---|---|
| machines[].name | Accessory name shown in HomeKit | — (required) |
| machines[].host | Hostname/IP and port of the tablet running Decaid | — (required) |
| machines[].waterTankHeight | Full-tank height in mm, used to convert the live water height into a percentage | 60 |
| machines[].suppressMixTemperature | Hide the mix temperature sensor | false |
| machines[].suppressGroupTemperature | Hide the group head temperature sensor | false |
| machines[].suppressSteamTemperature | Hide the steam heater temperature sensor | false |
| machines[].suppressWaterLevel | Hide the water level sensor | false |
| reconnectDelay | Delay (ms) before retrying a dropped WebSocket connection | 2000 |
| staleAfter | Milliseconds without a telemetry frame before a sensor reports "not responding" | 5000 |
| requestTimeout | Timeout (ms) for the REST on/off request | 3000 |
waterTankHeight calibrates the percentage HomeKit shows, not the physical tank — Decaid reports the raw
water height in mm (see ws/v1/machine/waterLevels), and this plugin divides by waterTankHeight to get a
0-100% reading. Adjust it to whatever height your machine's sensor reports at a full tank.
Development
npm install
npm run lint
npm run buildSee homebridge-plugin-template and the Homebridge developer docs for background on the plugin API this is built against.
License
Apache-2.0 — see LICENSE. Adapted from homebridge-decent-advanced-rest-api, also Apache-2.0.
