Closed cymen closed 6 years ago
The problem appears to be that the home page does a 302 which causes Chrome on Mac to keep requesting over and over. I think that is what is making it crash. If I instead access this URL:
I get a JSON response without issue:
{"temperature":69.0125,"setTemp":0,"power":0,"running":false,"upTime":0,"errors":[]}
This is just powering on, connecting to Sous Vide
AP and then attempting to access it. Should the wifi part be prompting me for joining to the AP? I wonder if the sketch is starting up too soon. The part I'm missing is what is actually serving at the root URL. I guess that goes right off to SPIFFS and maybe there is an index.html or something there? I'll go look.
So I see the files -- it's almost like anything that comes from SPIFFS causes a 302. The directly handled URLs work. So I'm not sure what is broken and/or what to try next. I did try downgrading the SPIFFSReadServer to 0.0.3 from 0.0.4 but that didn't help.
I had a chance to look at this again and I realized SPIFFS didn't work how I thought it did -- I didn't realize I needed a separate tool to upload data to SPIFFS. With that, it works!
If anyone else ends up here, what you want to do is go install this and run it after flashing the ESP8266 (or any time you change something in data directory):
https://github.com/esp8266/arduino-esp8266fs-plugin
I did realize though there is a bug in SPIFFSReadServer
. I'll do a PR to fix that later today.
@cymen Can you tell me what the error you found was in SPIFFSReadServer? I can't seem to get the front page to handle requests correctly, I'm wondering if that's part of the issue?
@RainmanJS So I got it working but I still couldn't set the temp or anything via the page -- the only thing that worked was clicking on a recipe. So I updated the recipes.htm file in data subdirectory for my cook and used that. The error is in how 404s are handled but you shouldn't hit that as long as you have the data directory flashed to SPIFFS.
I can get it to boot up and appear as an access point named Sous Vide however if I try to connect to it via an Android device or a Mac desktop, it eventually crashes like so:
I'm using the most recent versions of the required libraries via the Arduino library manager.