pixelit-project / PixelIt

PixelIt is an ESP8266/ESP32 and WS2812B LED Matrix based PixelArt display
https://pixelit-project.github.io
MIT License
334 stars 52 forks source link

SAVE CONFIG button not clickable ESP32 d1mini esp32-d0wdq5 rev 3 #287

Closed DSRocker closed 1 year ago

DSRocker commented 1 year ago

Hi, I use d1mini for siveral projects. I flashed the newest 2.2.0 (firmware_v2.2.0_wemos_d1_mini32.bin) It works fine with nodered; but I can't save the configs over the webUI. The button is not clickable. After configuration pixelIT doesn't save the configs. What to do? Thx

foorschtbar commented 1 year ago

Please try a private browser tab, delete cache and disable add-ons, they try it again. there is no known issue with the web ui

DSRocker commented 1 year ago

I tried it with Chrome and Safari. see attachment (Screenshots, Fotos) IP: ...235: ESP8266 IP: ...234: ESP32: "SAVE CONFIG" not possible https://drive.google.com/drive/folders/1W878EsqUMwiDXferPK8ozZJezjIms3Ja?usp=sharing

foorschtbar commented 1 year ago

The ESP32 WebUI doenst load settings. Save is only possible, if there anything you can save. Please show me the browser console log.

DSRocker commented 1 year ago

[2023-06-19T11:52:14] CheckUpdate: No new FW available [2023-06-19T11:52:13] CheckUpdate: Checking... [2023-06-19T11:52:13] SendTelemetry: Sending... [2023-06-19T11:52:10] WebSocketEvent: [0] Disconnected! [2023-06-19T11:52:01] WebSocketEvent: [2] Connected from 192.168.178.10 url: / [2023-06-19T11:51:49] WebSocketEvent: [1] Connected from 192.168.178.10 url: /

DSRocker commented 1 year ago

after activating NodeRedFlow: [2023-06-19T11:53:21] CreateFrames: JSON contains Text (Length: 199) [2023-06-19T11:53:21] HandleScreen: Incoming JSON length: 199 [2023-06-19T11:53:18] CreateFrames: JSON contains Text (Length: 199) [2023-06-19T11:53:18] HandleScreen: Incoming JSON length: 199 [2023-06-19T11:53:14] CreateFrames: JSON contains Text (Length: 196) [2023-06-19T11:53:14] HandleScreen: Incoming JSON length: 196 [2023-06-19T11:53:12] CreateFrames: JSON contains Text (Length: 199) [2023-06-19T11:53:11] HandleScreen: Incoming JSON length: 199 [2023-06-19T11:53:09] CreateFrames: JSON contains Text (Length: 199) [2023-06-19T11:53:09] HandleScreen: Incoming JSON length: 199 [2023-06-19T11:52:14] CheckUpdate: No new FW available [2023-06-19T11:52:13] CheckUpdate: Checking... [2023-06-19T11:52:13] SendTelemetry: Sending... [2023-06-19T11:52:10] WebSocketEvent: [0] Disconnected! [2023-06-19T11:52:01] WebSocketEvent: [2] Connected from 192.168.178.10 url: / [2023-06-19T11:51:49] WebSocketEvent: [1] Connected from 192.168.178.10 url: /

foorschtbar commented 1 year ago

browser console means the F12-Key or similar console of the desktop web browser, not the log inside the website.

DSRocker commented 1 year ago

oh... ;-) what should i look for? => screenshot of an issue: https://drive.google.com/file/d/1wrFQHLPl--SESFctqUjPpgnfLyWJGLpo/view?usp=drive_link

