 The Internet of Energy, IOE, is an interesting and promising topic for industry and academia, as it could help develop technology for smart cities. This study suggests an innovative energy system with peer-to-peer trading and more sophisticated residential energy storage system management. It proposes a smart residential community strategy that includes household customers and nearby energy storage installations. Without building new energy production facilities, users can consume affordable renewable energy by exchanging energy with the community energy pool. The community energy pool can purchase any excess energy from consumers and renewable energy sources and sell it at a price higher than the feed and tariff but lower than the market rate. The energy pricing of the power pool is based on a real-time link between supply and demand to stimulate local energy trade. Under this pricing structure, the cost of electricity may vary depending on the retail price, the number of consumers, and the amount of renewable energy. This maximizes the benefits for customers and the utilization of renewable energy. A Markov decision process, MDP, depicts the recommended power to maximize customer benefits, increase renewable energy utilization, and provide the optimal option. This article was authored by Marwan Mamoud and Sami Bin Salama. We are article.tv, links in the description below.