This paper proposes a coordinated home energy management system (HEMS) architecture where the distributed residential units cooperate with each other to achieve real-time power balancing. The economic benefits for the retailer and incentives for the customers to participate in the proposed coordinated HEMS program are given. We formulate the coordinated HEMS design problem as a dynamic programming (DP) and use approximate DP approaches to efficiently handle the design problem. A distributed implementation algorithm based on the convex optimization based dual decomposition technique is also presented. Our focus in the current paper is on the deferrable appliances, such as Plug-in (Hybrid) Electric Vehicles (PHEV), in view of their higher impact on the grid stability. Simulation results shows that the proposed coordinated HEMS architecture can efficiently improve the real-time power balancing.