A Smart Lighting System for Visual Comfort and Energy Savings in Industrial and Domestic Use