The advancement of renewable energy infrastructure in smart buildings (such as photovoltaic) has highlighted the importance of self-consumption, which is the act of using local renewable energy to run IoT-enabled devices (e.g., HVAC, EV charging, white appliances) at the time the energy is produced. In countries with a high kg CO 2 per kWh factor, this effectively reduces CO 2 pollution but also contributes to the stabilization of the energy grid. User comfort preferences are often expressed in the form of Rule Automation Workflows (RAW), which are software rules as to when and how IoT appliances must operate to allow custodians reach their convenience levels, as opposed to self-consumption directives. The objective of this Ph.D. research is to extend the IoT Meta- Control Firewall’s (IMCF) functionalities to bridge this gap and balance the trade-off between convenience, energy consumption and CO 2 emissions in satisfying the RAW pipelines of users.