Integrating residential photovoltaic (PV) power generation and energy storage systems into the Smart Grid is an effective way of utilizing renewable power and reducing the consumption of fossil fuels. This has become a particularly interesting problem with the introduction of dynamic electricity energy pricing models since electricity consumers can use their PV-based energy generation and controllable energy storage devices for peak shaving on their power demand profile from the grid, and thereby, minimize their electricity bill cost. A realistic electricity price function is considered in this paper with billing period of a month, comprised of both the energy price component and the demand price component. Due to the characteristics of the realistic electricity price function and the energy storage capacity limitation, the residential storage control algorithm should properly account for various energy loss components during system operation, including the energy loss components due to rate capacity effect in the storage system as well as power dissipation in the power conversion circuitries. A near-optimal storage control algorithm is proposed accounting for these aspects, based on the PV power generation and load power consumption prediction results in the previous papers. The near-optimal control algorithm, which controls charging/discharging schemes of the storage system, is effectively implemented by solving a convex optimization problem at the beginning of each day with polynomial time complexity. Experimental results demonstrate that the proposed near-optimal residential storage control algorithm achieves up to 36.0% enhancement in electricity cost reduction than the baseline control algorithm.