How to work stand-alone with the ESP-01 while there is no wi-fi network available?

Hi, Blynkers

I’m working with the ESP-01. Is there any way to work with the library “BlynkSimpleEsp8266.h” without momentary access to the Wi-Fi network? In other words, if you start ESP-01 without a Wi-Fi network, it works stand-alone until the network returns.
A hug!

This situation is covered quite frequently in this forum… search for and read up on Blynk.config()

http://docs.blynk.cc/#blynk-firmware-configuration

http://docs.blynk.cc/#blynk-firmware-connection-management

Hi, Gunner.
My question is not regarding the connection to the Blynk server, but the autonomy of the ESP-01 (actuator) when there is no local connection available. In this case, not even the loop () is being called.
I will try to use some of the suggested options.
Thank you!

Maybe this: “To connect to open WiFi networks, set pass to an empty string (”")".

No sense in reinventing the “connection” wheel… Blynk already has that functional way to run the hardware sketch with or without WiFi-Server connection (AKA stand-alone).

I think this is also covered in some relatively recent connection provisioning… can’t think of the link for that at the moment…

I do not know if my question is clear … If I have my router turned on and then turn the ESP on, it works fine. Otherwise (turning the ESP on with my router turned off), I lose all my functions until I turn on the router. I have the need that ESP can work independently of blynk in this case …

I think I understood the question, and hoping to explain the answer a bit better…

You don’t really “turn off” Blynk, however you can make your ESP sketch start and keep running, even if there is no server connection, by using Blynk.config() instead of Blynk.begin(). This way your sketch will keep running, but will only respond to sensors and physical inputs as per your code… anything requiring App input and Server link will (obviously) not be available… until reconnection… so make sure your code can accommodate the missing Blynk connection for whatever it is doing.

Now, if your ESP is hanging up because of no WiFi connection (nothing Blynk related, just straight up “no network connection”)… then I am not really sure on this one… but it seems it should still be able to move past that somehow and start the main loop? That sounds more like an ESP Forum question to me.

Ok, Gunner,

Something like:

void setup() {
  
  **Blynk.config(auth, ssid, pass);** or **Blynk.config("");**
    
  pinMode(interruptPinzrc, INPUT_PULLUP);
  pinMode(interruptPinbutton, INPUT_PULLUP);
  pinMode(out_led, OUTPUT);
  pinMode(out_moc, OUTPUT);
  attachInterrupt(digitalPinToInterrupt(interruptPinzrc), handleInterrupt, FALLING);
  attachInterrupt(digitalPinToInterrupt(interruptPinbutton), buttonInterrupt, FALLING);

  hardwareConfig();
}

void loop() {
  if (WiFi.status() == WL_CONNECTED) {
      Situation 1
    }
    else  {
      Situation 2
}

Should activate situation 2…

Thank you!

I have almost same problem. But I buildups an access point in my esp-01. How can I control my output pin while my iPhone was connect to the AP via Blynk app without internet connection?
Thank you