DSRocker commented 1 year ago
/#/:1 Uncaught SyntaxError: Unexpected token '}', "{"config":}" is not valid JSON at JSON.parse (<anonymous>) at t.value (build.js:1:6015) at t.value (build.js:1:5840) at forEach.t.WebSocket.<computed> (build.js:1:5540)
/#/:1 Uncaught (in promise) SyntaxError: Unexpected token 'N', "Not found" is not valid JSON
leaflet-src.js:590 listener not found
  | _off | @ | leaflet-src.js:590 -- | -- | -- | --   | off | @ | leaflet-src.js:499   | _spiderfierOnRemove | @ | leaflet.markercluster-src.js:2537   | onRemove | @ | leaflet.markercluster-src.js:661   | removeLayer | @ | leaflet-src.js:6663   | removeFrom | @ | leaflet-src.js:6548   | remove | @ | leaflet-src.js:6537   | remove | @ | leaflet-src.js:3755   | beforeDestroy | @ | LMap.js:305   | Ge | @ | vue.runtime.esm.js:2988   | En | @ | vue.runtime.esm.js:3987   | Cn.t.$destroy | @ | vue.runtime.esm.js:3758   | destroy | @ | vue.runtime.esm.js:4398   | C | @ | vue.runtime.esm.js:6641   | (anonymous) | @ | vue.runtime.esm.js:7004   | Cn.t.$destroy | @ | vue.runtime.esm.js:3776   | destroy | @ | vue.runtime.esm.js:4398   | C | @ | vue.runtime.esm.js:6641   | C | @ | vue.runtime.esm.js:6647   | (anonymous) | @ | vue.runtime.esm.js:7004   | Cn.t.$destroy | @ | vue.runtime.esm.js:3776   | destroy | @ | vue.runtime.esm.js:4398   | C | @ | vue.runtime.esm.js:6641   | C | @ | vue.runtime.esm.js:6647   | C | @ | vue.runtime.esm.js:6647   | C | @ | vue.runtime.esm.js:6647   | (anonymous) | @ | vue.runtime.esm.js:7004   | Cn.t.$destroy | @ | vue.runtime.esm.js:3776   | destroy | @ | vue.runtime.esm.js:4398   | C | @ | vue.runtime.esm.js:6641   | L | @ | vue.runtime.esm.js:6657   | k | @ | vue.runtime.esm.js:6780   | A | @ | vue.runtime.esm.js:6850   | k | @ | vue.runtime.esm.js:6724   | A | @ | vue.runtime.esm.js:6850   | (anonymous) | @ | vue.runtime.esm.js:7018   | Cn.t._update | @ | vue.runtime.esm.js:3730   | i | @ | vue.runtime.esm.js:3831   | t.get | @ | vue.runtime.esm.js:3407   | t.run | @ | vue.runtime.esm.js:3483   | Zn | @ | vue.runtime.esm.js:4077   | (anonymous) | @ | vue.runtime.esm.js:3114   | tn | @ | vue.runtime.esm.js:3036   | Promise.then (async) |   |     | Xe | @ | vue.runtime.esm.js:3061   | an | @ | vue.runtime.esm.js:3126   | Gn | @ | vue.runtime.esm.js:4162   | t.update | @ | vue.runtime.esm.js:3474   | t.notify | @ | vue.runtime.esm.js:695   | set | @ | vue.runtime.esm.js:941   | (anonymous) | @ | vue-router.esm.js:3003   | (anonymous) | @ | vue-router.esm.js:3002   | te.updateRoute | @ | vue-router.esm.js:2414   | (anonymous) | @ | vue-router.esm.js:2263   | (anonymous) | @ | vue-router.esm.js:2402   | i | @ | vue-router.esm.js:2001   | i | @ | vue-router.esm.js:2008   | Nt | @ | vue-router.esm.js:2012   | (anonymous) | @ | vue-router.esm.js:2397   | i | @ | vue-router.esm.js:2001   | (anonymous) | @ | vue-router.esm.js:2005   | (anonymous) | @ | vue-router.esm.js:2384   | (anonymous) | @ | vue-router.esm.js:2162   | f | @ | vue-router.esm.js:2362   | i | @ | vue-router.esm.js:2004   | i | @ | vue-router.esm.js:2008   | i | @ | vue-router.esm.js:2008   | Nt | @ | vue-router.esm.js:2012   | te.confirmTransition | @ | vue-router.esm.js:2392   | te.transitionTo | @ | vue-router.esm.js:2260   | e.push | @ | vue-router.esm.js:2715   | _e.push | @ | vue-router.esm.js:3037   | _ | @ | vue-router.esm.js:1139   | Ge | @ | vue.runtime.esm.js:2988   | n | @ | vue.runtime.esm.js:1786   | Co.o._wrapper | @ | vue.runtime.esm.js:7405
