**1. Introduction**

A smart home allows its residents to control and manage the different home appliances through the Internet [1]. The first developments in home automation appeared in the 1980s thanks to the reduction of electronic and computer systems [2]. Therefore, the industry has focused its experiments on the development of controllers, interfaces, and tools providing comfort, security, and assistance within a building. Additionally, smart home management systems use several technologies, such as the IoT, cloud computing, Internet, GSM, and GPRS [3,4]. With a smart home, the indoor and outdoor surroundings of the dwelling can be monitored remotely. Recently, thanks to smartphones and the development of new technologies (for instance, apps and connected devices), the installation of smart homes becomes easier as all electrical devices are connected through the Internet.

The term smart energy management has spread in recent years and it is associated with several aspects of life, such as heating, cooling, and lighting systems [5]. This type of management aims to save daily energy consumption through the use of AIT, such as

**Citation:** Saba, D.; Cheikhrouhou, O.; Alhakami, W.; Sahli, Y.; Hadidi, A.; Hamam, H. Intelligent Reasoning Rules for Home Energy Management (IRRHEM): Algeria Case Study. *Appl. Sci.* **2022**, *12*, 1861. https://doi.org/ 10.3390/app12041861

Academic Editors: Luis Hernández-Callejo, Sara Gallardo Saavedra and Sergio Nesmachnow

Received: 24 October 2021 Accepted: 1 February 2022 Published: 11 February 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

MAS, and knowledge representation techniques, such as ontology [6–8]. Generally "energy efficiency" is achieved by putting devices into sleep mode or by activating them only when necessary. Electricity bills can be reduced to a much lower level, such as turning off lights when a person can leave the room or adjusting a temperature according to a person's identity or preference. In addition, it becomes possible to track the amount of energy consumed by various appliances at home and obtain forecasts for the future [9]. However, the issue of electric energy has become a priority in most countries due to the increasing need for energy in daily life, as a lot of research has been conducted to find suitable energy management solutions [10]. Some of them have worked to find solutions for energy sources that depend on clean energy sources, such as solar and wind energy [11]. Other research works have taken an interest in moving electricity from the source to the place of storage or consumption, seeking to find the shortest and least wasted electricity distance [12]. Djamel Saba et al. [13] focused on the consumption process by explaining to consumers how to use home appliances, as well as relying on smart solutions for energy consumption.

From an architectural point of view, there are many methods by which we can save more energy at home, whether by insulating the walls and floors, as this process can reduce between 20% and 25% of the heat loss at home [14]. The second method is to use double-glazed windows, as the windows are a major source of heat loss and savings. The third method relates to the use of a shared solar system for heating the water and the house.

In this paper, we focus on the development of an intelligent energy management solution applied to the smart home. This latter is an open and complex system, it includes some geographically distributed elements. In addition, the proposed solution is based on three elements: the first concerns the exploitation of natural resources, the second concerns the correction of occupants' errors and notification of occupants, and the third item concerns the grouping of similar activities at the same period. More precisely, the main contribution of this paper can be summarized in developing a smart solution to choose the most efficient energy sources as well as the best optimization technique that allows obtaining the best configuration of the hybrid energy system.

The remainder of this document includes the energy-saving elements at home in Section 2. Section 3 is reserved to present an IRRHEM design and development. The case study and its simulation are presented in Section 4, followed by the analysis and discussion in Section 5, and, finally, we conclude the paper.
