1. A lighting controller, comprising:a detector adapted to detect an output voltage of a power source, said power source being configured to provide power to a lighting unit via a lighting driver;
a controlling unit, coupled to the lighting driver and configured to:
switch an up-converter between the power source and the lighting driver to boost an output voltage from the power source to the lighting driver, in a first condition; and
bypass said up-converter in a second condition and control the lighting driver to deliver a constant power to the lighting unit regardless of power consumption of the power source by the lighting driver, before the detected output voltage decreases to less than a first threshold, and control the lighting driver to deliver a gradually reduced power to the lighting unit after the detected output voltage decreases to less than the first threshold;
wherein said first condition comprises operation of the lighting device during a predetermined period starting at dusk, and
wherein said second condition comprises operation of the lighting device during a remaining part of the night other than the predetermined period.