The transition to sustainable energy systems is one of the defining challenges of our time, necessitating innovations in how we generate, distribute, and manage electrical power. Micro-grids, as localized energy hubs, have emerged as a promising solution to integrate renewable energy sources, ensure energy security, and improve system resilience. The Autonomous multi-factor Energy Flow Controller (AmEFC) introduced in this paper addresses this need by offering a scalable, adaptable, and resilient framework for energy management within an on-grid micro-grid context. The urgency for such a system is predicated on the increasing volatility and unpredictability in energy landscapes, including fluctuating renewable outputs and changing load demands. To tackle these challenges, the AmEFC prototype incorporates a novel hierarchical control structure that leverages Renewable Energy Sources (RES), such as photovoltaic systems, wind turbines, and hydro pumps, alongside a sophisticated Battery Management System (BMS). Its prime objective is to maintain an uninterrupted power supply to critical loads, efficiently balance energy surplus through hydraulic storage, and ensure robust interaction with the main grid. A comprehensive Simulink model is developed to validate the functionality of the AmEFC, simulating real-world conditions and dynamic interactions among the components. The model assesses the system's reliability in consistently powering critical loads and its efficacy in managing surplus energy. The inclusion of advanced predictive algorithms enables the AmEFC to anticipate energy production and consumption trends, integrating weather forecasting