I made an USB-controlled relay from old keyboard circuit board. The relay is connected to the Scroll-lock LED, which is totally useless otherwise. Which means I can switch the relay on from keyboard or bash-script. At the moment the relay is connected to the ambient light in my lair.