if (activeBridge != null)
{
// Get settings and update the bulbs
// Observation : If the power of a hue lamp is removed, the status is not updated in hue hub.
// The heartbeat functionality should fix this, but
HueSettings settings = activeBridge.getSettings();
for (int i = 1; i <= settings.getCount(); i++) {
HueBulb bulb = bulbCache.get(i);
if (bulb == null) {
bulb = new HueBulb(activeBridge, i);
bulbCache.put(i, bulb);
}