IOT relay control problem

So set the state to 0 as soon as it connects to the cloud