Listens to OpenMQTTGateway MQTT messages, filters suspicious weather-sensor readings, caches recent valid data, forwards approved payloads back to MQTT, and exposes runtime state over HTTP.
Additional docs:
- docs/architecture.md for component boundaries and message flow.
- docs/http-api.md for REST endpoints.
- AGENTS.md for AI-agent workflow and repo conventions.
Requires Node.js >=20.19.0.
- Install dependencies with
npm install. - Compile and type-check with
npm run build.
- Run the full test suite with
npm test. - Run one spec with
npx mocha path/to/file.spec.ts. - Run line-level all-source coverage with
npm run test:coverage. - Generate machine-readable coverage artifacts with
npm run test:coverage:json.
- Copy .env.example to
.env. PowerShell:Copy-Item .env.example .env - Set the required MQTT environment variables:
MQTT_HOST: broker URL such asmqtt://hostnameMQTT_USER: broker usernameMQTT_PASS: broker passwordMQTT_SRC_TOPIC: source topic prefix or wildcard pattern without a trailing/#MQTT_DST_TOPIC: destination topic prefix or wildcard pattern without a trailing/#
- Start the service with
npm start. - Query the HTTP API on port
2998after startup.
Notes:
- Runtime configuration is loaded from
.envby src/services/configuration.ts. MQTT_SRC_TOPICandMQTT_DST_TOPICare normalized to end in/#automatically.- MQTT message history is stored in the local SQLite database under the
datadirectory.
Feature requests and bug reports belong in GitHub Issues, not in this README.