Replies: 3 comments 5 replies
-
Hi, After reading your message yesterday I gave it a thought when I was out on my road bike today :-) I guess moving html-stuff to SD is not an issue as everybody you wants to run a Tonuino knows how to put stuff onto the SD. And for sure everybody knows SD (wheras SPIFFS I'd have to explain). IMHO the main-problem is that users don't know when it's about time to copy a never version of a html-file to SD. But what if there'd be a version coded in the html-file and in the server as well. In that case we'd only need a JSON-request that's triggered by Js, that compares both und tells the user it's time to update? So whenever there's a html-update, both versions (server and GUI) need to be changed. But this should be easy for a developer. |
Beta Was this translation helpful? Give feedback.
-
Ich war auch der Meinung, dass es sinnvoll wäre die Html-Dateien ins SPIFFS zu legen. Hast du dabei mal getestet ob du Konflikte mit der SD-Karte hast? I was also of the opinion that it would make sense to put the html files in the SPIFFS. Have you ever tested whether you have conflicts with the SD card? |
Beta Was this translation helpful? Give feedback.
-
Hi Gemeinde, ich verstehe noch nicht ganz den Nutzen warum die HTML-Dateien aus dem SPIFFS kommen sollten, wenn dieses Projekt doch eh schon eine SD-Karte hat. Warum nicht einfach die SD-Karte mit den HTML-Dateien befüllen? Das bekommen auch Neulinge gut hin. Außerdem lassen sich die Daten dann leichter anpassen. Wenn jemand z.B. ein eigenes Logo/Brand verwenden möchte ändert er dies einfach auf der SD-Karte. Übrigens Logo-Änderung steht ja auch gerade an.. Könnte mir vorstellen das dieses Projekt in naher Zukunft einen Startsound und Advertising Soundfiles bekommt (so wie beim Tonuino). Das könnte dann Alles als Verzeichnisstruktur zum Kopieren auf SD-Karte bereitgestellt werden.. |
Beta Was this translation helpful? Give feedback.
-
Hi,
as you mentioned that the way the HTML code is currently stored is not optimal and you consider moving them to the SD card, there may be another solution.
I tested the SPIFFS filesystem that is active in many partition layouts. For example nearly 1MB are reserved for SPIFFS in huge_app and can't be used by the firmware.
SPIFFS is intended for file storage like HTML. You just move your plain HTML files to a "data" folder and run "Build filesystem image" and "Upload filesystem image" in platformio. Here are the few code changes needed, if you want to see them.
Maybe these steps can also be automated via extra_scripts or something.
Beta Was this translation helpful? Give feedback.
All reactions