Control nodemcu output by blynk app remotely online with internet and also locally offline without internet

hi
i need to control relay connected to nodemcu output at two cases :-

  1. when i am at home without using router connection just the nodemcu and blynk app
  2. when i am remotely through internet by home router gateway and blynk app & the nodemcu
    in the cases above i need to use the same app
    are this feature is available at blynk
    how to do?
    can any one help me
    appreciate your help
1 Like

A local server would allow you to do most of what you’re suggesting.
When the internet is working, and you’re either at home or away from home, you’d use a DDNS url as the server address in your app.
When the internet is down (but the router is still up and running) then you’d log out of the Blynk app and log in again specifying the local IP address of your Blynk server as the address of the server.

Pete.

thank u Pete
for u reply
appreciate u r help

what if the router is not still up and running and it’s off ??

You need a router to provide the WiFi that your phone will connect to, and to route the traffic to the correct devices.

There is a way to make a Blynk standalone server that provides a wireless hotspot and handles the routing/DHCP service, but that will add far too much complexity in the scenario that you described in your initial post.

Pete.

NodeMCU module has its own wifi, so it can work as an access point as well as the router
that what I talk about
to connect the blynk app directly to the nodemcu_wifi in case local control
but if remote control just use the router
is this possible? be " Blynk standalone server "

NodeMCU module has its own wifi, so it can work as an access point as well as the router
that what I talk about
to connect the blynk app directly to the nodemcu_wifi in case local control
but if remote control just use the router
is this possible? be " Blynk standalone server "
or by other way?
thanks in advance for ur help Mr. Pete

No.

Direct app to device communication is possible using Bluetooth, but you really don’t want to go there in my opinion.

What’s the scenario that you’re concerned about, that will leave you without a working router, but with your ESP device (and whatever you’re controlling with the ESP) up and running?

Pete.

I’m having trouble figuring out how to set up direct app to device control using Blynk. This is for control of relays in the automotive environment where internet is often unavailable and I really don’t want an onboard wifi network to run a local server.

What hardware are you using, and what have you tried do far?

Pete.

I’m using a ESP32-WROOM Dev board. I have the ESP32_BLE example running. However upon disabling my phone’s internet connection the app no longer functions.

Are you using
#define BLYNK_USE_DIRECT_CONNECT’

Are you using iOS or Android?

Pete.

Yes and iOS.

Whenever the No Internet Connection banner appears, the buttons no longer actually control the device.

In that case, it looks like I was mistaken and an internet connection is necessary.

Pete.