IoT applications are expected to have huge impact to us in a very near future. People imagine Intelligent Transportation Systems, Intelligent Care Systems, smart buildings, or even smart cities may become reality. With smart sensing technology and machine learning algorithms, we are able to understand the environment states and monitor any particular anomalous conditions. Data driven approach becomes a key corner stone for the success of most IoT applications. However, compared to traditional data analytics, data analysis in IoT applications seems to be more challenging simply due to the huge amount of data that can be easily generated by IoT devices in a small period and we have to deal with them using very limited computational resources. In this talk, we introduce our envelope representation for IoT time series data which can be considered as a sparse coding for the time series. With this representation, we are able to deal with IoT data and develop anomaly detection algorithm under the hardware limitations. We will show its applications in monitoring the running machine status and user identification.