The Use of the MQTT Protocol in Measurement, Monitoring and Control Systems as Part of the Implementation of Energy Management Systems

The Internet of Things (IoT) market is currently one of the most dynamically developing branches of technology. The increase in the number of devices and their capabilities make them present in every area of life—from construction to medicine. Due to flourishing industrial automation and wireless connectivity, all devices in buildings can be networked, which significantly improves comfort, energy efficiency, and thus significantly affects the promotion of the idea of sustainable development. This article proposes to build a system to monitor an energy management system by collecting information about temperature, humidity and pressure. The concept of the system is based on the Message Queue Telemetry Transport (MQTT) communication protocol, a wireless network, an ESP8266 microcontroller and a BME280 sensor. Sensors and actuators are connected to the ESP8266, and a Mosquitto-based MQTT broker is placed on the RPi and set up for remote monitoring and control. An innovative approach to the use of database systems dedicated to time series on the example of InfluxDB and data visualization in the Grafana environment was also presented. The proposed system was built in laboratory conditions in 2022 and used to monitor and control energy consumption in real time, depending on Polish weather conditions.