In modern smart building climate control systems, accurate detection of unusual behavior in temperature sensors (outliers) can help reduce or prevent waste of energy consumption in a Heating, Ventilation and Air Conditioning (HVAC) system. In this work, we propose online learning-distance based outlier detection method. In the new method, we train and tune a multilayer neural network to learn a nonlinear distance function from historical building operation data and detect outliers according to the calculated distance. The online detection method is less computational expensive than the offline version. By gradually including new and drop old building operation record, the new method is capable to adjust the underlying distance function on-the-fly. The converging speed of the learned distance function and tuning difficulty of network training are also discussed. The proposed online outlier detection method can work in an unsupervised manner except requiring only one data-specific parameter. In the experiments of two simulated buildings, the data-specific parameter can be chosen from a relatively wide range, which allows less tuning effort, to achieve good online detection precision and recall.