How bems2026/bems works
iBEMS is a Raspberry Pi–hosted building energy management system. Its main path runs from LAN smart devices through a Node-RED bridge and authenticated proxy to the browser for live monitoring and control; a separate ingest daemon samples readings into Postgres for history and reporting. Site declarations provide the device and circuit model. The dashboard also supports enrolment, automation, load shedding, analytics, reports, and building-plan configuration. Several backend and UI subsystems are represented from README capabilities and indexed references; unsampled implementation details are not inferred.
Main entry points: App.tsx Dashboard app · node-red-bridge Node-RED bridge · ingest.mjs History ingestion · ReportsPage.tsx Reports
Components 23
Site and devices
- Site declarations
shared/sites/mmsu-nberic-care/site.mjs - Device registry
shared/registry.mjs
Bridge and services
- Node-RED bridge
node-red-bridge - Mock bridge
mock-bridge/server.mjs - Authenticated proxy
server/proxy.mjs - Live payload builder
shared/buildLatest.mjs - History ingestion
server/ingest.mjs - Reading shaping
server/shapeRows.mjs - Sealed archive
server/archiveDb.mjs
Dashboard runtime
- Dashboard app
src/App.tsx - Live connection
src/hooks/useLiveConnection.ts - Bridge client
src/lib/bridgeClient.ts
Building operations
- Overview
src/components/overview/OverviewPage.tsx - Device control
src/components/control/ControlPage.tsx - Fleet management
src/components/devices/DevicesView.tsx - Automation
src/components/automation/AutomationPage.tsx - Settings
src/components/settings/SettingsPage.tsx
Energy insights
- Analytics
src/components/analytics/AnalyticsPage.tsx - Reports
src/components/reports/ReportsPage.tsx - Report data
src/components/reports/useReportData.ts
Other components
- Building operator
- LAN smart devices
- Postgres history
Connections 27
- Building operator → Dashboard app: uses
README.md - LAN smart devices → Node-RED bridge: send readings
README.md - Node-RED bridge → Live payload builder: builds payload
README.md - Live payload builder → Mock bridge: shared transform
README.md - Node-RED bridge → Authenticated proxy: serves live data
README.md - Authenticated proxy → Bridge client: proxies requests
README.md - Bridge client → Live connection: connects live
src/hooks/useLiveConnection.ts - Live connection → Dashboard app: updates stores
src/hooks/useLiveConnection.ts - Node-RED bridge → History ingestion: polled readings
README.md - History ingestion → Reading shaping: shapes readings
server/ingest.mjs - History ingestion → Postgres history: upserts history
server/ingest.mjs - History ingestion → Sealed archive: seals streams
server/ingest.mjs - Site declarations → Device registry: selects site
README.md - Dashboard app → Overview: routes to
src/App.tsx - Dashboard app → Device control: routes to
src/App.tsx - Dashboard app → Fleet management: routes to
src/App.tsx - Dashboard app → Automation: routes to
src/App.tsx - Dashboard app → Analytics: routes to
src/App.tsx - Dashboard app → Reports: routes to
src/App.tsx - Dashboard app → Settings: routes to
src/App.tsx - Reports → Report data: loads report data
- Building operator → Device control: commands devices
README.md - Building operator → Fleet management: manages fleet
README.md - Building operator → Automation: sets schedules
README.md - Building operator → Analytics: reviews energy
README.md - Building operator → Reports: exports reports
README.md - Building operator → Settings: configures site
README.md