• Stars
    star
    106
  • Rank 325,871 (Top 7 %)
  • Language
    C++
  • Created almost 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Building Management and Control system

Building Monitoring and Control

The Building Monitoring and Control (BMaC) system consists out multiple components which all work together to allow one to monitor and control conditions within a building.

Communication between these components is performed over MQTT, requiring the use of an (existing) MQTT broker. An Influx database instance is used to register sensor data, allowing this data to be used by other services. An existing InfluxDB instance can be used, or a new one created for the BMaC system.

A graphical overview:

bmac_overview

Components

  • Command & Control server
  • Command & Control client
  • Control & Monitoring node
  • AC control service
  • OTA update service
  • Influx-MQTT service

Refactoring Notice

Notice: Be aware that the BMaC project is currently being refactored and will undergo a number of changes:

  • ESP8266-based node firmware:
    • Auto-configuration using NyanSD service discovery.
    • Update & potentially remove unused modules.
  • Merging of services:
    • The Command & Control server, AC & Influx-MQTT services are being merged into the 'Controller' service.
    • These old services will be retired after the merge completes.
  • Web-based administration panel:
    • The new BMaC Controller server will provide a web-based interface for managing BMaC nodes and other parts of a BMaC installation.

Command & Control server

This component (C&C server, or CCS) is used to register the configuration for individual nodes with. Each node can feature a different range of active sensors and actuators, which are enabled in the firmware at start-up of the node after they obtain their configuration from this server.

The C&C client is used to read out the current node configurations, update configurations and add new nodes.

Command & Control client

This client (C&C client, or CCC) is based around a graphical user interface, which displays the map of the current building layout, along with the position of each node. By selecting a node, one can see its current configuration and update it.

After creating a new node or updating an existing one, the changed configuration can be saved on the C&C server or be sent directly to the node (useful for testing purposes).

Control & Monitoring node

Also called CMN. In its current iteration these are ESP8266-based systems. Generally they are fitted into a wall- or ceiling-mounted enclosure using a custom board with the ability to mount temperature, CO2 and other sensors. They can also be in the form of a simple switch, in which case they are fitted into an electrical box, usually to replace a manual switch.

Each node runs the same firmware, yet can be configured via the CCS to only enable specific modules.

Current modules are:

  • Temperature/Humidity - Uses the Bosch BME280 sensor to read temperature, humidity and air pressure.
  • CO2 - Uses the MH-Z19 and compatible (MH-Z14) CO2 sensor's serial interface to obtain PPM levels.
  • Jura - Reads out current statistics on total number of coffee consumed for compatible Toptronic-based automatic coffee machines.
  • JuraTerm - Allows for direct control of compatible Toptronic-based coffee machines using the serial protocol over MQTT.
  • Motion - Uses compatible PIR motion sensors (e.g. the HC-SR501) with 3.3V TTL output.
  • PWM - Generates a PWM signal of variable duty, set to 1 KHz.
  • IO - Uses the MCP23008 GPIO expander to increase the number of digital GPIO pins.
  • Switch - Uses an external 2-coil latching relay to switch an input between two possible outputs and read the current setting back.

AC control service

The AC control service (accontrol, or ACCS) builds upon the CCS, CMNs as well as the data stored in the Influx database in order to control the room temperature using installed Fan Coil Units (FCUs), along with the valves in the system (both 2- and 4-pipe FCUs).

It provides a HTTP REST API along with a simple browser-based interface using which one can set the target temperature for a particular node and read out the current temperature.

OTA update service

The OTA update service (OTAU) works together with the CMN firmware to allow a CMN to update itself with a new firmware image. After the CMN receives an update trigger via its maintenance interface, it contacts a hard-coded HTTP URI to obtain the new firmware image.

The OTAU currently is a simple browser-based script using which CMNs can be added using their UID (MAC address) along with the name of the firmware image they should be downloading. When the CMN contacts the OTAU running inside a webserver, the OTAU selects the appropriate firmware image and sends it to the CMN.

Influx-MQTT service

The Influx-MQTT service (IMS) can be configured to listen on a number of MQTT topics (sensor readings) and write those to a time series in the InfluxDB instance using its HTTP(S) line protocol.

More Repositories

1

NymphCast

Audio and video casting system with support for custom applications.
C
2,406
star
2

Nodate

A light-weight framework for STM32 and other architectures written in C++.
C
136
star
3

Sarge

Simple command line argument parser for C++ and Ada.
Ada
78
star
4

MQTTCute

An advanced desktop MQTT client, suitable for binary protocol development and monitoring
C
64
star
5

NymphRPC

Versatile and fast remote procedure call library.
C++
60
star
6

LockFreeRingBuffer

Implementation of a lock-free ring buffer class.
C++
30
star
7

WildFox

Webkit-based, multi-platform and Firefox-compatible browser.
C++
26
star
8

DebounceHat

Fully isolated, input debounce Hat for Raspberry Pi, for up to 6 switches, relays and powered devices
HTML
22
star
9

Universal_Data_Share

Application to share files with in a peer-to-peer fashion. Also demonstration of the UDS protocol.
C++
20
star
10

NyanSD

Service discovery protocol and reference implementation.
C++
18
star
11

NymphMQTT

MQTT library.
C++
17
star
12

EmbeddedProgrammingWithCpp17

Code projects for the book 'Hands-On Embedded Programming with C++17' by Maya Posch
C
14
star
13

ChronoTrigger

A simple, restartable interval timer.
C++
12
star
14

FreeRTOS_HTTP_server

STM32-based FreeRTOS HTTP webserver example.
C
12
star
15

Cerflet

C++ & POCO-based web-application server.
C++
11
star
16

FreeRTOS_SCPI

SCPI server implementation for STM32 using FreeRTOS, CMSIS-RTOS and libscpi.
C
11
star
17

NymphCast-MediaServer

Media server for the NymphCast ecosystem.
C++
8
star
18

NymphCastAudio-ESP32

ESP32 version of NymphCastAudio.
C
8
star
19

ClubStatusService

Simple C++ service to monitor inputs via interrupts and update a clubroom status.
C++
7
star
20

Poco-build

Non-clunky build system for the Poco framework libraries.
C++
6
star
21

ByteBauble

Utility library that handles endianness and other common byte/bit-related operations.
C++
6
star
22

OpenPNR

Open source place & routing tool for FPGAs.
C++
4
star
23

FLR

File Level Revision system.
C++
3
star
24

LEDNip

STM32F427-based developer board with 5 channels for controlling LEDs.
C
3
star
25

HD44780_i2c

HD44780-compatible I2C adapter for 5V & 3.3V I2C buses.
HTML
3
star
26

libnymphcast

NymphCast Client Library.
C++
3
star
27

NPoCo

Nyanko Portable Components libraries.
C++
3
star
28

pcm_recorder

A simple PCM audio recorder for ESP32.
C
3
star
29

Nt

Classes based upon the Qt framework. Pronounced as 'neat'.
2
star
30

Nucleo-144_mounting

Helpful components to ease integrating Nucleo-144 boards.
OpenSCAD
2
star
31

libmosquitto

The Mosquitto client library tweaked to support MinGW and use Makefiles everywhere.
C
1
star
32

colour_analyser

Analysing colours (RGBC) with colour sensors and AVR.
C++
1
star
33

Sweet32-LLVM

LLVM backend for the Sweet32 32-bit processor.
1
star