This paper describes an energy management system that is being developed in the AnyPLACE project to support new energy services, like demand response, in residential buildings. In the project end-user interfaces are designed and implemented to allow the input of preferences regarding the flexible use of shiftable and thermal appliances. Monitoring and self-learning algorithm are used to allow additional information to be collected and an automation platform is available for the management and control of appliances. An energy management algorithm is presented that processes end-user preferences and devices characteristics to produce an optimal dispatch considering demand response incentives. Results show the successful implementation of an optimized energy scheduling.