8a5031649a
feat: add datapoint delete, show emoji icons in preview
...
- DELETE /api/datapoints/:id endpoint + frontend button
- Preview shows emoji symbols instead of [icon] text
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 03:55:35 +02:00
e760853781
refactor: migrate from node-sqlite3-wasm to better-sqlite3
...
Replace all db.run(sql, [params]) calls with db.prepare(sql).run(...params)
across all source modules and test files. Also remove the node-sqlite3-wasm
import from tests/db.test.ts and update the type annotation accordingly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 21:17:44 +02:00
25d07a6bc4
perf: throttle MQTT DB writes with 2s batched flush
...
Collect payloads in memory Map, flush to SQLite every 2 seconds
instead of on every message. Prevents DB lock and slowness with
high-volume brokers like Venus OS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:03:36 +02:00
633d098206
fix: store last_payload during MQTT topic discovery
...
The discovery message handler was missing the payload parameter,
so topics were saved without their last value.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 20:40:56 +02:00
c922762dfb
feat(postgres): add PG source manager and query scheduler (Task 11)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:56:28 +02:00
2c9d218211
feat(mqtt): add topic discovery with 30s wildcard subscribe (Task 10)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:56:22 +02:00
db3ece1862
feat(mqtt): add broker manager with connect/disconnect and message handling (Task 9)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:56:14 +02:00
aaac2bedff
feat(display): add layout manager with element CRUD (Task 8)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:56:05 +02:00
2990f9aa4d
feat(display): add display builder for ESP32 JSON + tests (Task 7)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:56:01 +02:00
47d746cf71
feat(datapoints): add datapoint manager with CRUD and transform support (Task 6)
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:55:57 +02:00
7b60fc252d
feat(middleware): add MQTT payload parser with dot-notation JSON path extraction
...
- src/modules/mqtt/payload-parser.ts: extractValue() supporting \$.field and \$.nested.deep paths
- Returns raw string when no path provided, null for invalid JSON or missing paths
- Stringifies numbers/booleans, returns JSON string for objects/arrays
- tests/payload-parser.test.ts: 19 tests covering no-path passthrough, simple/nested fields, missing paths, invalid JSON, and edge cases (null, zero, arrays)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:48:29 +02:00
0df1c523bd
feat(middleware): add datapoint transform engine with round, scale, and map support
...
- src/modules/datapoints/transforms.ts: applyTransform() supporting map (priority), scale, and round
- tests/transforms.test.ts: 17 tests covering no-transform passthrough, round precision, scale multiply, map lookup, map priority over numeric transforms, combined transforms, and edge cases
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 12:47:41 +02:00