I think it's safe to say that this is an art project, certainly not any kind of lab equipment. (Unless the OP tells us otherwise.)
Since the test tubes will be held by rings, which I assume are metal (and therefore must be glued to the vessel somehow), how about some kind of proximity detector, like elevator buttons? Thin wires could be attached to the rings and glued to the glass in a somewhat unobtrusive way, and a circuit could detect the test tube being placed by capacitance or some other method, yes?
Sounds do-able to me. Dunno exactly how, though.