fixed the timedate field in the database and models.py. also fixed the suplicate insert on motion history. need to fix the presence_status logic by filtering motionhistory and taking the most recent update