In many countries, renewable energy production already represents an important percentage of the total energy that is generated in electrical grids. In order to reach higher levels of integration, demand side management measures are yet required. In fact, different from the legacy electrical grids, where at any given instant the generation levels are adjusted to meet the demand, when using renewable energy sources, the demand must be adapted in accordance with the generation levels, since these cannot be controlled. In order to alleviate users from the burden of individual control of each appliance, energy management systems (EMSs) have to be developed to both monitor the generation and consumption patterns and to control electrical appliances. In this context, the main contribution of this chapter is to present the implementation of such an IoT-based monitoring and control system for microgrids, capable of supporting the development of an EMS.