Report Bugs Here

Moderator: Mmiscool

User avatar
By forlotto
#41420 maybe a timer needs to be added after grabbing the info to interpret if the data has been updated or not or maybe you need to store the data in another file and then move that data to this file IDK but something odd is happening and dunno the reasoning something to do with my flashing maybe errr I'll have to look more this weekend. I've about lost my marbles for tonight lol need sleep! :lol:
User avatar
By Zeeshan
#41437
forlotto wrote:AP name does not appear to change stays stuck at default name ESP.

This becomes a problem when someone has multiple ESP's in their home for instance.

The settings page and the wifi all seem better being less persistent but, there are some issues.

1. AP Name as mentioned
2. Double connection type AP and STA seem to cause the esp to crash.

Resolutions:
- Figure out what is causing ESP SSID to over ride the name I enter LRLIGHT for my SSID
- Have a connect button that will put it in station mode and drop AP until you hit the disconnect button which will bring up AP only mode and take the saved settings out of memory but retain them on the page. While it is nice having both connections the ESP is unable to handle them and handle a simple program without crashing so it is rather pointless to have both modes running... However maybe the ESP32 will fix this with the multicore processor and tons of extra ram.


Just my observations and 2cents.

Believe me I'm not knocking the effort it wasn't fruitless I kinda helped push for dual connection but the truth is if you connect to AP and the settings are remembered by the PC you are connecting from and it is connected on station as well from the same or another device you try to control it it causes the ESP to hang.

This is where people are having troubles I think which is the reason for my suggestion on the fix. The esp in current form is not a have your cake and eat it too device just not enough hardware to handle everything albeit it is and was a valiant effort. Problem is it only works for one or the other not both we just have to live with this plain and simple.

PS the updates were nice!


I'm looking for authentication code for esp8266 in which it asks for username and password before giving access to any client.
User avatar
By forlotto
#41479 @Zeeshan something like this ? viewtopic.php?f=40&t=6732#p37677

You can add authentication in the settings page.

If you mean authentication for your code. You will first need to define a register and its value of zero. Then you will have to include in your code the checking for valid password if the password is correct you will set that register to lets say a 1. Once correct you can view the page you are allowed to see. On the web page you are allowed to see it should first check the register to see if the page is permitted to load and if it is permitted to load you it should first set a timer to time out after say 10 minutes setting the register back to zero and then begin loading the page or application.

This is your code in english you will have to translate it to basic as I really have not tried nor thought of doing this in this manner until you asked this question.

@mmiscool below this line

Very awesome it has been an ongoing battle for me would be nice to get out of this problem I remember with earlier versions I had the same trouble then all of a sudden one of the firmware updates it just started working like a charm but it is next to impossible again to set up an AP using the settings page which is a preference of mine a settings page.

Would be nice to see something implemented to better handle settings.

Possibly a clear wifi info button or something some way of being sure that the old info is not replaced with ESP which is hard coded in the binary it used to say ESP and then some random digits now it just says ESP and it is unchageable or at least that is my issue something is not 100% sound I cant for the life of me figure it out best I can do is keep flashing firmware or just add the settings to my application...

Would really like to finish up my dimmer and get it installed in the ceiling or the wall but out of preference I would like for it to be something you connect to named LivingRmLights so that you know what you are connecting to and changing. As I said I could add it to the code but I am looking to keep the settings page locked down.

One other thing I am curious of would it be possible to handle something like a hosts file. This would be cool because you could connect to it and have the hosts file setup so that the page you visit would be http://www.livingrmlights.com and it would direct you to 192.168.4.1 .... Or possibly upon opening any browser and visiting any page at all it except for settings edit vars it would take you to input? automatically no matter what page is requested that would be way better! Have all pages go to the program accept for pages that have to do with the operation of the basic IDE.