Skip to content

System that manages sensors and actuators in multiple buildings across different neighborhoods, orchestrating control loops within each room while analyzing environmental data

License

Notifications You must be signed in to change notification settings

MarcoBendinelli/Smart-Building-Control-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Building Control System 🏠

The system is designed to manage sensors and actuators deployed in multiple buildings across different neighborhoods. It orchestrates simple control loops within each room of a building while collecting and analyzing long-term environmental data from available sensors. Inspiration for the data model is drawn from open datasets such as sensor.community.

Sensors installed in rooms monitor environmental data like temperature and humidity, using this information to activate commands on nearby actuators. For instance, if the temperature or humidity deviates from a comfortable range, an HVAC controller in the room is activated until the data returns to the desired range. Sensors are IoT devices, while actuators are more powerful devices capable of running a full-fledged operating system.

Check out the full report here!

Implementation

For inter-room communication, Kafka was chosen, while the sensor-actuator messaging system is implemented using MQTT. It is assumed that there is a single sensor for every actuator in the room, considering two possible types of actuators: one for temperature and one for humidity management.

The system functions as both a producer and consumer: it consumes MQTT messages sent by sensors and produces Kafka events for the Analyzer. This system acts as a Kafka consumer, receiving every message from every room of the entire system and storing it for long-term analysis.

Architecture Diagram

Design Choices

Due to sensors being unable to run a full-fledged operating system, Contiki-NG and MQTT were chosen for communication between sensors and actuators. Conversely, Kafka was selected for communication between actuators and a central server collecting all data. In the proposed version, only one broker and one partition are used, serving as a central processing unit for every building. In case of massive data, the project can be easily scaled to include more brokers and computing units.

Team members

Name and Surname Github
Matteo Beltrante @Beltrante
Marco Bendinelli @MarcoBendinelli
Simone Berasi @SimoneBerasi

Guide

IoT device

First Mosquitto setup

In your Client machine (VM - Ubuntu) modify the Mosquitto configuration file:

cd /etc/mosquitto
sudo nano mosquitto.conf

And add the following lines in the bottom of the file:

  connection bridge-01
  address mqtt.neslab.it:3200
  topic # out 0
  topic # in 0

Save, Exit and Restart your machine.

Start your IoT device

Go in the correct folder Compile your code:

make TARGET=native

Run your code:

sudo ./IoT-device.native
  • Note1: The sudo command is necessary to run the code inside your network.
  • Note2: The mote publishes a reading every 10 seconds, if you want to change such behaviour, change the number at line 86: #define DEFAULT_PUBLISH_INTERVAL (10 * CLOCK_SECOND)
  • Note3: Look at the project-conf.h file for changing the publish topic

Simulation with Cooja

Use the Border-Router to communicate with the Broker outside Cooja

More info

  • The IoT device will start to publish to a public broker, in order to receive the readings you must connect to such broker and you must subscribe to the correct topic. More about topics is well written here: http://www.steves-internet-guide.com/understanding-mqtt-topics/
  • Thanks the bridge mode, the IoT devices publish to the local broker inside your machine and the local broker automatically forwards the messages to the public one.

About

System that manages sensors and actuators in multiple buildings across different neighborhoods, orchestrating control loops within each room while analyzing environmental data

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published