Information and Communication Technologies (ICT) are playing a key role in converting the traditional power grid into a smart power grid, and hence, they provide a number of opportunities to develop novel applications for the new cyber-physical power infrastructure. Interconnection of the smart appliances, consumer devices, Plug-In Hybrid Electric Vehicles (PHEV) and local renewable energy generation resources with the smart grid enables energy and demand management for the cyber-physical power infrastructure. In this paper, we employ a Home Gateway and Controller (HGC) device that communicates with the PHEV and controls its charging and discharging profile. HGC can also communicate with the controller of the solar power generation unit in the smart home, and it can schedule the consumption of the smart appliances accordingly. Moreover, since PHEVs draw large amount of electricity, simultaneous charging in a neighborhood can overload the utility transformers in the distribution substations and risk the resilience of the power grid. To avoid this, HGC communicates with the other HGC devices in the neighborhood and coordinates PHEV loads. Our simulation results show that, efficiency of a PHEV as a storage unit increases as it is plugged for longer periods. Moreover, when renewable energy resources are not available, a larger portion of the PHEV battery can be used for storing energy during off-peak hours, and discharging during peak hours to accommodate the household demand. Thus, we show that HGC is able to provide savings for the consumers and it can also coordinate the power supply such that the availability of solar power increases the efficiency and reduces the utilization of PHEV battery.