Logging temperatures to the database