From the electrical point of view, the concept of smart community (SC) was defined as a distributed system consisting of a set of smart homes, distributed energy resources (DERs) and energy storage systems (ESSs) using SC controllers to enable smart power management. In this context, the SC energy management system (SCEMS) acts as aggregator of these resources, aiming to assure benefits for every SC stakeholder by setting the SC operation. The references given by the SCEMS must be accurately tracked by the energy routers (ERs), intended as one of the key components of the SC, acting as smart interface between the utility grid and the prosumers' DER and ESS. This study proposes a flexible, robust and simple control strategy for a single-phase ER. The ER regulates the active and reactive powers in grid-connected (GC) mode, and the voltage and frequency when operating in stand-alone (SA) mode. A seamless transition between SA and GC is demonstrated, avoiding undesired transients. The design and implementation of the proposed control strategy is progressively explained. Finally, this is tested via simulation (in PSCAD/EMTDC software) and verified with the experimental prototype.