diff --git a/.github/scripts/install-arduino-core-esp32.sh b/.github/scripts/install-arduino-core-esp32.sh index cf1026d6a..3fb4203c5 100755 --- a/.github/scripts/install-arduino-core-esp32.sh +++ b/.github/scripts/install-arduino-core-esp32.sh @@ -8,11 +8,11 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then cd "$ARDUINO_USR_PATH/hardware/espressif" echo "Installing Python Serial ..." - pip install pyserial > /dev/null + pip3 install pyserial > /dev/null if [ "$OS_IS_WINDOWS" == "1" ]; then echo "Installing Python Requests ..." - pip install requests > /dev/null + pip3 install requests > /dev/null fi if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then @@ -28,7 +28,7 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then git submodule update --init --recursive > /dev/null 2>&1 echo "Installing Platform Tools ..." - cd tools && python get.py + cd tools && python3 get.py cd $script_init_path echo "ESP32 Arduino has been installed in '$ARDUINO_ESP32_PATH'" diff --git a/.github/scripts/install-arduino-core-esp8266.sh b/.github/scripts/install-arduino-core-esp8266.sh index 048cd0246..db9d56ca7 100644 --- a/.github/scripts/install-arduino-core-esp8266.sh +++ b/.github/scripts/install-arduino-core-esp8266.sh @@ -6,11 +6,11 @@ mkdir -p "$ARDUINO_USR_PATH/hardware/esp8266com" cd "$ARDUINO_USR_PATH/hardware/esp8266com" echo "Installing Python Serial ..." -pip install pyserial > /dev/null +pip3 install pyserial > /dev/null if [ "$OS_IS_WINDOWS" == "1" ]; then echo "Installing Python Requests ..." - pip install requests > /dev/null + pip3 install requests > /dev/null fi echo "Cloning Core Repository ..." @@ -22,7 +22,7 @@ git submodule update --init --recursive > /dev/null 2>&1 echo "Installing Platform Tools ..." cd tools -python get.py > /dev/null +python3 get.py > /dev/null cd $script_init_path echo "ESP8266 Arduino has been installed in '$ARDUINO_USR_PATH/hardware/esp8266com'" diff --git a/.github/scripts/install-arduino-ide.sh b/.github/scripts/install-arduino-ide.sh index ce60cb82f..584cc68dc 100755 --- a/.github/scripts/install-arduino-ide.sh +++ b/.github/scripts/install-arduino-ide.sh @@ -52,12 +52,12 @@ if [ ! -d "$ARDUINO_IDE_PATH" ]; then echo "Installing Arduino IDE on $OS_NAME ..." echo "Downloading 'arduino-nightly-$OS_NAME.$ARCHIVE_FORMAT' to 'arduino.$ARCHIVE_FORMAT' ..." if [ "$OS_IS_LINUX" == "1" ]; then - wget -O "arduino.$ARCHIVE_FORMAT" "https://www.arduino.cc/download.php?f=/arduino-nightly-$OS_NAME.$ARCHIVE_FORMAT" > /dev/null 2>&1 + wget -O "arduino.$ARCHIVE_FORMAT" "https://downloads.arduino.cc/arduino-nightly-$OS_NAME.$ARCHIVE_FORMAT" > /dev/null 2>&1 echo "Extracting 'arduino.$ARCHIVE_FORMAT' ..." tar xf "arduino.$ARCHIVE_FORMAT" > /dev/null mv arduino-nightly "$ARDUINO_IDE_PATH" else - curl -o "arduino.$ARCHIVE_FORMAT" -L "https://www.arduino.cc/download.php?f=/arduino-nightly-$OS_NAME.$ARCHIVE_FORMAT" > /dev/null 2>&1 + curl -o "arduino.$ARCHIVE_FORMAT" -L "https://downloads.arduino.cc/arduino-nightly-$OS_NAME.$ARCHIVE_FORMAT" > /dev/null 2>&1 echo "Extracting 'arduino.$ARCHIVE_FORMAT' ..." unzip "arduino.$ARCHIVE_FORMAT" > /dev/null if [ "$OS_IS_MACOS" == "1" ]; then diff --git a/.github/scripts/install-platformio.sh b/.github/scripts/install-platformio.sh index 594948ea4..35b5f2de1 100644 --- a/.github/scripts/install-platformio.sh +++ b/.github/scripts/install-platformio.sh @@ -1,10 +1,10 @@ #!/bin/bash echo "Installing Python Wheel ..." -pip install wheel > /dev/null 2>&1 +pip3 install wheel > /dev/null 2>&1 echo "Installing PlatformIO ..." -pip install -U platformio > /dev/null 2>&1 +pip3 install -U platformio > /dev/null 2>&1 echo "PlatformIO has been installed" echo "" @@ -23,7 +23,7 @@ function build_pio_sketch(){ # build_pio_sketch diff --git a/.github/scripts/on-push.sh b/.github/scripts/on-push.sh index 1eedd0779..e43fc2589 100755 --- a/.github/scripts/on-push.sh +++ b/.github/scripts/on-push.sh @@ -7,7 +7,7 @@ if [ ! -z "$TRAVIS_BUILD_DIR" ]; then export GITHUB_REPOSITORY="$TRAVIS_REPO_SLUG" elif [ -z "$GITHUB_WORKSPACE" ]; then export GITHUB_WORKSPACE="$PWD" - export GITHUB_REPOSITORY="lorol/ESPAsyncWebServer" + export GITHUB_REPOSITORY="mathieucarbou/ESPAsyncWebServer" fi TARGET_PLATFORM="$1" @@ -31,23 +31,25 @@ if [ "$BUILD_PIO" -eq 0 ]; then source ./.github/scripts/install-arduino-ide.sh echo "Installing ESPAsyncWebServer ..." - cp -rf "$GITHUB_WORKSPACE" "$ARDUINO_USR_PATH/libraries/ESPAsyncWebServer" + cp -af "$GITHUB_WORKSPACE/src" "$ARDUINO_USR_PATH/libraries/ESPAsyncWebServer" echo "Installing ArduinoJson ..." git clone https://github.com/bblanchon/ArduinoJson "$ARDUINO_USR_PATH/libraries/ArduinoJson" > /dev/null 2>&1 - echo "Installing DHT sensor library ..." - git clone https://github.com/adafruit/DHT-sensor-library "$ARDUINO_USR_PATH/libraries/DHT-sensor-library" > /dev/null 2>&1 if [[ "$TARGET_PLATFORM" == "esp32" ]]; then - echo "Installing LITTLEFS for ESP32 ..." - git clone https://github.com/lorol/LITTLEFS "$ARDUINO_USR_PATH/libraries/LITTLEFS" > /dev/null 2>&1 echo "Installing AsyncTCP ..." - git clone https://github.com/me-no-dev/AsyncTCP "$ARDUINO_USR_PATH/libraries/AsyncTCP" > /dev/null 2>&1 + git clone https://github.com/esphome/AsyncTCP "$ARDUINO_USR_PATH/libraries/AsyncTCP" > /dev/null 2>&1 + cd AsyncTCP + git checkout v2.0.1 + cd .. FQBN="espressif:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app" source ./.github/scripts/install-arduino-core-esp32.sh echo "BUILDING ESP32 EXAMPLES" else echo "Installing ESPAsyncTCP ..." - git clone https://github.com/me-no-dev/ESPAsyncTCP "$ARDUINO_USR_PATH/libraries/ESPAsyncTCP" > /dev/null 2>&1 + git clone https://github.com/esphome/ESPAsyncTCP "$ARDUINO_USR_PATH/libraries/ESPAsyncTCP" > /dev/null 2>&1 + cd ESPAsyncTCP + git checkout v2.0.0 + cd .. FQBN="esp8266com:esp8266:generic:eesz=4M1M,ip=lm2f" source ./.github/scripts/install-arduino-core-esp8266.sh echo "BUILDING ESP8266 EXAMPLES" @@ -57,18 +59,18 @@ else # PlatformIO Test source ./.github/scripts/install-platformio.sh - python -m platformio lib --storage-dir "$GITHUB_WORKSPACE" install + python3 -m platformio lib --storage-dir "$GITHUB_WORKSPACE" install echo "Installing ArduinoJson ..." - python -m platformio lib -g install https://github.com/bblanchon/ArduinoJson.git > /dev/null 2>&1 + python3 -m platformio lib -g install https://github.com/bblanchon/ArduinoJson.git > /dev/null 2>&1 if [[ "$TARGET_PLATFORM" == "esp32" ]]; then BOARD="esp32dev" echo "Installing AsyncTCP ..." - python -m platformio lib -g install https://github.com/me-no-dev/AsyncTCP.git > /dev/null 2>&1 + python -m platformio lib -g install https://github.com/esphome/AsyncTCP.git > /dev/null 2>&1 echo "BUILDING ESP32 EXAMPLES" else BOARD="esp12e" echo "Installing ESPAsyncTCP ..." - python -m platformio lib -g install https://github.com/me-no-dev/ESPAsyncTCP.git > /dev/null 2>&1 + python -m platformio lib -g install https://github.com/esphome/ESPAsyncTCP.git > /dev/null 2>&1 echo "BUILDING ESP8266 EXAMPLES" fi build_pio_sketches "$BOARD" "$GITHUB_WORKSPACE/examples" diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 231dc5292..15398e9e4 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,7 +3,7 @@ name: ESP Async Web Server CI on: push: branches: - - master + - main - release/* pull_request: @@ -13,22 +13,24 @@ jobs: name: Arduino for ${{ matrix.board }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macOS-latest] board: [esp32, esp8266] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3.0.2 - name: Build Tests run: bash ./.github/scripts/on-push.sh ${{ matrix.board }} 0 1 -# build-pio: -# name: PlatformIO for ${{ matrix.board }} on ${{ matrix.os }} -# runs-on: ${{ matrix.os }} -# strategy: -# matrix: -# os: [ubuntu-latest, windows-latest, macOS-latest] -# board: [esp32, esp8266] -# steps: -# - uses: actions/checkout@v1 -# - name: Build Tests -# run: bash ./.github/scripts/on-push.sh ${{ matrix.board }} 1 1 + build-pio: + name: PlatformIO for ${{ matrix.board }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + board: [esp32, esp8266] + steps: + - uses: actions/checkout@v3.0.2 + - name: Build Tests + run: bash ./.github/scripts/on-push.sh ${{ matrix.board }} 1 1 diff --git a/README.md b/README.md index d3d3cf91b..fd2c61091 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # In this fork - SPIFFSEditor modifications -- Added [extras](https://github.com/lorol/ESPAsyncWebServer/tree/master/extras) folder with (Win) tools for re-packing, editing, updating and compressing html to binary arrays embedded to source -- Added a [SmartSwitch](https://github.com/lorol/ESPAsyncWebServer/tree/master/examples/SmartSwitch) example to test code features +- Added [extras](https://github.com/mathieucarbou/ESPAsyncWebServer/tree/master/extras) folder with (Win) tools for re-packing, editing, updating and compressing html to binary arrays embedded to source +- Added a [SmartSwitch](https://github.com/mathieucarbou/ESPAsyncWebServer/tree/master/examples/SmartSwitch) example to test code features - Applied the memory optimizations from [sascha432](https://github.com/sascha432/ESPAsyncWebServer) fork - Cookie Authentication including on Websocket part, based on [ayushsharma82](https://github.com/me-no-dev/ESPAsyncWebServer/pull/684) PR, new functions added: - For Websocket: ```void handleHandshake(AwsHandshakeHandler handler) ``` diff --git a/examples/SmartSwitch/README.md b/examples/SmartSwitch/README.md index ffafef743..dd2e826e7 100644 --- a/examples/SmartSwitch/README.md +++ b/examples/SmartSwitch/README.md @@ -3,11 +3,11 @@ ## SmartSwitch - Remote Temperature Control application with schedule (example: car block heater or car battery charger for winter) -- Based on [ESP_AsyncFSBrowser](https://github.com/lorol/ESPAsyncWebServer/tree/master/examples/ESP_AsyncFSBrowser) example that uses embedded ACE editor +- Based on [ESP_AsyncFSBrowser](https://github.com/mathieucarbou/ESPAsyncWebServer/tree/master/examples/ESP_AsyncFSBrowser) example that uses embedded ACE editor - Wide browser compatibility, no extra server-side needed - HTTP server and WebSocket on same port - Standalone, no JS dependencies for the browser from Internet -- [Ace Editor](https://github.com/ajaxorg/ace) embedded to source but also - editable, upgradeable see [extras folder](https://github.com/lorol/ESPAsyncWebServer/tree/master/extras) +- [Ace Editor](https://github.com/ajaxorg/ace) embedded to source but also - editable, upgradeable see [extras folder](https://github.com/mathieucarbou/ESPAsyncWebServer/tree/master/extras) - Added [ESPAsyncWiFiManager](https://github.com/alanswx/ESPAsyncWiFiManager) and fallback AP mode after timeout - Real Time (NTP) w/ Time Zones. Sync from browser time if in AP mode - Memorized settings to EEPROM diff --git a/library.json b/library.json index c5cfbbdf6..5aab55ded 100644 --- a/library.json +++ b/library.json @@ -10,7 +10,7 @@ "type": "git", "url": "https://github.com/mathieucarbou/ESPAsyncWebServer.git" }, - "version": "2.0.0", + "version": "2.1.0", "license": "LGPL-3.0", "frameworks": "arduino", "platforms": [ diff --git a/library.properties b/library.properties index 0d3959e84..cb58f1bb9 100644 --- a/library.properties +++ b/library.properties @@ -1,7 +1,7 @@ name=ESP Async WebServer -version=2.0.0 +version=2.1.0 author=Me-No-Dev -maintainer=lorol +maintainer=mathieucarbou sentence=Async Web Server for ESP8266 and ESP31B paragraph=Async Web Server for ESP8266 and ESP31B category=Other