Page 1 of 1

Implementing WiFiManager ESP32

Posted: Fri Apr 01, 2022 7:19 am
by jollybv
Hi Guys

Is there a way in Flowcode to set the SSID and Password then saving it to memory without hard coding it into the program? I have been watching a few YouTube Videos and there seems to be a way using WiFiManager but I have no clue how to add this to flowcode.
I was thinking of using a button OnDemand function of the WiFiManager Sketch (the time stamp in the below video is 11:45)

https://www.youtube.com/watch?v=VnfX9YJbaU8

It would be greatly appreciated if someone could point me in the right direction as I have never worked with Arduino sketches and have no idea how to add them to Flowcode.

Re: Implementing WiFiManager ESP32

Posted: Fri Apr 01, 2022 9:48 am
by BenR
Hello,

Here's one I did earlier, let us know if you have any problems.

viewtopic.php?f=10&t=634

Re: Implementing WiFiManager ESP32

Posted: Sun Apr 03, 2022 9:34 am
by jollybv
Thanks Ben

I will give it a try.

Re: Implementing WiFiManager ESP32

Posted: Mon Apr 04, 2022 4:12 pm
by jollybv
Hi Ben

I exported your macro "Initialise_WIFI" then imported it into my program I also added a circular buffer and web server and copied your setting but I cant seem to be able to get this to work I can connect to the network but there is no fields to fill in so I'm not sure what I'm doing wrong? It seems to be pointing to a different web page.
Screenshot_20220404-133651_Settings.jpg
Screenshot_20220404-133651_Settings.jpg (22.42 KiB) Viewed 3559 times
Screenshot_20220404-133618_Brave.jpg
Screenshot_20220404-133618_Brave.jpg (18.21 KiB) Viewed 3559 times
This is what i am getting back on the UART not sure if it will be of any help, must be something so small that I'm missing as if i compile your to example "ESP32_Config_Wifi" everything works. Also I'm not sure but I'm using modbus as well and a number of other components but I first go call the Initialise_Wifi Macro and that's where i sit so nothing else is initialised except the UART for testing purposes.
Initialise WIFI.txt
(5.81 KiB) Downloaded 464 times

Re: Implementing WiFiManager ESP32

Posted: Tue Apr 05, 2022 2:44 pm
by jollybv
Hi Ben

I found the issue I never filled in the HTML Code it all seems to be working

<html>
Flowcode ESP32 Demo - Network Config Page
<form action="submit.htm">
<label for="0">SSID</label>
<input type="text" placeholder="Enter SSID" name="0" required><br />
<label for="1"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="1" required><br />
<button type="submit" class="registerbtn">Register</button>
</form>
</html>

Re: Implementing WiFiManager ESP32

Posted: Tue Apr 05, 2022 3:46 pm
by jollybv
Hi Guys

There seems to be a problem with the SSID & Password fields I can fill them in correct on the web page 192.161.4.1 but if you add an @ sign anywhere in the string that is where it reads up to E.G
SSID Hellow@world we will only receive Hellow and Password 1234@5678 in it will only read 1234 for the password. I can user any of the characters ($ # @ * &) and it stops reading when i get to the character, any ideas on how i can rectify this?