The levelized cost of electricity from PV systems has fallen below the electricity retail price in many countries worldwide, a development that has incentivized the investment in PV systems for many households. Similarly, battery storage systems have experienced a significant reduction in prices. An optimal real-time pricing strategy is proposed in this research to aggregate renewable energy resources with presence of battery storage systems.