RAMSES ESP

Development

Contributing to the app, or adapting it yourself.

Getting started

You need Node.js 22, the Homey CLI and, for homey app run, Docker.

npm install
CommandWhat it does
npm testTests only
npm run checkLint, type check, tests with coverage and manifest validation, exactly what CI runs
npm run lint:fixFix lint errors automatically
homey app runRun the app on your Homey temporarily, with live logs
homey app installInstall the app on your Homey permanently

CI requires at least 85 % lines, 80 % branches and 85 % functions coverage over lib/.

Structure

The code is organised in layers. Everything below lib/homey runs under plain node --test, without Homey.

lib/
  ramses/    protocol: Packet, decoders per code, commands, brand schemes, BusScanner, binding
  mqtt/      connection: BrokerConfig, GatewayConnection, BrokerProbe
  domain/    models: Gateway, FanUnit, Remote, ClimateSensor, VirtualSensor, events
  homey/     adapters: GatewayRegistry, capabilities, flow cards, pairing, web API
drivers/     thin Homey drivers and devices
settings/    the bus view
widgets/     the dashboard widget

Dependencies (MQTT connect, clock, timers, send function) are injected. That way the tests drive the whole chain with fakes, from an MQTT message to a flow trigger.

A new brand or a new code

  • Brand: add a FanScheme in lib/ramses/FanScheme.js and a value to the Brand dropdown in drivers/fan/driver.settings.compose.json.
  • Message code: add a decoder in lib/ramses/decoders.js and, if it yields a new reading, a binding in lib/homey/ReadingCapabilities.js.
  • Write a test with a real frame from the bus.

Translations

The app is bilingual (English and Dutch). Texts are in locales/en.json and locales/nl.json, and in the *.compose.json files. Homey placeholders are __id__, not {{id}}.

This documentation

The site lives in website/ and is built with Fumadocs (Next.js, static export). The English pages are in website/content/docs/en/, the Dutch ones in website/content/docs/nl/, under the same file names so the language switcher keeps you on the same page. The order of the sidebar is in each folder's meta.json; the landing page is website/app/[lang]/(home)/page.tsx. View it locally:

cd website
npm install
npm run dev     # http://localhost:3000/en/
npm run build   # static export to out/
In a pageWhat it gives
<Callout type="idea"> / "info" / "warn" / "error"A tip, background, note or warning box
<Mermaid chart={...} />A diagram that follows light and dark mode
<DeviceImage device="gateway" alt="..." />A device illustration next to the text
<DeviceIcon device="remote" />A small device illustration, for tables
[label](./gateway.mdx#anchor)A link to another page in the same language

Every push to main that touches website/ builds the site and publishes it to the gh-pages branch (.github/workflows/docs.yml). GitHub Pages serves that branch: Settings → Pages → Deploy from a branch → gh-pages / / (root). The old Jekyll URLs redirect to the new pages.

Edit on GitHub

On this page