homieiot / homie-esp8266

💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT
http://homieiot.github.io/homie-esp8266
MIT License
1.36k stars 308 forks source link

Default Configuration / config.json Upload #256

Closed KoffeinKaio closed 7 years ago

KoffeinKaio commented 7 years ago

Hey,

I test a lot with my esp/homie module and have to reapply the config every time a new firmware gets flashed. I tried to upload a config.json with arduino-ide espfs uploader but its always " /homie/config.json doesn't exist" (also the bin file takes ages to upload).

It there an option to specify the wifi/mqtt settings directly in the code or just apply a json string there?


Directory structure for data: Arduino\esp8266_homie\esp8266_homie.ino\data\homie\config.json Flashed after the program code, before and reseting in between. No success so far.

robchenski commented 7 years ago

I think that happened to me when I tried to upload config.json that way. I removed the \data\ folder and is contents from the sketch directory and reflashed without it which seemed to fix that (can't be 100% sure). But no more lost config message.

Obviously you'll need to setup config.json another way e.g. the app or webpage method. But maybe only once (-: I'm never certain if it's me doing something wrong or a problem with the code, just my experience.

marvinroger commented 7 years ago

I'll test whenever I have time to.

Sorry for the long response time, exams, you know...

marvinroger commented 7 years ago

@KoffeinKaio can you test with the web setup? http://setup.homie-esp8266.marvinroger.fr/

marvinroger commented 7 years ago

Please try changing the SPIFFS size from your Arduino IDE, it might be too big for your hardware. I had this issue once, and changing the SPIFFS size did solve this.