Rule-based control logics have proven to be efficient for automation of shading and lighting systems. However, successful commissioning of these systems for multiple stores non-residential buildings, regardless of the control logic, requires time-consuming programing and fine-tuning of numerous parameters. In this article, a control approach is suggested to overcome the limitations of the rule-based control systems: i) necessity for extensive information on the office room, ii) costly adaptation of control parameters to a new environment, and iii) no feedback to the control system in the case of mal-function. A novel self-commissioning approach is proposed: a set of open-loop geometry-based rules are enhanced with a supervised learning module for fine-tuning seven tunable parameters. This approach was validated through an in-situ experiment for 22 days in a daylight testbed equipped with internal venetian blinds, dimmable electric lighting system, a miniaturized accurate High Dynamic Range vision sensor to evaluate Daylight Glare Probability (DGP), horizontal illuminance meters and a pyranometer. The goal was to command the shading and electric lighting system to keep the DGP and horizontal illuminance in a predefined visual comfort zone. A novel visualization method is proposed to demonstrate the performance of the automatic system in leading the indoor environment to the visual comfort zone. After 11 days, the learning module reached the convergence state. Afterwards, the controller was capable of successfully confining the indoor illumination conditions to the visual comfort zone for 96% of the working hours while actuating the shading system efficiently; on average 2.54 times a day.