This paper presents a new control approach for piezoelectric switching shunt damping. Recently, semi-active controllers have been used to switch piezoelectric materials in order to damp vibration. These switching shunt circuits allow a small implementation and require only little power supply. However, the control laws to switch these shunts are derived heuristically and therefore it remains unclear, if a better control law for a given shunt topology exists. We present a new control approach based on the Hybrid System Framework. This allows the modelling of the switched composite system as a hybrid system. Once the hybrid system description is obtained, a receding horizon optimal control problem can be solved in order to get the optimal switching sequence. As the computation time to solve this optimisation problem is too long for real-time applications, we will show that the problem can be solved off-line and the solution stored in a look-up table. This allows a real-time implementation of the switch controller. Moreover, control rules can be derived from this look-up table, and we will demonstrate that in some situations the controllers proposed in previous papers generate near optimal switching. In this paper, we will investigate several shunt topologies with switches and compare the performance between the heuristically derived control laws and the optimal new control laws. Simulations and experiments show the improvement with the new controllers. This is very promising, since this new control approach can be applied for more complex shunt circuits with many switches, where the derivation of a switching law would be very difficult.