diff --git a/.github/workflows/build_firmware.yml b/.github/workflows/build_firmware.yml new file mode 100644 index 000000000..59141d1f0 --- /dev/null +++ b/.github/workflows/build_firmware.yml @@ -0,0 +1,72 @@ +name: Build Firmware + +on: + push: + branches: + - dev + tags: + # - '*.*.*' + paths: + - 'CHANGELOG_DEV.md' + +jobs: + + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Version + id: fetch_version + run: | + version=`grep -E '^#define EMSESP_APP_VERSION' ./src/version.h | awk '{print $3}' | sed 's/"//g'` + echo "::set-output name=s::$version" + + - name: Setup Python + uses: actions/setup-python@v1 + + - name: Install + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio upgrade + platformio update + + - name: Build web + run: | + cd interface + npm install + npm run build + + - name: Build images + run: | + platformio run -e esp8266 + platformio run -e esp32 + + - name: Delete + uses: dev-drprasad/delete-tag-and-release@v0.1.2 + # if: startsWith(github.ref, 'refs/tags/') + with: + delete_release: true + tag_name: dev + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Changelog + run: cat RELEASENOTES_DEV.md CHANGELOG_DEV.md > BODY.txt + + - name: Release + uses: softprops/action-gh-release@v1 + # if: startsWith(github.ref, 'refs/tags/') + with: + body: Latest beta build + body_path: BODY.txt + name: Development Build version ${{steps.fetch_version.outputs.s}} + tag_name: dev + prerelease: true + files: | + ./build/firmware/*.* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + \ No newline at end of file diff --git a/.github/workflows/check_code.yml b/.github/workflows/check_code.yml new file mode 100644 index 000000000..1f1631a91 --- /dev/null +++ b/.github/workflows/check_code.yml @@ -0,0 +1,62 @@ +name: Code Check + +on: + push: + branches: [dev] + pull_request: + # The branches below must be a subset of the branches above + branches: [dev] + schedule: + - cron: '0 11 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + # Override automatic language detection by changing the below list + # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] + language: ['cpp'] + # Learn more... + # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/standalone_build.yml b/.github/workflows/standalone_build.yml new file mode 100644 index 000000000..624d151ae --- /dev/null +++ b/.github/workflows/standalone_build.yml @@ -0,0 +1,20 @@ +name: Standalone Build + +on: + push: + branches: [ dev ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: make clean + run: make clean + + - name: make + run: make + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c483df8e..2c1e11da8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,53 +5,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.1] - -### Added -- boiler `heatingactivated`, automatic select parameter telegrams for write -- boiler `wWType` parameter, in Console and MQTT -- support for uploading compressed firmware binaries in web UI -- setting to manually override the MQTT retain flag -- New API via HTTP REST API to read and set values. See https://emsesp.github.io/docs/#/API -- `show commands` command -- exporting of system settings using the `system info` command in Web and Console. Added link into the Web's Settings page. -- setting to change how booleans are rendered in MQTT (on/off, true/false, 1/0) -- enable ADC setting, add boiler circulation commands, add thermostat RC300 summermodes -- Added all device info to web UI for Thermostat and Boiler -- Added all device values to Home Assistant MQTT Discovery under separate devices and entities -- Show Rx and Tx quality in Console and Web UI -- Added button and tooltip to EMS Devices in Web -- wwtemp and wwtemplow to MQTT, Console and Web -- summer, winter modes for the CW400 thermostat -- new command under system called `report`. http://ems-esp/api?device=system&cmd=report to generate a report log for troubleshooting -- thermostat error codes -- Console command `publish ha` to also force the creation of the Home Assistant MQTT Discovery topics -- Heat pump values (dew temperature and relative air humidity) - -### Fixed -- fix wwontime readback -- fixed support for RC300 via MQTT commands (#505) -- Some minor optimizations to memory handling in the MQTT service -- Prevent MQTT from publishing empty json payloads -- Accurate detection of warm water and heating (#515) -- Fix writing to the Junkers FR120 thermostat -- support for changing summermode -- added missing `heatingtype` to thermostat data - -### Changed -- renamed wWCircPumpType to wWChargeType -- Installation and Configuration notes moved to the official EMS-ESP documentation site -- `call` commands can be done from the Console root for all devices -- Updated EMS-ESP official documentation (https://emsesp.github.io/docs/#/) -- JWT Secret renamed to Super User Password -- EMS Devices in Web UI shows button and tooltip to remind users they can click on a device -- MQTT topic name changes (see doc) -- Mixing renamed to Mixer - -### Removed -- Console contexts for thermostat and boiler -- Removed option to enable/disable the MQTT Heartbeat. It's always on. - ## [2.0.1] September 13 2020 ### Added diff --git a/README.md b/README.md index 7083fc9f4..164076b15 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![version](https://img.shields.io/github/release/proddy/EMS-ESP.svg?label=Latest%20Release)](https://github.com/proddy/EMS-ESP/blob/main/CHANGELOG.md) [![release-date](https://img.shields.io/github/release-date/proddy/EMS-ESP.svg?label=Released)](https://github.com/proddy/EMS-ESP/commits/master) [![license](https://img.shields.io/github/license/proddy/EMS-ESP.svg)](LICENSE) -[![travis](https://travis-ci.com/proddy/EMS-ESP.svg?branch=dev)](https://travis-ci.com/proddy/EMS-ESP) +![Build Firmware](https://github.com/proddy/EMS-ESP/workflows/Build%20Firmware/badge.svg?branch=dev) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/b8880625bdf841d4adb2829732030887)](https://app.codacy.com/app/proddy/EMS-ESP?utm_source=github.com&utm_medium=referral&utm_content=proddy/EMS-ESP&utm_campaign=Badge_Grade_Settings) [![downloads](https://img.shields.io/github/downloads/proddy/EMS-ESP/total.svg)](https://github.com/proddy/EMS-ESP/releases) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/proddy/EMS-ESP.svg)](http://isitmaintained.com/project/proddy/EMS-ESP "Average time to resolve an issue") @@ -89,7 +89,7 @@ You can contribute to EMS-ESP by ## **Credits** A shout out to the people helping EMS-ESP get to where it is today... -- **@MichaelDvP** for all his amazing contributions and patience. Specifically the improved uart library, thermostat and mixer logic. +- **@MichaelDvP** for all his amazing contributions and patience. Specifically for the improved uart library, thermostat and mixer logic. - **@BBQKees** for his endless testing and building the awesome circuit boards - **@susisstrolch** for writing a first working version of the EMS bridge circuit which I used to design EMS-ESP version 0.1 back in August 2017 - plus everyone else providing suggestions, PRs and the odd donation that keep us motivated. Thanks! diff --git a/RELEASENOTES_DEV.md b/RELEASENOTES_DEV.md new file mode 100644 index 000000000..ed43d6b78 --- /dev/null +++ b/RELEASENOTES_DEV.md @@ -0,0 +1,8 @@ +# ![logo](media/EMS-ESP_logo_dark.png) + +This is a snapshot of the the current "beta" development code and firmware binaries using the `dev` branch. It has all the latest features and fixes but please be aware that this is still experimental firmware used for testing and thus may contain the odd bug. Use at your own risk and remember to report an issue if you find something unusual. + +# Firmware Installation + +Follow the instructions in the [documentation](https://emsesp.github.io/docs) on how to install the firmware binaries in the Assets below. + diff --git a/platformio.ini b/platformio.ini index bd57b40dd..c47c2ed13 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,8 +1,8 @@ ; PlatformIO Project Configuration File for EMS-ESP [platformio] -; default_envs = esp8266 -; default_envs = esp32 +default_envs = esp8266-local +; default_envs = esp32-local # override any settings with your own local ones in pio_local.ini extra_configs = @@ -32,24 +32,11 @@ build_flags = ; Uncomment ENABLE_CORS to enable Cross-Origin Resource Sharing (required for local React development) ; -D ENABLE_CORS -libs_core = - ; ArduinoJson - ; ESPAsyncTCP - ; AsyncTCP - ; AsyncMqttClient - [env] -extra_scripts = - pre:scripts/build_interface.py - scripts/main_script.py - scripts/rename_fw.py - scripts/gzip_fw.py - framework = arduino monitor_speed = 115200 - -; on OSX with non-native drivers use upload_speed = 115200 -upload_speed = 921600 +upload_speed = 921600 ; on OSX with non-native drivers use upload_speed = 115200 +build_type = release lib_ldf_mode = chain+ @@ -60,24 +47,40 @@ check_flags = clangtidy: --checks=-*,clang-analyzer-*,performance-* [env:esp8266] +extra_scripts = + scripts/main_script.py + scripts/rename_fw.py + scripts/gzip_fw.py +board = esp12e +platform = espressif8266 +board_build.f_cpu = 160000000L +build_flags = + +[env:esp32] +extra_scripts = + scripts/rename_fw.py + scripts/gzip_fw.py +board = esp32dev +platform = espressif32 +board_build.partitions = min_spiffs.csv +build_flags = + +[env:esp8266-local] +extra_scripts = + pre:scripts/build_interface.py + scripts/main_script.py board = esp12e ; https://github.com/platformio/platform-espressif8266/tree/master/boards -build_type = release platform = espressif8266 ; https://github.com/platformio/platform-espressif8266/releases board_build.filesystem = littlefs -lib_deps = ${common.libs_core} board_build.f_cpu = 160000000L ; 160MHz ; eagle.flash.4m1m.ld = 1019 KB sketch, 1000 KB SPIFFS. 4KB EEPROM, 4KB RFCAL, 12KB WIFI stack, 2052 KB OTA & buffer ; eagle.flash.4m2m.ld = 1019 KB sketch, 2024 KB SPIFFS. 4KB EEPROM, 4KB RFCAL, 12KB WIFI stack, 1028 KB OTA & buffer ; board_build.ldscript = eagle.flash.4m2m.ld build_flags = ${common.build_flags} ${common.debug_flags} -lib_ignore = - AsyncTCP -[env:esp32] +[env:esp32-local] board = esp32dev -build_type = release platform = espressif32 ; platform = https://github.com/platformio/platform-espressif32.git board_build.partitions = min_spiffs.csv ; https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/ -lib_deps = ${common.libs_core} build_flags = ${common.build_flags} ${common.debug_flags}