I would like to use my phone with blynk and my home wifi for Over The Air updates, but the OTA part does not work.
Blynk connects without issues.
Arduino IDE does not connect and does not display the IP address.
If I leave out the Blynk parts, OTA works fine.
Is it possible to achieve this and if so, what is wrong with my code?
If they are on different networks you can’t use OTA. You can use the http updater as long as the device you want to update is accessible via the internet.
The blynk app on my phone controls the esp01 with a ledstrip. Which I need to be able to do anywhere I can get 4g.
And when I am home I would like to be able to do over the air updates.
I would have to look into updating via the internet.
It doesn’t make any difference which network your phone is on, it doesn’t play any part in the OTA process.
The NodeMCU being updated, and the computer running the Arduino IDE need to be on the same network.
However, you seem to be tryin* to get your NodeMCU to connect to two separate networks, with different SSIDs at the same time, which it can’t do.
@Hannes_Sapiens: for what I have monitored from my experiments recently. As long as in the loop() function you put the ArduinoOTA.handle(); after Blynk.run() then everything is ok. Can you try it? No need you revise the code as well as a physical button additionally. From my finding I did then all my boards are living well now.
This way is ok
void loop()
{
Blynk.run();
ArduinoOTA.handle();
}
This way is ok for first booting then if the power off the board rebooting then it is stuck there = your case facing?