before post, check if device exist, if not ,add it