BACOcean is a virtual BACnet laboratory for developing, testing and troubleshooting building automation software without physical controllers, being built as an independent product in the IoTOcean portfolio. Simulated devices are designed to run on their own and answer BACnet clients over standard BACnet services, so the software under test can talk to them as it would to real controllers. The wider BACOcean project also covers BACnet discovery and data collection; this page is about the simulator.
Why virtual BACnet testing matters
BACnet software is usually tested against whatever controllers happen to be on the bench. That rarely looks like a real building. Sites have several subnets, BACnet routers, BBMDs and foreign devices, and the hardest bugs appear exactly there: a device that is not discovered across a router, a Trend Log that is read twice, a client that hangs when a controller stops answering. Reproducing these conditions with hardware is slow and expensive, and often impossible on demand.
A virtual network, layer by layer
BACOcean is designed to recreate a whole site, from the client down to the points:
- BACnet client or analytics platform Your software, a BMS front end or a data collection driver, talking standard BACnet/IP.
- Virtual BACnet network One or more simulated IP subnets, each with its own BACnet network number.
- BBMDs, routers and segments Broadcast forwarding, Foreign Device Registration and routing between network numbers, as on a real site.
- Simulated controllers Virtual devices with configurable device IDs, objects and properties.
- Sensors, actuators and Trend Logs Points whose values change over time, build up Trend Log history and can be made to fail.
Realistic values and Trend Logs
Present values are planned to come from deterministic, configurable generators, so a test run can be repeated and give the same time series. Representative scenarios include temperature and humidity sensors, fan speed, damper and valve positions, equipment status, energy consumption and alarm states. These are examples of what is meant to be configurable, not a fixed catalogue of equipment models.
Fault injection
Field problems are planned to be reproducible on purpose: devices going offline, intermittent communication, latency, packet loss, BACnet service errors, unresponsive controllers, faulty data, router or BBMD problems, and the recovery afterwards. A client can then be tested against the failures it will meet in a building, in a controlled lab.
Docker deployment and lab configuration
The simulator is designed to run in Docker, on bridge, host or MACVLAN networks, with devices getting their own IP and MAC identities where the network setup supports it. A whole lab, from devices, objects and addresses to value generators, Trend Logs and faults, is meant to be described in YAML, so a test environment can be version-controlled, shared and rebuilt.
Development status and roadmap
BACOcean is in development, and its BACnet services, topology scenarios and fault types are at different stages. None of them is presented as complete yet. The aim is to support automated integration tests and CI/CD pipelines, so BACnet software can be tested without a physical BMS laboratory. Progress will be shared in the IoTOcean Journal. If you build or integrate BACnet software and want to talk about what a lab like this should do, get in touch.