Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Wozzy
#26212 I just found out about WebConfig for the ESP8266
Really awesome work...Thank You
I have one question though.
How do you set the AP channel?
My ESP-01 always defaults to channel 11.
It's a very crowded channel in my area.

I tried the following modifications to the ESP_WebConfig.ino:

Code: Select all#define ACCESS_POINT_NAME  "ESP002AP"            
#define ACCESS_POINT_PASSWORD  "12345678"
#define ACCESS_POINT_CHANNEL 4

...
   
   if (AdminEnabled)
   {
      WiFi.mode(WIFI_AP_STA);
      WiFi.softAP( ACCESS_POINT_NAME ,  ACCESS_POINT_PASSWORD, ACCESS_POINT_CHANNEL);

When the ESP8266 resets, it comes up momentarily on channel 4, the quickly reverts back to channel 11

***PROBLEM SOLVED***
I just discovered that as soon as it connects to the internet through the local WiFi router, It resets the AP channel to be the same as the WiFi Station channel that it is connected to.


Thanks
User avatar
By HennaceTheMenace
#27551 Really great project, this is by far the most thorough web-esp interface i have seen. Thank you for putting it out there for everyone to learn from, I will definitely be leveraging the web config master as well as ridge's irrigation code.

I was curious though, as I am trying to integrate this with other automated processes, can this be made so the action to send data to the esp from the web client is an http get or post request, instead of the check boxes or sliders. I already have several things linked to tasker and unified remote on my phone, and I am hoping to find a way to send the control commands directly from one of those, that way you could have one location (a single remote on unified remote) that could control any function for any number of esp's

Additionally is there a way to eliminate the need for the save button step, couldn't that just be called as soon as you click any checkbox/ move any slider, this would just make unified remote integration alot easier as you would hopefully only need to send one get or post request.
User avatar
By Luís Magalhães
#27608
DaniloFix wrote:I tried loading my NodeMCU using esp-12e with ESP_WebConfig_Master example. Flashed fine. But I noticed that it was difficult to load the pages once I got connected to the ESP.

Tried a simple ping from terminal:

--- 192.168.4.1 ping statistics ---
124 packets transmitted, 47 packets received, 62.1% packet loss
round-trip min/avg/max/stddev = 0.908/55.091/364.515/82.694 ms

62.1% packet loss

Did you figure out what the problem was? I'm having the same issue... I can't load the admin.html at all, my laptop can't connect to the wlan of the ESP and everything is just a mess...

Tried flashing with some other webserver examples and did the same...

--- 192.168.4.1 ping statistics ---
10 packets transmitted, 10 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.654/1.015/2.540/0.557 ms

--- 192.168.4.1 ping statistics ---
60 packets transmitted, 60 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.635/1.543/4.540/1.100 ms

Then tried to load your example again:

--- 192.168.4.1 ping statistics ---
12 packets transmitted, 6 packets received, 50.0% packet loss
round-trip min/avg/max/stddev = 2.510/45.995/114.656/35.044 ms

Also I couldn't load /admin.html at all... Something is not running as it should.

I'm on version 1.6.5-947-g39819f0
User avatar
By JayEff
#27710 Hi! First off, what an awesome and versatile project, I love it!

I have a little problem (that might be related to my router configuration?). Everything works like a charm, I did have one crash but only one so far.

Here's my Problem: When I go to 192.168.1.4/ on my phone while connected to the access point, I can see the example.html and everything works fine. But my PC doesn't have a WiFi connection, so I figured I could just navigate to the IP my Router gives the module and reach the example page that way, however, all I get is a connection timeout. This is not too much of a problem as my plan is to use the device as an access point anyways, but it would be convenient for testing at home if I could connect to it via my PC's browser.

Is this a router config problem or do I need to change something in the module's code?

(an unrelated side question, is it normal that my ESP-03 module gets quite hot during operation?)

In any case, time to try and control the GPIOs via webinterface! Thanks for this great project!