Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML pages won't load #1

Open
kylix34 opened this issue Oct 8, 2020 · 5 comments
Open

HTML pages won't load #1

kylix34 opened this issue Oct 8, 2020 · 5 comments

Comments

@kylix34
Copy link

kylix34 commented Oct 8, 2020

Hi Jean-Emille!

I managed to compile (there was some error about RFM69 library not having the promiscuous mode defined but I downloaded v1.4.0 of the library and it worked. I think v1.4.2 doesn't have anymore the promiscuous mode). The ESP8266 successfully connects to my WiFi network but I get: "404: File Not Found" error when accessing ESP8266's IP address into the browser.

PS C:\Users\Kylix\Desktop\ESP8266_Thermostat> pio run -t uploadfs Processing thermostat (platform: espressif8266; framework: arduino; board: esp12e) --------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 (2.6.2) > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:

  • framework-arduinoespressif8266 3.20704.0 (2.7.4)
  • tool-esptool 1.413.0 (4.13)
  • tool-esptoolpy 1.20800.0 (2.8.0)
  • tool-mklittlefs 1.203.200522 (2.3)
  • tool-mkspiffs 1.200.0 (2.0)
  • toolchain-xtensa 2.40802.200502 (4.8.2)
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 36 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- 6.11.3+sha.a6f029d
    |-- 2.6.0+sha.3416616
    |-- 3.1.0+sha.9dc9ad1
    |-- 1.4.2+sha.8814040
    | |-- 101.1.3
    | | |-- 1.0
    | |-- 1.0
    |-- 2.1.1+sha.2626b26
    | |-- 1.0
    | |-- <Ethernet(esp8266)> 1.0.4
    | | |-- 1.0
    | |-- 1.0
    | |-- 1.0
    |-- 0.0.0+sha.1574db4
    |-- 1.0
    |-- 1.0
    | |-- 1.0
    | |-- 1.2
    | | |-- 1.0
    |-- 1.0
    | |-- 1.0
    |-- 1.2
    | |-- 1.0
    |-- 1.0
    |-- 1.0
    |-- 101.1.3
    | |-- 1.0
    Building in release mode
    Warning! '-Wl,-T' option for specifying linker scripts is deprecated. Please use 'board_build.ldscript' option in your 'platformio.ini' file.
    Building file system image from 'src\data' directory to .pio\build\thermostat\spiffs.bin
    /config.json
    /schedule.json
    /thermostat.json
    Looking for upload port...
    Auto-detected: COM4
    Uploading .pio\build\thermostat\spiffs.bin
    esptool.py v2.8
    Serial port COM4
    Connecting....
    Chip is ESP8266EX
    Features: WiFi
    Crystal is 26MHz
    MAC: a0:20:a6:12:15:01
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 921600
    Changed.
    Configuring flash size...
    Auto-detected Flash size: 4MB
    Compressed 65536 bytes to 691...

Writing at 0x000eb000... (100 %)
Wrote 65536 bytes (691 compressed) at 0x000eb000 in 0.0 seconds (effective 23832.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
========================================================== [SUCCESS] Took 6.48 seconds ==========================================================

Environment Status Duration


thermostat SUCCESS 00:00:06.482`

@Jean-Emile
Copy link
Owner

Jean-Emile commented Oct 12, 2020

Hi kylix34 ,

I fixed the compilation issue of RF69 (thanks). The web interface is not hosted in the ESP8266 firmware compared to the official version. Indeed, in my version, I'm using a websocket server to expose the thermostat services and the web interface is available in this directory: https://github.com/Jean-Emile/ESP8266_Thermostat/blob/master/html

In particular the thermostat.html file is important, the other ones are not finished. You can upload these files on a web server. NOTE: the esp8266 have to hosted in the same network (see https://github.com/Jean-Emile/ESP8266_Thermostat/blob/master/html/wifi.js#L2)

NOTE: this is still a unstable version even if this is deployed in my home since almost 2 years.

Best regards,

@kylix34
Copy link
Author

kylix34 commented Oct 12, 2020

Thanks for the updates!!!

@kylix34 kylix34 closed this as completed Oct 12, 2020
@kylix34 kylix34 reopened this Oct 12, 2020
@kylix34 kylix34 closed this as completed Oct 12, 2020
@kylix34
Copy link
Author

kylix34 commented Oct 13, 2020

Hello again, Jean-Emile!
I installed XAMPP on my laptop and:

  1. I had to change this line (in wifi.js) var wb_url = 'ws://esp8266.local:81/' into var wb_url = 'ws://192.168.1.16:81/'. Otherwise, the thermostat webpage was not receiving data from the ESP8266.
  2. The sliders block still doesn't show in the webpage. In the console I see a few errors like this:
    thermostat.js:324 Uncaught TypeError: Cannot read property 's' of undefined at update (thermostat.js:324) at WebSocket.connection.onmessage (thermostat.js:91)
    I had to uncomment the block 57-65 in thermostat.js but setting the temperature/interval doesn't get saved
  3. The timezone is not saved after changing it inside thermostat webpage

I understand it's still a work in progress project ;)

@kylix34 kylix34 reopened this Oct 13, 2020
@Jean-Emile
Copy link
Owner

Jean-Emile commented Oct 13, 2020

Hi,

(1)=> Great.

(2) => By default, the thermostat firmware did not have any schedule. I did not yet add the files in the src/data folder.
One solution could be to use the unit tests for boostraping the thermostat:
https://github.com/Jean-Emile/ESP8266_Thermostat/blob/master/test/test_remote/init_thermostat.py

Before to execute the script, you have install the dependency
pip install -r requirements.txt
https://github.com/Jean-Emile/ESP8266_Thermostat/blob/master/test/test_remote/requirements.txt

(3) => this is not implemented yet :( but you can change the config.json file and pio run -t uploadfs

@kylix34 kylix34 closed this as completed Oct 16, 2020
@kylix34 kylix34 reopened this Feb 4, 2022
@kylix34
Copy link
Author

kylix34 commented Feb 4, 2022

Hi Jean-Emile! Any update on the source code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants