Hobby Project / Open Source / Built in Rust

An open-source building management system, built for fun.

After working with a few different BAS platforms, I wanted to understand the parts I'd never normally get to touch — the protocol layer, the alarm engine, the scheduler internals. Building one from scratch seemed like the best way to learn. OpenCrate is that project.

OpenCrate BMS
OpenCrate floor plan view with zone temperatures and equipment overlays
BACnet/IP· BACnet/SC· MS/TP· Modbus TCP· Modbus RTU· MQTT· Alarms· Schedules· Trends· Logic Engine· Floor Plans· Dashboards· Commissioning· REST API· WebSocket· COV Subscriptions· Priority Writes· Device Discovery· Reports· Weather· Backup & Restore· User Auth· Audit Log· Node Hierarchy· Event Bus· Block Reads· PID Control· Alarm Routing· BACnet/IP· BACnet/SC· MS/TP· Modbus TCP· Modbus RTU· MQTT· Alarms· Schedules· Trends· Logic Engine· Floor Plans· Dashboards· Commissioning· REST API· WebSocket· COV Subscriptions· Priority Writes· Device Discovery· Reports· Weather· Backup & Restore· User Auth· Audit Log· Node Hierarchy· Event Bus· Block Reads· PID Control· Alarm Routing·

Turns out a BAS needs
a lot of features.

01

Multi-Protocol

BACnet/IP, BACnet/SC, MS/TP, Modbus TCP/RTU. Auto-discovery, COV subscriptions, priority writes, block reads.

02

Alarms & Routing

High/low limit, deadband, intrinsic alarms. Route notifications to email, SMS, or webhooks. Shelving for maintenance windows. Escalation tiers.

03

Scheduling

Weekly schedules with exception overrides. Syncs to and from BACnet Schedule objects on controllers. Calendar support for holidays.

04

Trend Logging

Interval and COV history collection with auto-downsampling across four storage tiers. Backfill from BACnet TrendLogs. Export to CSV.

05

Logic Engine

A visual block editor that compiles to scripts. PID loops, timers, math blocks, comparisons. Wire them together and hit run.

06

Commissioning

Auto-generates a checklist for every device. Verify reads, writes, alarms, and schedules point by point. Sign off when you're done. Full audit trail.

07

MQTT & Reporting

Publish live data to MQTT brokers for Grafana, InfluxDB, or Home Assistant. Scheduled HTML reports for energy, alarms, comfort, and runtime.

08

Auth & Audit

User accounts with admin, operator, and viewer roles. Every write, acknowledgment, and config change gets logged.

One Rust binary.
That's the whole thing.

Protocols

  • BACnet IP, SC, MS/TP, BBMD
  • Modbus TCP + RTU with block reads
  • MQTT Publish values, alarms, status
  • Extensible ProtocolDriver trait for adding more

Data

  • Site / Space / Equip / Point hierarchy
  • Event bus — no polling, everything reacts
  • SQLite everywhere — WAL mode, zero config
  • Protocol-agnostic device discovery

Automation

  • Alarm engine — threshold + intrinsic
  • Schedule engine — weekly + exceptions
  • Logic engine — visual blocks to Rhai
  • History engine — 4-tier auto storage
327+ tests
1 binary
$0 forever
<50MB memory

What's done and what's next.

Coming soon.

Getting close to a first public release. If you'd like to know when it's available, leave your email below.

No spam. One email when it ships.