foorschtbar commented 1 year ago

There is a problem with the config file. please erase the complete flash: https://randomnerdtutorials.com/esp32-erase-flash-memory/

DSRocker commented 1 year ago

Is it ok to do this with "ESP32 Download Tool" V 3.9.2? What do I have to consider while flashing? SPI-Mode: QIO or DIO / QOUT or DOUT?! Adress?! @0 or @1000?!?

DSRocker commented 1 year ago

esptool.py v4.6.2 Found 1 serial ports Serial port COM7 Connecting..... Chip is ESP32-D0WD-V3 (revision v3.0) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: e0:5a:1b:a0:1a:98 Uploading stub... Running stub... Stub running... Erasing flash (this may take a while)... Chip erase completed successfully in 14.3s Hard resetting via RTS pin...

DSRocker commented 1 year ago

[1970-01-01T00:01:00] Setup: Starting UDP [1970-01-01T00:01:00] Setup: Webserver started [1970-01-01T00:01:00] DFPlayer: DFPlayer started [1970-01-01T00:01:00] CheckUpdate: Checking... [1970-01-01T00:01:01] CheckUpdate: New FW available [1970-01-01T00:01:01] SendTelemetry: Sending... [1970-01-01T00:01:01] Sync TimeServer: de.pool.ntp.org waiting for sync [2023-06-19T13:07:03] Auto Brightness: Lux: 0.00 set brightness to 20 [2023-06-19T13:07:04] HandleScreen: Incoming JSON length: 197 [2023-06-19T13:07:04] CreateFrames: JSON contains Text (Length: 197) [2023-06-19T13:07:05] WebSocketEvent: [0] Connected from 192.168.178.10 url: / [ 64061][E][vfs_api.cpp:24] open(): File system is not mounted

DSRocker commented 1 year ago

I'll try a new ESP32 d1_mini :-)

DSRocker commented 1 year ago

I tried with a new one... the same... in serial monitoring: [ 51412][E][vfs_api.cpp:24] open(): File system is not mounted

foorschtbar commented 1 year ago

Maybe @rliegmann can help, he fixed the ESP32 support. My PixelIts runs fine with ESP8266

DSRocker commented 1 year ago

OK. It will be great. Yes, on ESP8266 it works fine...

rliegmann commented 1 year ago

Hi foorschtbar,

i can try to help you What board do you have exactly? The "ESP32 d1_mini" or, From which board manufacturer. Another idea is to flash the Arduino IDE example sketch after deleting it. That solved the problem for me.

LG Ralf

DSRocker commented 1 year ago

Esp32 d1 mini (MH-ET).

rliegmann commented 1 year ago

OK, Try to lash the following code. It tests the file system. Then again the Pixelit am over it.

#include "FS.h"
#include "SPIFFS.h"

/* You only need to format SPIFFS the first time you run a
   test or else use the SPIFFS plugin to create a partition
   https://github.com/me-no-dev/arduino-esp32fs-plugin */
#define FORMAT_SPIFFS_IF_FAILED true

void listDir(fs::FS &fs, const char * dirname, uint8_t levels){
    Serial.printf("Listing directory: %s\r\n", dirname);

    File root = fs.open(dirname);
    if(!root){
        Serial.println("- failed to open directory");
        return;
    }
    if(!root.isDirectory()){
        Serial.println(" - not a directory");
        return;
    }

    File file = root.openNextFile();
    while(file){
        if(file.isDirectory()){
            Serial.print("  DIR : ");
            Serial.println(file.name());
            if(levels){
                listDir(fs, file.path(), levels -1);
            }
        } else {
            Serial.print("  FILE: ");
            Serial.print(file.name());
            Serial.print("\tSIZE: ");
            Serial.println(file.size());
        }
        file = root.openNextFile();
    }
}

