This master's thesis examines dynamic programming control for energy management in smart homes with photovoltaic systems and battery storage. It first provides background on photovoltaic generation and feed-in tariffs in Germany. It then formulates the energy management problem as a Markov decision process and explores various control approaches including rule-based control, linear programming, dynamic programming, and approximate dynamic programming. The thesis evaluates these methods using real solar generation and electricity price data. The goal is to optimize battery charging and discharging to minimize energy costs while satisfying household demand.