-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial web interface #231
Comments
Hi, when using platform.io, there is the option to build and upload the filesystem in the platformio menu (in VS code on the left). For the other problem: at first, you should maje sure that you upload the current file system (build fs / upload fs). Further, the bootstrap and css stuff for the web app is loaded from the internet and will only work if your MCU has access to internet. esp8266-fastled-webserver/esp8266-fastled-webserver/data/index.htm Lines 428 to 440 in 6f1b748
esp8266-fastled-webserver/esp8266-fastled-webserver/data/index.htm Lines 10 to 17 in 6f1b748
But at first you should ensure that both LittleFs Filesystem and sketch have been uploaded correctly. Hope this helps... |
Hi, Thanks so much. I run my iOT devices on a private network, due to a nosey neighbor (apparently) I edited index.htm, and now it works like a charm. Any chance you guys will be doing the same magic on esp32-webserver? I appreciate PlatformIO, very much. |
Glad to hear it! The goal is to get both ESP8266 & ESP32 working with the same code. |
Yeah, we could use something like this: https://stackoverflow.com/a/30547720 |
So pop an error message, and fallback to the built-in web server HTML and CSS? |
I spent some time working on this, and I cannot get the latest changes in master to serve static files with the correct I'm not even trying anything fancy with fallback, just have the I've tried searching around, but not finding much. @henrygab or anyone else have any ideas? This seemed to work at least before the switch from SPIFFS to LittleFS. |
I've confirmed that using the ESP8266 Arduino core version 3.0.2 fixes the Also note that I had to use Arduino to compile and upload using the 3.0.2 core. I could not get it to build using PlatformIO. I got a variety of errors while trying different changes to platformio.ini. |
Agreed, PlatformIO won't compile the files. Too bad, but I'm sure this will get worked out. My “thing” is now flickering on all six of the first pixel strings. Instead of the sliders, I'm getting a text box and pull down menu (no CSS loaded), and I have to reload the page after any changes. |
I've had visitors the past few days, and thus haven't had much time to code. Two things: v3 CoreIs the v3 core the one where Espressif moved to using C++17, the std library, and throwing exceptions? If so, there's a number of subtle changes that come along with that, and thus I would not moving to them without significant investigation, review, and testing. Ideas on
|
@dherkes I only get the flickering on the first pixel of each string (reproduced on the one first pixel on F256 and all five first pixels on F1024) when I upload using Arduino and have the latest ESP8266 board installed. If you're using Arduino, go to the boards manager and install version 2.7.4. If you're using PlatformIO, then I'm not sure. @henrygab no problem! Yes, it looks like the latest version does use C++17. There is an option in the Arduino Tools menu to disable exceptions.
I'll keep digging. |
Did you try this? Cannot test right now but could maybe check later today... EDIT: Nevermind. the Solution is below. No need to switch to the >= V3 core right now... |
Few things identified, see #240 for proposals for corrections. The main problem for the contentType and stream response is that someone set MIMETYPE_MINIMAL in platformio.ini (no offense ;-) ). This limits the abilities of the Webserver to detect the content type. |
At least the correct content type for the file being served static.
Fixes Partial web interface #231 when loaded from file system
Yes, I recall that option to disable exceptions existed in earlier versions ... it's fairly important for some libraries that expect IIRC, when IDF was moving to C++17, that option to disable exceptions was removed. That was obviously an obstacle ... even if the exceptions could be disabled via a hack, there was a significant risk that the system code was relying upon the ability to catch exceptions (vs. checking return-value), and thus lose the ability to gracefully fail in legacy code. Maybe this is no longer an issue? Maybe they enabled C++17 without requiring exception handling in all client code? I honestly don't know... but I figure it's better to raise a warning flag early, even if wrong, rather than have major work start only to later discover compatibility bugs for existing Arduino libraries (or at least the ones used in the project). |
Script function to load css/js from the ESP when offline.
When I compile and upload the sketch and Wi-Fi setting (either /dev/ttyUSB, or OTA), the main screen of the web server does not show as much detail as it once did. For example, the sliders are missing, as are the drop-down menus allowing the choices of lighting routines. I have attached a screenshot. In the simple sketch page, the on/off button no longer works, and the changes do not persist after a reboot. I also have to report that when I compile using PlatformIO, the file system is not pushed to the MCU. I must say, PlatformIO is easy to operate!
Thank you for all of your hard wok.
The text was updated successfully, but these errors were encountered: