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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user