Software-defined lighting