## 3 Materials and Methods  
To perform energy consumption disaggregation with NILMTK, it is essential to have a compatible dataset that includes metadata and measurements of both the aggregate and disaggregated consumption of appliances. In this context, once NILMTK is installed (with the use of Anaconda being recommended), a specialized program that supports 13-digit timestamps and can generate new datasets from the measurements obtained by monitoring devices is required. For this purpose, data converters developed by the authors of this study are used and are freely available. These converters are stored in the following directory: C:\Users\userx\anaconda3\envs\
nimttk-env\Lib\site-packages\
imttk\dataset_converters. Additionally, these converters must be registered in NILMTK, which is achieved by adding their names to the _init_py file in the directory (see Figure 11. Code of the init file in Appendix A). Once the converter code is located, invoking each converter is relatively straightforward. It only requires passing the function of the path where the measurement files are stored, the new dataset name, and the start and end dates, as shown in Figure 12 in Appendix A. After generating the dataset, data analysis, preprocessing, and statistics extraction can be performed to train and ultimately develop the most optimal model for disaggregation. This final task can be streamlined using the Python code shown in Figure 13 in Appendix A, which will generate an H5-format model for disaggregation. The software used was Python version 3.7.12, which meets the NILMTK requirement of Python 3.6 or higher. Finally, once the model has been created, its accuracy can be evaluated by obtaining metrics using the tools included in NILMTK. This approach enables comparison of results with those from other datasets, thereby deducing the optimal configuration. Figure 14 in Appendix A shows an example of Python code that calculates these metrics. The results section will present these metrics, facilitating comparisons considering factors such as filing methods, sampling rates, and the types and numbers of appliances in the dataset. A wide variety of metering devices are available on the market, although unfortunately, not all are open source or compatible with NILMTK. In addition, many of these devices remain prohibitively expensive and inaccessible to researchers, as the accompanying software is proprietary [30]. However, there is a growing trend towards the adoption of open-source solutions. These limitations have motivated the need to develop new open-source hardware for this work, on which both the converters and the software have been designed to disaggregate energy consumption. The openZmeter (oZm) v1 is an open-source, low-cost, and high-efficiency single-phase power quality analyzer and smart energy meter. It complies with IEC 61000-4-30 and EN 50160 standards and was developed by the Universities of Granada and Almeria. It measures electrical parameters at 15,625 Hz and includes an easy-to-use interface. Its architecture features an AFE, an STM32 microcontroller, ARM NanoPi/OrangePi boards, and a PostgreSQL database, which handles RMS voltages up to 400 V and currents up to 50 A with 0.1% accuracy. A visual representation of the electrical diagram covering the various elements of the oZm v1 is provided in Figure 3. The oZm's hardware includes an Analog Front End (AFE) that captures and conditions the voltage and current signals from the electrical grid. An STM32 microcontroller performs basic calculations and sends the data to more powerful ARM boards for complex analysis. Additionally, the device uses a Hall effect sensor or current clamps to measure current and a resistive divider to measure voltage, which is then converted to digital signals by an ADC. The system is powered directly from the electricalgrid with an isolated power source and includes a backup battery to maintain operation in case of power interruptions.