Skip to content

Releases: Ishanoshada/Microweb

0.2.1

23 Jul 07:54
Compare
Choose a tag to compare

0.2.1

Full Changelog: 0.2.0...0.2.1

0.2.0

01 Jul 12:31
Compare
Choose a tag to compare

Full Changelog: 0.1.9...0.2.0

0.1.9

01 Jul 11:25
Compare
Choose a tag to compare

Full Changelog: 0.1.8...0.1.9

0.1.8

30 Jun 12:48
0093493
Compare
Choose a tag to compare

Full Changelog: 0.1.7...0.1.8

0.1.7

30 Jun 11:57
Compare
Choose a tag to compare

Feature Updates

Version 0.1.7 Release Notes

  • Wi-Fi Configuration Enhancements:
    • Added mode='wifi' option to connect the ESP32 as a client to an existing Wi-Fi network using internet={'ssid': ..., 'password': ...} (e.g., Dialog 4G 0F8 with IP 192.168.8.102). Falls back to access point mode if the connection fails.
    • Improved config.json loading for Wi-Fi credentials, with a default fallback AP (SSID: ESP32-MicroWeb, password: 12345678, IP: 192.168.4.1).
  • External API Support with urequests:
    • Integrated urequests for making HTTP/HTTPS requests to external APIs (e.g., https://jsonplaceholder.typicode.com/posts/1).
    • Added error handling for HTTPS requests, which may fail on ESP32 due to limited SSL/TLS support, with fallback to HTML error messages or local templates (e.g., /offline route).
  • Template Engine Improvements:
    • Enhanced template rendering with support for for loops and if conditionals, as demonstrated in tests/request_send/index.html.
    • Improved variable substitution and error handling for robust rendering on resource-constrained ESP32 devices.
  • Static File Serving:
    • Streamlined serving of static files (e.g., style.css, script.js) with app.add_static().
    • Optimized file upload process via microweb run --static to ensure only changed files are uploaded.
  • CLI Improvements:
    • Added real-time logging support when running apps with mpremote connect COM10 run app.py, showing Wi-Fi connection status and IP address.
    • Improved file validation and dependency checking for templates and static files.
  • Example Updates:
    • Added tests/request_send/ example demonstrating mode='wifi', urequests for API calls, dynamic template rendering, and static file serving.
    • Updated examples to include app.get_ip() for retrieving the ESP32’s IP address in responses.
  • Bug Fixes:
    • Fixed issues with Wi-Fi connection stability in station mode.
    • Resolved template rendering errors for missing variables, ensuring empty string fallback.
  • Documentation:
    • Updated README.md with detailed examples for mode='wifi' and urequests usage.
    • Added testing instructions using curl and mpremote for debugging.

Note: HTTPS requests may require a MicroPython build with SSL/TLS support or a proxy server. For reliable API calls, use HTTP endpoints or local fallbacks (e.g., mirror.html).

0.1.6

29 Jun 06:43
Compare
Choose a tag to compare

added :

app.stop_wifi() # Uncomment to stop Wi-Fi access point

app.start_wifi() # Uncomment to start Wi-Fi access point after stop

0.1.5

28 Jun 12:31
Compare
Choose a tag to compare

MicroWeb Release Notes - Version 0.1.5

Overview

Version 0.1.5 introduces significant enhancements to the MicroWeb framework, focusing on improving the template engine, static file serving, and CLI functionality for MicroPython on ESP32. This release adds support for dynamic template rendering with for loops and conditionals, enhances static file handling for CSS and JavaScript, and improves the create command for generating example applications.

New Features

  • Template Engine Enhancements: Added support for for loops and if/else conditionals in templates, enabling dynamic rendering of lists and conditional content.
  • Static File Serving: Improved support for serving static files (e.g., style.css, script.js) to enhance web interfaces with consistent styling and interactivity.
  • CLI Improvements: Enhanced the microweb create command to generate example apps with app.py, index.html, style.css, script.js, and README.md, including a for loop example.
  • Dynamic Routing: Strengthened dynamic routing with URL parameter handling (e.g., /greet/<name>), improving flexibility for API endpoints.
  • JSON Responses: Optimized app.json_response for consistent API output with proper Content-Type headers.

Improvements

  • Wi-Fi Configuration: Refined Wi-Fi handling with better fallback to access point mode when station mode fails.
  • Debugging: Enhanced debug=True logging for template rendering and static file serving errors.
  • Documentation: Updated README.md template in generated apps to include instructions for testing for loops and static files.

Bug Fixes

  • Fixed issues with template caching on ESP32, improving performance for repeated renders.
  • Resolved errors in req.form parsing for POST requests with empty or malformed data.
  • Corrected CLI path handling for Windows environments in the create command.

Upgrade Instructions

  1. Update MicroWeb to version 0.1.5:
    pip install microweb==0.1.5
  2. For existing apps, ensure templates use the new {% %} and {{ }} syntax for variables and control structures.
  3. Update static file references in templates to include .css and .js files served via app.add_static.
  4. Test existing routes with curl or a browser to verify compatibility with the updated template engine.

Known Issues

  • Large template files (>10KB) may cause memory issues on ESP32 due to MicroPython constraints. Consider splitting complex templates.
  • Custom Wi-Fi configurations in config.json may require revalidation after upgrading.

Feedback

Report issues or suggest features at https://github.com/ishanoshada/microweb.

0.1.4

28 Jun 08:31
Compare
Choose a tag to compare
update

0.1.3

27 Jun 20:34
Compare
Choose a tag to compare

Full Changelog: 0.1.2...0.1.3

0.1.2

27 Jun 19:47
Compare
Choose a tag to compare

Full Changelog: 0.1.1V...0.1.2