oBeMS – Open Sourece Building / Energy Management System

oBeMS is an evolving tool. The aim is to develop an open source Building Management System which is portable, can run on cheap hardware, is extensible, and configurable.

We aren’t far down this road yet. The current code is useful for energy monitoring, but as yet controls nothing. The internal data structures however have been developed to make evolution towards the BMS goal as easy as possible.

The code is written in C++ with inter module communication by IP address and port number. Where multiple modules run on the same machine, the loopback address can be used to access other modules locally.

The following modules are currently in use.

  • ObemsGertServer –  allows the analogue inputs of a Gertboard to be read.
  • Obems1wbServer –  allows a DS18B20 temperature sensor to be read.
  • ObemsPulseServer –  this counts pulses and makes the pulse count available to other modules.
  • ObemsPulseGenerator –  this generates pulses to calibrate the system when used with pulse output sensors.
  • ObemsClientTemplate –  this module is configured to source data from various servers on the local or other machines, and process it to generate web pages locally, and / or to pass it to a database for archival storage.
  • ObemsDbServer –  allows data to be inserted into an SQL database for permanent archive, currently set up to run with PostgreSQL.
  • ObemsCgiDbViewer –  allows the viewing of daily data from the database.
  • ObemsCsvDbDumper –  allows chunks of the database to be exported as .csv files

The following modules are currently in development.

  • ObemsWatchdog –  is a Raspberry Pi specific interface to the system watchdog timer.

No doubt all the code can be improved, but what we have is relatively stable. Systems have been seen to continue operation for in excess of 200 days, only rebooting for occasional power cuts, and we have found the data collected very useful as the code stands now.

Reliability and autonomous operation are critical however, and the next stage in development is to build a version of the system with a watchdog timer that boots from a read only file system. This will automatically reboot if the system does not behave as expected, and will do so without corrupting the file system.