Energy management strategies are instrumental in the performance and economy of smart homes integrating renewable energy and energy storage. This article focuses on stochastic energy management of a smart home with PEV (plug-in electric vehicle) energy storage and photovoltaic (PV) array. It is motivated by the challenges associated with sustainable energy supplies and the local energy storage opportunity provided by vehicle electrification. This paper seeks to minimize a consumer's energy charges under a time-of-use tariff, while satisfying home power demand and PEV charging requirements, and accommodating the variability of solar power. First, the random-variable models are developed, including Markov Chain model of PEV mobility, as well as predictive models of home power demand and PV power supply. Second, a stochastic optimal control problem is mathematically formulated for managing the power flow among energy sources in the smart home. Finally, based on time-varying electricity price, we systematically examine the performance of the proposed control strategy. As a result, the electric cost is 493.6% less for a Tesla Model S with optimal stochastic dynamic programming (SDP) control relative to the no optimal control case, and it is by 175.89% for a Nissan Leaf.