read sensor data from db