This article discusses theoretical ways to get the maximum energy from a PV inverter by dynamically turning loads on and off, and shows how to practically automate the process in openHAB. The herein presented program logic keeps smart switches relaying electricity as long as there is energy surplus, and also allows manual intervention.