       change_light();
       if (client.connected())
       {
-         sendUpdate();
-         client.loop();
          sendCheck();
          client.loop();
       }

unsigned long lastRelayActionmillis;
unsigned long startMills;

void ICACHE_RAM_ATTR callback(char* intopic, byte* inpayload, unsigned int length);

WiFiClientSecure sslclient;

    }
    else
    {
      client.loop();
    }
    ArduinoOTA.handle();
