added time stamp to readings
started to write sql join query for redline logic compared with reading but didnt finish it. It is commented out currently