Battery-Emulator/Software/src/devboard/webserver
2024-11-15 23:03:23 +02:00
..
advanced_battery_html.cpp Merge branch 'main' into feature/LEAF-30-reset-SOH 2024-11-15 23:03:23 +02:00
advanced_battery_html.h Pre-commit fix 2024-10-11 13:54:38 +03:00
cellmonitor_html.cpp Make cellmonitor handle 2 batteries 2024-07-11 23:16:55 +03:00
cellmonitor_html.h Data layer introduction (#254) 2024-04-15 22:26:10 +02:00
events_html.cpp Add feature to clear events 2024-09-26 22:01:21 +03:00
events_html.h Optimize Event Ordering by Storing Milliseconds and Handling Rollovers 2024-09-20 02:03:49 +01:00
index_html.cpp Add ssidAP as header name 2024-05-19 21:57:31 +03:00
README.md Web Server Authentication 2024-09-08 20:47:37 +01:00
settings_html.cpp Make discharge limits under settings datalayer 2024-11-10 11:49:31 +02:00
settings_html.h Add can-configuration to webui 2024-08-05 22:14:23 +03:00
webserver.cpp Merge branch 'main' into feature/LEAF-30-reset-SOH 2024-11-15 23:03:23 +02:00
webserver.h Fix panic Issue on OTA and change pause terminology 2024-09-29 09:16:34 +01:00

Battery Emulator Webserver

This webserver creates a WiFi access point. It also connects ot an existing network. The webserver intends to display useful information to the user of the battery emulator development board, without the need to physically connect to the board via USB. The webserver implementation also provides the option to update the firmware of the board over the air.

To use the webserver, follow the following steps:

  • Connect to the board via Serial, and boot up the board.
  • The IP address of the WiFi access point is printed to Serial when the board boots up. Note this down.
  • Connect to the access point created by board via a WiFi-capable device
  • On that device, open a webbrowser and type the IP address of the WiFi access point.
  • If the ssid and password of an existing WiFi network are provided, the board will also connect to this network. The IP address obtained on the existing network is shown in the webserver. Note this down.
  • From this point onwards, any device connected to the existing WiFi network can access the webserver via a webbrowser. To do this:
    • Connect your WiFi-capable device to the existing nwetork.
    • Open a webbrowser and type the IP address obtained on the existing WiFi network.

To update the software over the air:

  • In Arduino, go to Sketch > Export Compiled Binary. This will create the .bin file that you need to update the firmware. It is found in the folder Software/build/
  • In your webbrowser, go to the url consisting of the IP address, followed by /update, for instance http://192.168.0.224/update.
  • In the webbrowser, follow the steps to select the .bin file and to upload the file to the board.

Security Concerns (https://randomnerdtutorials.com/esp32-esp8266-web-server-http-authentication/) Authentication implemented here is meant to be used in your local network to protect from anyone just typing the ESP IP address and accessing the web server (like unauthorized family member or friend).

Future work

This section lists a number of features that can be implemented as part of the webserver in the future.

References

The code for this webserver is based on code provided by Rui Santos at https://randomnerdtutorials.com.