In this paper, we propose a unified framework for inclusion of different electricity tariff components and residential prosumption devices in a residential energy management system (REMS). This framework allows REMS to use flexible modelling with respect to devices and price components applicable to an individual house, without requiring unique models for each device and tariff. The significanc...