void readFile(fs::FS &fs, const char * path){
    Serial.printf("Reading file: %s\r\n", path);

    File file = fs.open(path);
    if(!file || file.isDirectory()){
        Serial.println("- failed to open file for reading");
        return;
    }

    Serial.println("- read from file:");
    while(file.available()){
        Serial.write(file.read());
    }
    file.close();
}

void writeFile(fs::FS &fs, const char * path, const char * message){
    Serial.printf("Writing file: %s\r\n", path);

    File file = fs.open(path, FILE_WRITE);
    if(!file){
        Serial.println("- failed to open file for writing");
        return;
    }
    if(file.print(message)){
        Serial.println("- file written");
    } else {
        Serial.println("- write failed");
    }
    file.close();
}

void appendFile(fs::FS &fs, const char * path, const char * message){
    Serial.printf("Appending to file: %s\r\n", path);

    File file = fs.open(path, FILE_APPEND);
    if(!file){
        Serial.println("- failed to open file for appending");
        return;
    }
    if(file.print(message)){
        Serial.println("- message appended");
    } else {
        Serial.println("- append failed");
    }
    file.close();
}

void renameFile(fs::FS &fs, const char * path1, const char * path2){
    Serial.printf("Renaming file %s to %s\r\n", path1, path2);
    if (fs.rename(path1, path2)) {
        Serial.println("- file renamed");
    } else {
        Serial.println("- rename failed");
    }
}

void deleteFile(fs::FS &fs, const char * path){
    Serial.printf("Deleting file: %s\r\n", path);
    if(fs.remove(path)){
        Serial.println("- file deleted");
    } else {
        Serial.println("- delete failed");
    }
}

void testFileIO(fs::FS &fs, const char * path){
    Serial.printf("Testing file I/O with %s\r\n", path);

    static uint8_t buf[512];
    size_t len = 0;
    File file = fs.open(path, FILE_WRITE);
    if(!file){
        Serial.println("- failed to open file for writing");
        return;
    }

    size_t i;
    Serial.print("- writing" );
    uint32_t start = millis();
    for(i=0; i<2048; i++){
        if ((i & 0x001F) == 0x001F){
          Serial.print(".");
        }
        file.write(buf, 512);
    }
    Serial.println("");
    uint32_t end = millis() - start;
    Serial.printf(" - %u bytes written in %u ms\r\n", 2048 * 512, end);
    file.close();

    file = fs.open(path);
    start = millis();
    end = start;
    i = 0;
    if(file && !file.isDirectory()){
        len = file.size();
        size_t flen = len;
        start = millis();
        Serial.print("- reading" );
        while(len){
            size_t toRead = len;
            if(toRead > 512){
                toRead = 512;
            }
            file.read(buf, toRead);
            if ((i++ & 0x001F) == 0x001F){
              Serial.print(".");
            }
            len -= toRead;
        }
        Serial.println("");
        end = millis() - start;
        Serial.printf("- %u bytes read in %u ms\r\n", flen, end);
        file.close();
    } else {
        Serial.println("- failed to open file for reading");
    }
}

void setup(){
    Serial.begin(115200);
    if(!SPIFFS.begin(FORMAT_SPIFFS_IF_FAILED)){
        Serial.println("SPIFFS Mount Failed");
        return;
    }

    listDir(SPIFFS, "/", 0);
    writeFile(SPIFFS, "/hello.txt", "Hello ");
    appendFile(SPIFFS, "/hello.txt", "World!\r\n");
    readFile(SPIFFS, "/hello.txt");
    renameFile(SPIFFS, "/hello.txt", "/foo.txt");
    readFile(SPIFFS, "/foo.txt");
    deleteFile(SPIFFS, "/foo.txt");
    testFileIO(SPIFFS, "/test.txt");
    deleteFile(SPIFFS, "/test.txt");
    Serial.println( "Test complete" );
}

