s00500 / ESPUI

A simple web user interface library for ESP32 and ESP8266

Home Page:https://valencia.lbsfilm.at/midterm-presentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Still the blank-only-'Connected' UI

ericBcreator opened this issue · comments

I thought I read this issue was tackled but getting back to my clock project and recompiling with the latest updated libraries I still run into this issue (Wemos D1 mini):

espui-err-22116

I looked at your Mar-2021 project code and can see you were using the SPIFFS file system. I assume you've revised your code to use the LITTLEFS method [ESPUI.beginLITTLEFS()] instead of SPIFFS. And have updated your build platform's file system folder with the latest web related files needed to run ESPUI's revised filesystem AND have uploaded them to the ESP32 device.

So assuming you've done all that and there's still no-joy, it's time for a simple experiment. I suggest you temporarily change to the built-in file server [ESPUI.begin()]. If this works then there is something wrong with the LITTLEFS filesystem. Could be missing ESPUI web files in your project, a bug in the Arduino IDE's file system uploader, or a problem with the current ESPUI library.

  • Thomas

Hi Tomas,

I updated to ESPUI 2.2.1 and the other libraries (it depends on) to their latest versions.
Recompiled (cleared all flash memory) and tried both with and without using the filesystem (LITTELEFS): no difference, still the same issue.

Experimenting in the past seemed to indicate the number of controls (>60) affect this issue.
So in the project I added an option to limit the number of controls.
But it is unreliable, sometimes the web ui will display, sometimes not.
And it's also browser unrelated: the same issue with Firefox, Chrome, Edge and Safari.

BTW: it is only with ESP8266 boards, I have no problems with ESP32s:

ebc-32-221108

That is indeed an interesting problem. Maybe Firefox's F12->Console debugger will provide a clue on what is going on. This will show you the messages between the browser and ESPUI.

  • Thomas

F12 unfortunately provides no useful info. (Also) check this: the UI appearing with the Edge browser but a minute later blank with Firefox:

afbeelding

Edit: and a refresh with the Edge and I get the same blank-connected UI.

BTW: I mentioned this issue already 2 years ago, check this thread: #92
It seems Ian was working on a fix. Apparently it didn't work or it didn't made it into the latest version.

Another BTW: one thing I noticed is sometimes the blank UI displays 'Control Connected' and other times '#SSID# Connected'.

Your previous Issue #92 provided helpful background info. I'd have to agree that switching the ESP8266 to a ESP32 is the most practical solution when a lot of controls are used.

  • Thomas

And an issue I had with ESP32s was that sometimes a brownout error
triggered when connecting to Wifi causing the EEPROM settings to be erased.

The ESP8266 and ESP32 require clean & stable power. Many USB "charger" supplies and some USB cables just aren't up to this task. So if you are seeing brownouts then your power supply configuration, or the related wiring, needs some attention.

BTW, I've build many ESP32 projects and have not experienced your noted issue. But long ago I had random reboot problems with my ESP8266 devices that were solved with improvements to the power supply, which included better USB cables and additional supply filtering on the affected devices. And I have used this learned experience to help my ESP32 projects.

IIRC a while ago I read an e-mail mentioning that someone (Ian?) figured
out what was causing the blank screen and found another method of sending
the JSON data?

The current ESPUI release sends data in much smaller chunks, in a more coordinated way, thanks to MartinMueller2003's efforts. But since the latest release did not solve your problem I suspect that the issue is deep in a Arduino library.

  • Thomas

What I don't get is why - with the exact same setup (board and code) - sometimes the UI is blank and other times not (like in the picture I posted). That doesn't make sense, the logic program excution should be the same every time.

That's the dream, but reality is what it is. Program execution is not always the same each loop. For example, the browser's interaction with your device can occur at any time. Plus the ESP has interrupts that can delay entering other time critical functions.

Not to mention that there could be an issue somewhere in a library or your code. Uninitialized pointers, char buffers that are too small, compiler optimizations that misinterpret your intentions, and so on, can create random problems && endless frustrations.

Such things may cause a problem once-in-awhile or could trigger some odd memory corruption that requires a reboot to "fix."

But don't give up. It would be great if you or some other ESPUI user found the reason to this issue and published the fix. In the meantime I think swapping the ESP8266 with a ESP32 is a somewhat painless solution.

  • Thomas

you can do breakpoint debugging with some esp32 dev boards and platformio, the 8266 is a different story though...

Got same issue with d1_mini_pro esp8266.
The Edge browser showing connected and the blank screen. The same with mobile phone.
Im using the ESPUI Test from example.
EDIT: The example gui working out of the box.
Greets Lars

But don't give up. It would be great if you or some other ESPUI user found the reason to this issue and published the fix. In the meantime I think swapping the ESP8266 with a ESP32 is a somewhat painless solution.

I think #241 would help.