Fossil fuels are rapidly running out, and with the demand for environmentally friendly energy sources increasing, power grids are looking for distributed power generation-based renewable resources. The distribution of these energy s. Fossil fuels are rapidly running out, and with the demand for environmentally friendly energy sources increasing, power grids are looking for distributed power generation-based renewable resources. The distribution of these energy sources is significantly linked to the development of smart microgrids, which are also extensively connected with the energy internet. This paper explores the energy internet operation, focusing on developing a routing algorithm for an energy router. The energy routing algorithm is further substantiated with the aid of simulations. This algorithm can find all the paths available for energy transmission between two nodes and selects the track with the most negligible losses as the path for transmission. All the possible routes are displayed along with the losses associate. Distributed power generationInternet of energyInternet of thingsRenewable energyThe depletion of fossil fuels and the environmental pollution of traditional energy sources have led to the demand for clean energy. Furthermore, there is a global increase in the need for electricity as more and more development are many types of renewable energy sources (RES), such as wind, occurs. This has consequently increased electricity tariffs,,. There hydroelectricity, and solar energy, that can be harnessed to meet the ever-growing energy demands of the consumer. Solar thermal energy deals with heating, mainly for household purposes, by heating water using the sun's direct energy. Solar electricity uses the photovoltaic (PV) process to convert the radiation emitted from the sun into electricity. The output electricity depends on the array voltage, temperature, and insulation. RESs ha. 2.1. Minimum loss routing algorithmThe minimum loss routing algorithm (MLR) is based on real-time transactions, while the congestion of end-to-end power transmission is alleviated. The energy router in the MLR algorithm comprises a physical and an information layer. The physical layer is the converter that acts as a plug-and-play device for the various RESs, loads, and storage devices. The information layer controls the flow of energy, which will help realize an optimal transmission path for the energy. In addition, the information layer ensures that all the power transmission requirements are met. This includes implementing the routing procedures and commencing/dismissing power transmission.2.2. Routing algorithms used by the EI are typically linked to the graph theory. This is represented by a set of nodes and edges. (1)G=(N,E,W)where N represents the set of nodes or the junctions on a routing map, E is the edges, where the edges are the path between two nodes, and W is the weight of the edges or the distance between two nodes. When no edges are available between two nodes, the weight, W, is set to zero.The minimum path from the source to the sink was determined using distances with the Dijkstra algorithm. However, the shortest distance is not necessarily the optimal path for energy transmission. Therefore, the algorithm calculates the best path based on the transmission line and ER losses. In addition, parameters such as t.