## 2 State of the Art
### Examples of Framework Implementations with Dynamic Configurations
#### 2.4.1 ESP8266 IoT Framework  
The ESP8266 IoT Framework is a custom-built framework designed to facilitate the development of IoT applications using the ESP8266 microcontroller. This framework tackles several common challenges faced by developers, including WiFi connection management, HTTP request handling, and providing a user interface for configuration. It is designed to be unobtrusive and easy to deploy, emphasizing modularity and scalability. The web interface was developed using React, allowing for a responsive and dynamic user experience, while the architecture was envisioned to be flexible enough to adapt to various IoT projects while maintaining a consistent set of functionalities [22]. The framework consists of five primary components structured as in Figure 4:  
The WiFi Manager is responsible for connecting the ESP8266 to available WiFi networks. If no known network is detected, it activates a hotspot with a captive portal, enabling users to enter their login and network details. This functionality ensures that the device can connect to the internet without pre-set network names and passwords. After that, the web server component is critical for providing the user interface that allows users to configure settings and monitor device status. It communicates with the ESP8266 via RESTful API, enabling quick and structured interactions between the frontend and the underlying hardware. It also includes a robust HTTP request handler that simplifies the process of creating HTTP and HTTPS requests. This is especially important for IoT applications requiring secure communication with web services. The handler abstracts away the complexities of managing SSL certificates, allowing developers to focus on application logic. The configuration manager is designed to handle user-defined parameters that can be modified while the device is operating. It stores these parameters in EEPROM, ensuring  
Figure 3: Overview of Lua in the NetBSD kernel (adapted from [21]). they are retained even when the device is powered off. Parameters are defined in JSON format, simplifying the process of adding or modifying settings. Lastly, OTA updates are a key feature for IoT devices, allowing developers to publish firmware updates without needing physical access to the device. This is particularly useful for devices located in remote or hard-to-reach locations. The framework provides a simple mechanism for users to upload new firmware through the web interface [22]. The configuration manager is a key component of the ESP8266 IoT Framework, designed to facilitate the dynamic management of device settings through an intuitive web interface. This component enables developers to define, modify, and store various parameters governing the behaviour of their IoT applications. Key aspects of its implementation include defining data structures, initializing default values, generating code from JSON into C++, and mechanisms for saving and loading configurations. At its core is a clearly defined data structure, typically represented as a C++ structure. This structure includes parameters such as URLs, data collection intervals, sleep mode triggers, and brightness levels. Default values are set for all parameters, providing a reliable operational foundation. A Python script converts the JSON configuration into C++ code during the compilation process, allowing for straightforward upgrades and modifications while maintaining consistency throughout the application [23]. The persistence of user-defined settings is achieved through functions that save and load configuration data to and from EEPROM (Electrically Erasable Programmable Read-Only Memory), which retains settings even when the device is powered down, an example of which is shown in Figure 5 (implemented as part of this study). When users modify settings through the web interface, these changes are recorded and saved, ensuring that updated configurations are stored and available at the next power-up.