Abstract-In this paper, we present how electric vehicles (EV) can be flexibly integrated into the energy management of a smart home both in forms of consumer loads and electrical storage systems. Based on a draft for ISO 15118, we implemented an advanced version of a smart charge communication protocol which enables to flexibly control the charging and discharging processes of an EV in a sophisticated way, allowing to match the domestic load demand and the fluctuating energy supply of decentralized energy sources such as photovoltaic panels or a combined heat and power plant with the energy stored in the battery while at the same time guaranteeing a preset driving range adjusted by the user and thus limiting range anxiety