Smart lightning