UNO+ESP8266 Periodic Auto Reset

I am using the Blynk to monitor the 3-Phase AC voltage on my house incomer.

Using a UNO + ESP13 WiFi shield - after some initial struggle working well.

However i notice that at times when there is a power outage or the WiFi router resets, the link is disturbed and needs a reset to resume operation.

What i would like to do is :

A. Be able to initiate a full reset process when the Blynk.connected() function returns LOW. I am reading this function inside loop() once every second.
B. Be able to latch on to the strongest WiFi router or the one that is active at that time. Is there a way i can specify more than one SSID and PWD when using Blynk ??

Custom connection management via Blynk.config() is NOT currently supported with ESP as Shield. You will want to use a standalone ESP for proper connection management and possibly also for the multi WiFi connection option (of which I have no idea how to do :stuck_out_tongue: ).

The official Atmel software reset with WDT is covered at http://www.atmel.com/webdoc/AVRLibcReferenceManual/FAQ_1faq_softreset.html

You can specify as many SSID’s and PWD’s as you like but Connection Management is less straightforward with ESP shields.

You need to make a WiFi connection with AT commands before trying to connect to Blynk. This WiFi connection can include a big list of Access Points to try (with if statements).

Good luck.

If only the ESP8266 guys had provided it with a more decent ADC input instead of the funny 1Volt 10 bit stuff , i would be happy to use the ESP8266 standalone any day. So easy. But then when i have to use about 3 or 4 real time ADC inputs then the options reduce pretty fast.

Agreed i can use a I2C ADC module that you already advised to go after. When i have so many Arduinos lying around, its rather tempting to do it the easy way and most of the stuff i have are 5V stuff and even with I2C i need to translate levels. So that is the reason for patronizing the ESP13 Shield.

Is there any Blynk example that uses a standalone ESP8266 with analog via I2C ?? I suppose the regular Wire.h should work ??

Thanks for the suggestion !!

Thats news ! Never realized that connecting to WiFi and firing up Blynk can be independent !

I thought that is the only way to get into Blynk … Blynk.begin(auth, wifi, ssid, pass);

So is it OK if i have the MultiWifi.add() up before the Blynk.begin() ?? That sounds exciting …

Ok i do agree that UNO + ESP Shield is not the best option for this but still its good to know that with a standalone ESP8266 its possible.

On the auto reset stuff , its normally the WDT way. But i was just wanting to do the Reset when the Blynk.connected() fails for a specific time…

With the plug and play ESP’s you generally get 3.2V to play with.

Why would you want multiple connections?

Why would you want multiple connections ?

:slight_smile: Its got something to do with the reliability of the broadband service providers . For instance i have something like 4 different WiFi routers and its not always all of them are healthy and its best to have an option to choose that which is healthy in that instant !!

That doesn’t require MultiWifi.add() though. Just cycle through a list of AP’s until you find one that has internet access.

1 Like

Set up an ESP with Blynk as standalone, and try connecting it to an Arduino (running “basic” Arduino code) via EasyTransfer. Basically turn your plentifull Arduinos into ADC and Digital Pin “adapters”.

1 Like

Yes that I2C easy transfer works well two Arduinos.

Just a doubt when i port the Rx code to a standalone ESP8266.

When i use the <Wire.h> with the ESP8266Wifi library and NODE MCU, i normally have this line in setup() to link up to a I2C LCD

Wire.begin(D2,D1);

But the example code has this :

  Wire.begin(I2C_SLAVE_ADDRESS);
  //start the library, pass in the data details and the name of the serial port. Can be Serial, Serial1, Serial2, etc. 
  ET.begin(details(mydata), &Wire);
  //define handler function on receiving data
  Wire.onReceive(receive);

I guess that comment applies to Serial transfer !!

Right now do not have access to the NODE MCU hardware so could not experiment to find out.