A Building Automation System (BAS) has functions of monitoring and controlling the operation of all building sub-systems such as HVAC (Heating-Ventilation, Air-conditioning Control), electric consumption management, fire alarm control, security and access control, and appliance switching control. In the BAS, almost operations are automatically performed at the control centre, the building security therefore must be strictly protected. In the traditional system, the security is usually ensured by a number of cameras installed at fixed positions and it may results in a limited vision. To overcome this disadvantage, our paper presents a novel security system in which a mobile robot is used as a patrol. The robot is equipped with fuzzy-based algorithms to allow it to avoid the obstacles in an unknown environment as well as other necessary mechanisms demanded for its patrol mission. The experiment results show that the system satisfies the requirements for the objective of monitoring and securing the building.