[tidy] made v2 api as an option oposite to the mqtt


I guess we can probably make conditional compilation depending on the api version type....