In processing time-series data classifications, the actual updated data is the key component in anomaly detection. Using constant parameters in offline learning are prone to create error condition in dynamic environments. Moreover, inaccurate anomaly detection delivers a dangerous effect that spread throughout the whole system. In this thesis, data anomaly detection model for time-series data is proposed using online machine learning scheme. The system uses sampled data from raspberry pi 3 that are updated regularly. In order to improve the accuracy of detection, the multi-phase learning process is conducted. Through learning phase, logistic regression and neural network are utilized to evaluate the system. The experimental result proves that the proposed system produces better accuracy compared to using offline learning.