Demand Response (DR) systems exist since decades in most industrialised countries. It started with phone calls to big industrial plants to reduce their consumption in time of need. Gradually, other solutions were installed by distributors to control the electricity consumption in their grid. Two well-known systems are the two-tariff system and ripple control. The second was installed to shave the consumption peak, sending telegrams on the distribution grid to cut some high consumption loads, such as heating appliances, water boilers, or white appliances. This solution is mainly open loop as the same command is sent to multiple households at the same time and only the global utility load curve is monitored. This blind switching of mass of appliances at the same time has also side effects, such as synchronising the restart of most appliances when the controlling relays are simultaneously released, provoking a rebound effect in the form of a power surge that can exceed the shaved peak. The last decades saw the advent of Internet of Things (IoT) as well as the deployment of a more sustainable energy generation (photovoltaic, wind energy, etc.). The second makes the generation more decentralised, less predictable, and less controllable, increasing the need for more flexibility to balance it. On the other hand, the development of IoT technologies provides means to acquire more data and have a more precise control on the appliances, and all that with reduced costs. This paper presents how the flexibility of space and domestic hot water heating in existing residential buildings can be controlled for grid services. It focuses on the Internet of Things (IoT) framework including both hardware and software to connect existing buildings to a central Virtual Power Plant (VPP) intelligence. It also presents field experiments that were performed during the European FP7 SEMIAH project.