void loop(){

}
DSRocker commented 1 year ago

how to do it?

rliegmann commented 1 year ago

Hi, I've compiled it. Try this: sketch_aug2a.ino.bin.zip

DSRocker commented 1 year ago

after flashing: rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) invalid header: 0x29294346 invalid header: 0x29294346 invalid header: 0x29294346 invalid header: 0x29294346 invalid header: 0x29294346 invalid header: 0x29294346 invalid header: 0x29294346 invalid header: 0x29294346

DSRocker commented 1 year ago

Using 'COM7' as serial port. Connecting...... Detecting chip type... ESP32 Connecting....

Chip Info:

Leaving... Hard Resetting... Hard resetting via RTS pin... Done! Flashing is complete!

Showing logs: [07:44:20]E (141) esp_core_dump_flashrcore dump partition found! [07:44:20]E (141) esp_core_dump_flash: No core dump partition found! [07:44:20]E (10) SPIFFS: mount failed, -10025 [07:44:25]Listing directory: / [07:44:25]Writing file: /hello.txt [07:44:25]- file written [07:44:25]Appending to file: /hello.txt [07:44:25]- message appended [07:44:25]Reading file: /hello.txt [07:44:25]- read from file: [07:44:25]Hello World! [07:44:25]Renaming file /hello.txt to /foo.txt [07:44:25]- file renamed [07:44:25]Reading file: /foo.txt [07:44:25]- read from file: [07:44:25]Hello World! [07:44:25]Deleting file: /foo.txt [07:44:25]- file deleted [07:44:25]Testing file I/O with /test.txt

DSRocker commented 1 year ago

flashing pixelit.bin V2.2.0

Using 'COM7' as serial port. Connecting...... Detecting chip type... ESP32 Connecting....

Chip Info:

Leaving... Hard Resetting... Hard resetting via RTS pin... Done! Flashing is complete!

Showing logs: [07:47:37]E (445) esp_core_dump_flash: No core dump partition found! [07:47:37]E (445) esp_core_dump_flash: No core dump partition found! [07:47:37]Mounting file system... [07:47:37]E (22) SPIFFS: mount failed, -10025 [07:47:37][ 31][E][SPIFFS.cpp:89] begin(): Mounting SPIFFS failed! Error: -1 [07:47:37]Failed to mount FS [07:47:37][BH1750] ERROR: received NACK on transmit of address [07:47:37][1970-00-00T00:00:00] Setup: BMP280 Trying [07:47:37][1970-00-00T00:00:00] Setup: No BMP280, BME280 or BME 680 sensor found [07:47:38][1970-00-00T00:00:00] Setup: No DHT Sensor found [07:47:38]Framebuffer_GFX::begin Width: 32 Height: 8 Num Pixels: 256 [07:47:38][1970-00-00T00:00:00] Setup: Software Serial started [07:47:40]wm:AutoConnect [07:47:41]wm:No wifi saved, skipping [07:47:41]wm:AutoConnect: FAILED [07:47:41]wm:StartAP with SSID: PIXELIT [07:47:41]wm:AP IP address: 192.168.4.1 [07:47:41][1970-01-01T00:00:03] Hotspot: Waiting for WiFi configuration [07:47:42]wm:Starting Web Portal

rliegmann commented 1 year ago

I have now tried it with various ESP32 boards. Has always worked. I suspect that this is a specific problem with this board. The way I read it, you have now taken a different ESP. Does that work for you then? If so, we can close the Issus.

LG

DSRocker commented 1 year ago

I tried it with the same Version of the Board; don't work :-/ I don't know why. If you like you can close this issue. I have to find the reason for this issue by my self.

Thanks

DSRocker commented 1 year ago

Thx