feat: add ioBroker REST API integration

- New iobroker_sources + iobroker_states tables
- Source manager with discover, test, CRUD
- State poller (10s interval, getBulk endpoint)
- REST API routes under /api/iobroker
- Frontend page with search + pagination
- Sidebar link, app route

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 05:13:23 +02:00
co-authored by Claude Opus 4.6
parent e6b366862c
commit e76082df92
14 changed files with 863 additions and 0 deletions
+4
View File
@@ -4,6 +4,7 @@ import { createApp } from './api/index';
import { connectAllEnabledBrokers } from './modules/mqtt/broker-manager';
import { connectAllEnabledSources } from './modules/postgres/source-manager';
import { startAllQueryTimers } from './modules/postgres/query-scheduler';
import { startAllPollers } from './modules/iobroker/state-poller';
const PORT = process.env.PORT ? parseInt(process.env.PORT) : 4000;
const DB_PATH = process.env.DB_PATH ?? './display.db';
@@ -32,6 +33,9 @@ async function main(): Promise<void> {
await connectAllEnabledSources();
startAllQueryTimers();
// Start ioBroker state pollers for all enabled sources
startAllPollers();
// Create and start Express app
const app = createApp();