Feeding WIFI SSID, Passwords and Blynk key's via a webpage in the ESP8266 EEPROM

Take a look at the following Blynk video on YouTube together with the url’s referenced below the video https://www.youtube.com/watch?v=RLKuIHaraKs

Thank @Costas

It’s looks like this video is talking about the paid blynk.io service.

The BlynkProvisioning is usable with the Blynk free version?

For sure.

Great!

Thanks a lot @Costas!

I reviewed the video and tried the Template_ESP8266.ino example.

I works great! Now I just want to modify the code in order just to input the SSID and Password, and leave the token, host and port hardcoded.

I checked the example, and it looks like I have to modify the ConfigMode.h code.

something like this:

<!DOCTYPE HTML><html>
<form method='get' action='config'>
  <label>WiFi SSID: </label><input type="text" name="ssid" length=32 required="required"><br/>
  <label>Password:  </label><input type="text" name="pass" length=32><br/>
 //     <label>Auth token:</label><input type="text" name="blynk" placeholder="a0b1c2d..." pattern="[a-zA-Z0-9]{32}" maxlength="32" required="required"><br/>
//      <label>Host: </label><input type="text" name="host" length=32><br/>
//      <label>Port: </label><input type="number" name="port" value="8442" min="1" max="65535"><br/>
  <input type='submit' value="Apply">
</form>
</html>
)html";

And to make this values fixed on this lines:

String token = server.arg("blynk");
String host  = server.arg("host");
String port  = server.arg("port");

I’ll try that!

Thanks a lot again

1 Like

That file has a structure for server and port. For the token you just decide if you want static or dynamic provisioning, no requirement to hack the form.

There is a hardware reset button in the last tab to clear credentials from EEPROM. You can also use a Blynk button to clear credentials via software but you must remember to do it before you set off to your next AP site. Alternatively you have the credentials set to your phone’s 3G shared network and then you can change to a local AP at any time via software if you don’t want to use a hardware button.

We also did some experimenting with GitHub - datacute/DoubleResetDetector: Library to detect a double reset, using ESP8266 RTC User Memory but you have to be careful as part of the provisioning includes a coded double reset.

Great to here my friend. JoeS i need ur help,if u don’t mind can u share your wifimanager code with me buddy?

Thanks for sharing the sketch.
I am in a project where it fits perfectly, as a matter of fact it is working great for me with one exception:

My light controllers work with two hardButtons 1 and 2 with micro switches pulling to 0v the GPIO12 and GPIO13 respectively of an ESP8266-12
When I combine this wifimanager to config the WIFI and AuthToken parameters, with my Blynk sketch, hardButton 2 works fine, however hardbutton 1 does NOT work anymore.
With soft button from Blynk app both work fine.

As I understand, the wifimanager is using the flash memory as EEPROM; Is it possible that there is a conflict
in the use of the memory addresses that make hard changes in GPIO12 not been recognized ???

Please folks if you have any clue I will appreciate very much
Regards

Try safe pins GPIO 4 and 5.

Thanks Costas but I am using them as outputs. They are working fine.
I tested also switching GPIO12 with GPIO2 and it worked, however I got my PCBs made to use GPIO12 which is my obvious preferred if I can find a reason of that not working.

Regards,

Blynk provides Blynk WiFi and Auth Token Provisioning with App Export. Please see Blynk myPlant demo: https://www.blynk.io/demo/
It is also supported for Blynk Board.
This is a very old topic, so I’m closing it.