Energy trading in local energy communities and markets has been receiving high attention in recent years owing to the growth of renewables and distributed resources in the prosumer-sides. To trade energy by prosumers, an energy management system (EMS) is required to not only maximize the profit but also coordinate internal resources. In this paper, the existing none-convex models for EMS are evaluated with a focus on maximizing the profit of trading. It is clarified that the existing models for EMS are not appropriate to guarantee optimality and use in practice. In this regard, a practical and convex model is addressed to enable scalability, while ensuring optimality. The proposed model is tested and compared to other existing models.