## 2 Problem Description--Energy Monitoring in Industries
It employed an ESP8266 microcontroller within the WeMos D1 mini platform to transmit data via Wi-Fi to an MQTT broker, enabling remote power consumption tracking. Their study highlighted the potential of IoT-based monitoring for real-time energy insights, remote access, and improved energy efficiency. In another study, [PERSON] et al. [16] developed an IoT-based smart energy meter designed to automate electricity monitoring while improving accuracy and efficiency. Their system incorporated an Arduino Uno with an optical sensor to detect electric meter pulses and employed a wireless sensor network for automated meter readings via a smartphone application. Key components included a controller, an NB-IoT communication module, and cloud integration, enabling real-time data transmission and remote access. The system allowed utility providers to track energy consumption, automate billing, and remotely disconnect power in cases of non-payment, reducing human intervention and minimizing billing errors. The findings showed high accuracy in voltage and current measurements, demonstrating the system's potential as a viable alternative to conventional meters. [PERSON] et al. [17] developed an IIoT-based monitoring system for power substations using an FPGA-embedded controller to track critical parameters such as voltage, frequency, power, circuit breaker status, and transformer temperatures in real time. The system incorporated event-triggering mechanisms that recorded and transferred data to a network-attached storage (NAS) device for further analysis. A high-precision GPS module ensured accurate timestamps and synchronization, while the FPGA controller enabled high-speed data acquisition, capturing both steady-state and transient power conditions. With secure data transmission over a local network, operators could remotely monitor and analyze system performance. Successfully deployed in a petrochemical facility, the system demonstrated its effectiveness by capturing fault events and providing valuable insights for improving substation reliability. While these studies provide valuable insights into IIoT-based energy monitoring, they primarily focus on electricity consumption or isolated aspects of industrial resource usage. However, they do not comprehensively address the simultaneous measurement of both air and electricity consumption in manufacturing environments. Additionally, previous research has largely emphasized energy efficiency improvements without focusing on detecting system malfunctions such as air leaks or implementing automated shut-off mechanisms to reduce waste and enhance cost savings. In this study, we bridge these gaps by developing and deploying a real-time IIoT-based energy and air consumption monitoring system, specifically tailored to a legacy industrial machine in a high-demand 24/7 production environment. The key novelties and contributions of our work compared to previous studies are as follows:  
* Simultaneous Monitoring of Air and Electricity Consumption: Unlike prior works that focus solely on power consumption, our approach integrates both air and electricity monitoring, enabling a more comprehensive assessment of resource efficiency. * Automated Leak Detection and Shut-off Control: Our system not only detects air leaks, but also automatically shuts off airflow when the machine is idle, minimizing waste--an aspect not explored in previous studies. * Scalability and Real-time Data Acquisition via Modbus TCP/IP: We integrate an Ethernet-based Modbus TCP/IP communication protocol for real-time energy tracking, enhancing data accessibility and operational oversight compared to standalone monitoring systems. * Custom Sensor Integration for Legacy Machines: Retrofitting older machines often presents hardware and communication challenges. Our work successfully demonstrates an adaptable IIoT-based model that allows legacy machines to integrate into modern smart manufacturing ecosystems.