polling to Tutum's API and main algorithm