Coder Social home page Coder Social logo

Comments (11)

ba58smith avatar ba58smith commented on May 29, 2024 1

The instructions for migrating to littleFS look very straightforward. I'll give it a go - and hopefully will have more success than my ArduinoJson 6 migration attempt! :-)

from sensesp.

ba58smith avatar ba58smith commented on May 29, 2024 1

#1 above is addressed by PR #188 .

By using #1 you reference another issue.
Maybe not a big deal, but anyway...
Maybe a use a task list in the first post instead in future?

Ah yes... Fixed.

from sensesp.

mairas avatar mairas commented on May 29, 2024

SPIFFS deprecation is going to be interesting. I had a quick look at LittleFS and while it seems technologically superior, every file reserves a minimum of 4 KiB of "disk space". Since we in a typical configuration only have 64 KiB to begin with, it means there's only room for 16 files. At the moment we save the sensor/transform config filenames equal to their config paths, which in SPIFFS are single files but in LittleFS would be several (I assume one directory would be one file). So, it's possible we'd easily run out of disk space unless the config saving approach gets changed. Not a showstopper but something to keep in mind.

from sensesp.

ba58smith avatar ba58smith commented on May 29, 2024

@mairas - Would we change the config saving so that there would be only one file, which would be a single JSON file, with all the JSON representing the individual configuration items (each sensor and transform, the wifi credentials, hostname, etc.) being added together to make one big nested array, or an array of nested arrays?

from sensesp.

ba58smith avatar ba58smith commented on May 29, 2024

Looking at https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#filesystem, I wonder if we really do need to worry about using too much memory. Maybe with an ESP8266 with 1 meg, but we've set the minimum to be the 4 meg version, so if it doesn't work with the 1 meg version, I wouldn't feel bad about that. And with the 4 meg version, the minimum file system size is 1 meg. That's 256 files if each one is 4K.

from sensesp.

mairas avatar mairas commented on May 29, 2024

A single config file might be awkward to deal with. You'd need to store all of that in memory and parsing would be more complex. But you're right; I was calculating based on 64k filesystem size and in practice it's always larger than that. On ESP8266 our default is 1M and while the currently used min_spiffs partition layout on ESP32 provides only 180K for the filesystem, it would be quite simple to customize that.

from sensesp.

ba58smith avatar ba58smith commented on May 29, 2024

RE: HTTPClient::begin(String) - see https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/examples/BasicHttpClient/BasicHttpClient.ino for an example of how to do it now.

from sensesp.

ba58smith avatar ba58smith commented on May 29, 2024

The first item in this Issue is addressed by PR #188 .

from sensesp.

ba58smith avatar ba58smith commented on May 29, 2024

The second item in this Issue is addressed by PR #191 .

from sensesp.

tedenda avatar tedenda commented on May 29, 2024

#1 above is addressed by PR #188 .

By using #1 you reference another issue.
Maybe not a big deal, but anyway...
Maybe a use a task list in the first post instead in future?

from sensesp.

ba58smith avatar ba58smith commented on May 29, 2024

While the ESP8266 has deprecated SPIFFS, ESP32 has not yet even written an interface for LittleFS. So at this point, it would have to be a case of using SPIFFS for ESP32 while switching ESP8266 to LittleFS. Doesn't seem like a good plan. I'll close this issue, and if/when ESP32 supports LittleFS, or when ESP8266 ceases support for SPIFFS, we'll deal with it then.

from sensesp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.