github KristianP26/ble-scale-sync v1.1.0

latest releases: v1.15.0, v1.14.1, v1.14.0...
3 months ago

What's New

Multi-User Weight Matching

  • Configure multiple users in config.yaml with individual weight ranges
  • 4-tier matching priority: exact range → LKW tiebreak → closest LKW → strategy fallback
  • Drift detection warns when weight approaches range boundaries (outer 10%)
  • last_known_weight auto-updated in config.yaml after each measurement (debounced, atomic write, comments preserved)
  • Configurable unknown_user strategy: nearest, log, or ignore

Unified Config System

  • New config.yaml as primary configuration (.env still supported as fallback)
  • Zod schema validation with human-readable error messages
  • ${ENV_VAR} references in YAML values for secrets
  • npm run validate CLI for config validation
  • Environment overrides (CONTINUOUS_MODE, DRY_RUN, DEBUG, SCAN_COOLDOWN, SCALE_MAC, NOBLE_DRIVER) always apply on top of YAML

Per-User Exports

  • MQTT: publishes to {topic}/{slug}, per-user HA device discovery + LWT
  • InfluxDB: adds user={slug} tag to line protocol
  • Webhook: adds user_name + user_slug fields to JSON payload
  • Ntfy: prepends [{name}] to notification, appends drift warning
  • Garmin: per-user config via user-level exporters section

Exporter Registry

  • Self-describing exporter schemas with field definitions and display metadata
  • Factory pattern for creating exporters from config.yaml entries
  • Per-user exporter resolution (user-level overrides global, deduped by type)

Infrastructure

  • scanAndReadRaw() BLE layer for match-before-compute flow
  • SIGHUP config reload between scan cycles (Linux/macOS)
  • Heartbeat file (/tmp/.ble-scale-sync-heartbeat) for Docker health checks
  • Exporter cache per user slug, cleared on SIGHUP reload

Testing

  • 894 tests across 49 test files
  • E2E verified with real Renpho scale on Windows + Raspberry Pi
  • All 5 exporters tested with live services (Garmin Connect, HiveMQ, InfluxDB Cloud, ntfy.sh, webhook.site)

Breaking Changes

None — fully backwards compatible. Single-user .env configuration continues to work unchanged.

Don't miss a new ble-scale-sync release

NewReleases is sending notifications on new releases.