Implementing WiFiManager ESP32

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jollybv
Posts: 136
http://meble-kuchenne.info.pl
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 41 times
Been thanked: 12 times

Implementing WiFiManager ESP32

Post 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.

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 503 times
Been thanked: 686 times

Re: Implementing WiFiManager ESP32

Post by BenR »

Hello,

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

viewtopic.php?f=10&t=634

jollybv
Posts: 136
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 41 times
Been thanked: 12 times

Re: Implementing WiFiManager ESP32

Post by jollybv »

Thanks Ben

I will give it a try.

jollybv
Posts: 136
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 41 times
Been thanked: 12 times

Re: Implementing WiFiManager ESP32

Post 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 3305 times
Screenshot_20220404-133618_Brave.jpg
Screenshot_20220404-133618_Brave.jpg (18.21 KiB) Viewed 3305 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 441 times

jollybv
Posts: 136
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 41 times
Been thanked: 12 times

Re: Implementing WiFiManager ESP32

Post 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>

jollybv
Posts: 136
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 41 times
Been thanked: 12 times

Re: Implementing WiFiManager ESP32

Post 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?

Post Reply