Fixing the controller and adding a motion model to manage the state of the motion detection
Adding upload for the detection
adding functions to ensure that the service does not send more than one detection to the server