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

UI Bundle loading failed in client's browser #472

Closed kisieel closed 6 years ago

kisieel commented 6 years ago

Hey,

I'm playing arround with homie these days an really appreciate all the effort you put into it. Good job!

However, I'm struggilng with one issue. I want my device to serve a simple web page when in configuration mode providing instructions fon users on how to configure the device.

I'm using nodemcu with ESP-12E on board.

As a first step I'm trying to make the ui_bundle you provided up and running. I managed to upload it to spiffs without any issues.

It also seems that the file is being found by firmwre:

Received captive portal request: Redirect: http://192.168.123.1 Received captive portal request: UI bundle found

I set a proper build flag in my platformio.ini file to make sure there's enough space (would be a pitty not to use at least part of my ESP's 4mb memory):

build_flags = -Wl,-Tesp8266.flash.4m1m.ld

However, when I connect to the AP all I see is a white screen on my desktop and "Page loading failed" message on my iPhone.

Any ideas?

kisieel commented 6 years ago

Worth to mention that I'm using fresh version of homie: lib_deps = git+https://github.com/marvinroger/homie-esp8266.git#develop

timpur commented 6 years ago

Nothing comes to mind. Have you pointed the browser at http://192.168.123.1/ when connected to the ap ?

kisieel commented 6 years ago

Sure thing. I also managed to upload the configuration file with curl using the IP, but only then. The one I uploaded to spiffs with: platformio run --target buildfs platformio run --target uploadfs didn't work.

kisieel commented 6 years ago

Sorry for bothering you. I'm colsing the ticket now. It was probably some trash in my flash. I ran esptool.py -p com4 erase_flash, reflashed all again and it started to work.

luebbe commented 6 years ago

trash in my flash

that's my quote of the day :)

timpur commented 6 years ago

Love it :P