Phidget attach/detach logic.