Arduino and sim800L v2

I need help with this gsm remote control issue, this code works good and turns on relays but not turning them off using sms.

if (smsString == "01") {
        digitalWrite(Relay2, LOW);
        delay(7000);
        digitalWrite(Relay1, LOW);
        delay(3000);
        fona.deleteSMS(slot);
        delay(30000);
        int sensorValue = analogRead(rainPin);
        int thresholdValue = 10;
        Serial.print(sensorValue);
        Serial.println(sensorValue);
        if (sensorValue < thresholdValue) {
          fona.sendSMS(callerIDbuffer, "relay 1 on.");
          delay(3000);
          fona.deleteSMS(slot);
          delay(3000);
          digitalWrite(Relay2, LOW);
          delay(3000);
          fona.sendSMS(callerIDbuffer, "relay 2 on.");
          delay(3000);
          fona.deleteSMS(slot);
        }
        if (sensorValue > thresholdValue) {
          fona.sendSMS(callerIDbuffer, "Relay 1 turned off.");
          digitalWrite(Relay1, HIGH);
          digitalWrite(RelayV2, HIGH);
          fona.sendSMS(callerIDbuffer, "Error Program stopped.");
          delay(3000);
          fona.deleteSMS(slot);
        }
        else if (smsString == "00") {
          digitalWrite(Relay1, HIGH);
          digitalWrite(Relay2, HIGH);
          delay(3000);
          fona.deleteSMS(slot);
          fona.sendSMS(callerIDbuffer, Relay 1 turned off.");
          delay(3000);
          fona.deleteSMS(slot);
        }
      }
    }

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.