floatplane / MitsuQTT

Use ESP8266/ESP32 hardware to control Mitsubishi heat pumps via MQTT
GNU Lesser General Public License v2.1
3 stars 2 forks source link

Reorganize platformio.ini, add SPIFFS/LittleFS support #72

Closed floatplane closed 2 weeks ago

floatplane commented 2 weeks ago

This resolves #26 and adds support for choosing LittleFS/SPIFFS at compile time (controlled by the compiler flag USE_SPIFFS). Note that compiling ESPAsyncWebServer will still throw warnings about references to SPIFFS, but the offending code is never called.

We produce separate artifacts for each board:

image
floatplane commented 2 weeks ago

@Allram I am going to hold off on merging this for a couple of days - I had a spare WEMOS board that I was using for testing, but now I can't find it. Ordered a few more, along with some ESP32 boards for good measure.

Allram commented 2 weeks ago

I went on vacation. But i got some Wemos board with me (😂), so i will see if i can do some tests tonight.

floatplane commented 2 weeks ago

Noooooo relax and enjoy your vacation! 🌴 🍹 🌞

floatplane commented 2 weeks ago

Seems to be working as intended on ESP32 - ran through initial install and OTA update scenarios for both SPIFFS and LittleFS. Plumbed the firmware name through as a preprocessor define, so now it shows up in a couple of places:

hover text in footer on status page
image image

Still need to run through tests on the WEMOS board but I don't really foresee any issues at this point...

floatplane commented 2 weeks ago

Still need to run through tests on the WEMOS board but I don't really foresee any issues at this point...

lol this assumption was totally incorrect! so glad I tested this case.

something broken in platformio's ESP8266 toolchain caused the USE_SPIFFS definition to get silently dropped from the SPIFFS build targets. 612e5e4 was needed to get this working correctly, which doesn't really make sense but 🤷

https://github.com/floatplane/MitsuQTT/blob/612e5e4d4aed1e5997b20145a96b8c152bd25bc0/platformio.ini#L102-L103

floatplane commented 2 weeks ago

have verified that OTA updates work as expected for both LittleFS and SPIFFS builds on Wemos, so I think this is now good to go. this was more of a journey than I expected!

Allram commented 1 day ago

Works perfect, amazing job you did here 👌