230V AC to 5V,1A Dc converter

A relay is also a simple and safe solution.