\section{Introduction} \label{sec:introduction} In a IoT environment, there are many devices will periodically transmit data. Some sensor is use for avoid accidents, so they will have very high sensing frequency. However, most of the data are useless. Like a temperature sensor on a gas stove, the temperature value is the same as the value from air conditioner and does not change very frequently, but it will have dramatically difference when we are cooking. We can simply make a threshold that when temperature is higher or lower than some degrees, the data will be transmitted, and drop the data that we don't interest. This is a very easy solution if we only have a few devices, but when we have hundreds or thousands devices, it is impossible to manually configure all devices, and the setting may need to change in the winter and summer, or different location. Hence, a framework to select useful data is important. On Raspberry Pi 3, while it is idling and turning off WiFi, it will consume 240mA and while uploading data at 24Mbit/s, it will consume 400mA. If we sent $640 \times 480$ pixels heat map images in png format (average 45KB) in 10Hz, it will consume about 264mA. In this paper, we study the data from Panasonic Grid-EYE, a $8 \times 8$ pixels infrared array sensor, and FLIR ONE PRO, a $480 \times 640$ pixels thermal camera. Both are setting on ceiling and taking a video of a person walking under the camera. {\bf Contribution} The contribution of this work is to present a framework for user to choose either the bit-rate or the error rate of the video. By the method we proposed, the size of file can reduce more than $50\%$ compare to JPEG image when both have $0.5\% (0.18^\circ C)$ of root-mean-square error. The remaining of this paper is organized as follow. Section~\ref{sec:bk_related} presents related works and background for developing the methods. Section~\ref{sec:design} presents the system architecture, challenges, and the developed mechanisms. Section~\ref{sec:eval} presents the evaluation results of proposed mechanism and Section~\ref{sec:conclusion} summaries our works.