Browse Source

complete rework of release workflow add CHANGES.md

pull/179/head
Andreas Schiffler 2 years ago
parent
commit
fdf45926cc
  1. 52
      .github/workflows/compile_esp8266.yml
  2. 62
      tools/esp8266/README.md
  3. 2
      tools/esp8266/defines.h
  4. 65
      tools/esp8266/html/CHANGES.md
  5. 15
      tools/esp8266/scripts/getVersion.py

52
.github/workflows/compile_esp8266.yml

@ -1,4 +1,4 @@
name: ESP8266
name: Ahoy Release for ESP8266
on:
push:
@ -13,33 +13,63 @@ jobs:
- uses: actions/checkout@v3
with:
ref: main
- name: Cache pip
- uses: benjlevesque/short-sha@v1.2
id: short-sha
with:
length: 7
- name: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
- name: cache-platformio
uses: actions/cache@v3
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
- name: setup-python
uses: actions/setup-python@v3
- name: Install PlatformIO
- name: install-platformio
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Update html
- name: update-html
working-directory: tools/esp8266/html
run: python convert.py
- name: Run PlatformIO
run: pio run -d tools/esp8266
- name: rename
run: pio run -d tools/esp8266 --environment esp8266-release
- name: rename-binary-files
id: rename-binary-files
working-directory: tools/esp8266/scripts
run: python getVersion.py
- uses: actions/upload-artifact@v3
- name: create-release
id: create-release
uses: actions/create-release@v1
with:
draft: false
prerelease: false
release_name: ${{ steps.rename-binary-files.outputs.name }}
tag_name: ${{ github.ref }}
body_path: tools/esp8266/CHANGES.md
env:
GITHUB_TOKEN: ${{ github.token }}
- name: set-version
uses: cschleiden/replace-tokens@v1
with:
files: tools/esp8266/User_Manual.md
env:
VERSION: ${{ steps.rename-binary-files.outputs.name }}
- name: create-artifact
run: zip --junk-paths ${{ steps.rename-binary-files.outputs.name }}.zip tools/esp8266/.pio/build/out/* tools/esp8266/User_Manual.md
- name: upload-release
id: upload-release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: esp8266_ahoy
path: tools/esp8266/.pio/build/out/*.bin
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./${{ steps.rename-binary-files.outputs.name }}.zip
asset_name: ${{ steps.rename-binary-files.outputs.name }}.zip
asset_content_type: application/zip

62
tools/esp8266/README.md

@ -68,64 +68,4 @@ For now the following inverters should work out of the box:
- `Time` 1.6.1
- `RF24` 1.4.5
- `PubSubClient` 2.8
- `ArduinoJson` 6.19.4
## Changelog
(*) EEPROM changes require settings to be changed, your settings will be overwritten and need to be set again!
- v0.5.9 *fix PowerLimit PowerPFDev.Desc=0x0001 for permanent
- v0.5.8 *fix #146 device name in setup
- v0.5.7 *add collapsible setup
- v0.5.6 *fix only MQTT sub after the first loop in a conenction
- v0.5.5 *fixed MQTT sub only after connection is established (HorstG-57)
+ added in app.cpp some compiler if statements
*fix: compile possible for non repository versions (if project was download as zip - lumapu)
*fix README.md - Update line 69 (`RF24` 1.4.2 -> 1.4.5) (DanielR92)
*Update hmRadio.h (lumapu)
- v0.5.4 + added Github report text with a URL (aschiffler)
+ added auto_firmware_version.py for GIT_HASH
+ added switch case AlarmData/AlarmUpdate
- v0.5.3 #Bugfix #125 PowerLimit
+ prototype webapi to get info, improved pwr limit (aschiffler)
+ Merge remote-tracking branch 'upstream/main' into pwrlimit
- v0.5.2 add #114 ntp_server_name and port to eeprom
+ stefan123t added some functions (devcontrol/cbMqtt/...)
- v0.5.1 *Merge branch 'upstream/HEAD' into control
*update revision (0.4.26 -> 0.5.1)
- v0.4.26 first poc for power set via mqtt
- v0.4.25 added default SERIAL/MQTT/SEND_INTERVAL #100, fixed env:node_mcu_v2 build #101
- v0.4.24 added fixes for #63, #88, #93. revert #36 (*) EEPROM changes
- v0.4.23 added workflow, fix index.html to load inverter info immediately, changed timestamp to 1 for stand alone ESP #90, Implement MQTT discovery for Home Assistant
- v0.4.22 compiles with PlatformIO
- v0.4.21 reduced warnings
- v0.4.20 improved setup (if no data is in EEprom), improved NRF24 Pinout regarding to #36, Standard Pinout should be now: #36 (comment), add JSON output, fix favicon, improve eeprom default settings (*) EEPROM changes
- v0.4.19 updated debug messages: now 5 different levels are available, fixed CRC loop issue, add fritzing/schematics for Arduino, Raspberry Pi and NodeMCU
- v0.4.18 Creative Commons NC-SA-BY v3.0 license included, tried to increase stability, fix NRF24 CRClength, add debug & documentation links, added variable error messages using #pragma error
- v0.4.17 add printed circuit board layout, more debug output (#retransmits), improved loop counters (*) EEPROM changes
- v0.4.16 request only one inverter per loop (#53 (comment)), mqtt loop interval calculated by # of inverters and inverter request interval, limit maximum number of retries, added feature request #62 (readable names for channels), improved setup page, added javascript to hide / show channel fields (*) EEPROM changes
- v0.4.15 reduced debug messages, fixes after merge
- v0.4.14 added RX channel 40, improved RF24 ISR, reduced AP active time to 60s (will be increase once a client is connected), added `yield` without success -> random reboot (cause 4) (*) EEPROM changes
- v0.4.13 rename to AHOY-DTU, add RX channel 40, update stats on index based on mSendInterval, MQTT Interval, EEPROM CRC settings, fix #56 v0.4.10 ESP8266 stuck in boot loop
- v0.4.12 version skipped ?
- v0.4.11 inverter dependent mqtt (is avail), implemented heap stats #58, inserted 'break' in ISR while loop
- v0.4.10 reduced heap size (>50%) by using 'F()' for (nearly) all static strings, added Wemos D1 case STL files
- v0.4.9 try to fix mqtt and wifi loss issue #52, document libraries (*) EEPROM changes
- v0.4.8 moved mqtt loop out of checkTicker as mentioned in #49, added irritation and efficiency calculations, improved style (*) EEPROM changes
- v0.4.7 version skipped ?
- v0.4.6 version skipped ?
- v0.4.5 fix #38 4-channel inverter current assignment, added last received timestamp in /hoymiles livedata web page #47, improved style.css, improved NTP as described in #46
- v0.4.4 added free heap, mentioned in #24 (added in serial print, status on index and mqtt), fixed #45, AC current by factor 10 too high, fixed failed payload counter
- v0.4.3 fixed #41 HM800 Yield total and Yield day were mixed around. Found issue while comparing to Python version, fixed #43 HM350 channel 2 is displayed in Live-View, added #42 YieldTotal and YieldTotal Day for HM600 - HM800 inverters
- v0.4.2 fix #39 Assignment 2-Channel inverters (HM-600, HM-700, HM-800)
- v0.4.1 multi inverter support, full re transmit included
- v0.4.0 complete payload processed (and crc checked), inverter type is defined by serial number, serial debug can be switched live (using setup), Note: only one inverter is supported for now!
- v0.3.9 fix #26 ticker / interval in app.cpp
- v0.3.8 improved stability (in comparison to 0.3.7), reset wifi AP timout once a client is detected, fix #26 wrong variable reset
- v0.3.7 added rx channel switching, switched to crc8 check for valid packet-payload
- v0.3.6 improved tickers, only one ticker is active, added feature to use the ESP as access point for all the time, added serial features to setup
- v0.3.5 fixed erase settings, fixed behavior if no MQTT IP is set (the system was nearly unusable because of delayed responses), fixed Station / AP WiFi on startup -> more information will be printed to the serial console, added new ticker for serial value dump
- v0.3.4 added config.h for general configuration, added option to compile WiFi SSID + PWD to firmware, added option to configure WiFi access point name and password, added feature to retry connect to station WiFi (configurable timeouts), updated index.html, added option for factory reset, added info about project on index.html, moved "update" and "home" to footer, fixed #23 HM1200 yield day unit, fixed DNS name of ESP after setup (some commits before)
- v0.3.3 converted to "poor-man-ticker" using millis() for uptime, send and mqtt, added inverter overview, added send count to statistics
- v0.3.2 compile of merge, binary published on https://www.mikrocontroller.net/topic/525778?goto=7051413#7051413
- v0.3.1 fix: doCalculations was not called
- v0.3.0 version 0.3.0, added unit test
- `ArduinoJson` 6.19.4

2
tools/esp8266/defines.h

@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 5
#define VERSION_PATCH 14
#define VERSION_PATCH 15
//-------------------------------------

65
tools/esp8266/html/CHANGES.md

@ -0,0 +1,65 @@
# Changelog
- v0.5.15
- v0.5.14
- v0.5.13
- v0.5.12
- v0.5.11
- v0.5.10
(*) EEPROM changes require settings to be changed, your settings will be overwritten and need to be set again!
- v0.5.9 *fix PowerLimit PowerPFDev.Desc=0x0001 for permanent
- v0.5.8 *fix #146 device name in setup
- v0.5.7 *add collapsible setup
- v0.5.6 *fix only MQTT sub after the first loop in a conenction
- v0.5.5 *fixed MQTT sub only after connection is established (HorstG-57)
+ added in app.cpp some compiler if statements
*fix: compile possible for non repository versions (if project was download as zip - lumapu)
*fix README.md - Update line 69 (`RF24` 1.4.2 -> 1.4.5) (DanielR92)
*Update hmRadio.h (lumapu)
- v0.5.4 + added Github report text with a URL (aschiffler)
+ added auto_firmware_version.py for GIT_HASH
+ added switch case AlarmData/AlarmUpdate
- v0.5.3 #Bugfix #125 PowerLimit
+ prototype webapi to get info, improved pwr limit (aschiffler)
+ Merge remote-tracking branch 'upstream/main' into pwrlimit
- v0.5.2 add #114 ntp_server_name and port to eeprom
+ stefan123t added some functions (devcontrol/cbMqtt/...)
- v0.5.1 *Merge branch 'upstream/HEAD' into control
*update revision (0.4.26 -> 0.5.1)
- v0.4.26 first poc for power set via mqtt
- v0.4.25 added default SERIAL/MQTT/SEND_INTERVAL #100, fixed env:node_mcu_v2 build #101
- v0.4.24 added fixes for #63, #88, #93. revert #36 (*) EEPROM changes
- v0.4.23 added workflow, fix index.html to load inverter info immediately, changed timestamp to 1 for stand alone ESP #90, Implement MQTT discovery for Home Assistant
- v0.4.22 compiles with PlatformIO
- v0.4.21 reduced warnings
- v0.4.20 improved setup (if no data is in EEprom), improved NRF24 Pinout regarding to #36, Standard Pinout should be now: #36 (comment), add JSON output, fix favicon, improve eeprom default settings (*) EEPROM changes
- v0.4.19 updated debug messages: now 5 different levels are available, fixed CRC loop issue, add fritzing/schematics for Arduino, Raspberry Pi and NodeMCU
- v0.4.18 Creative Commons NC-SA-BY v3.0 license included, tried to increase stability, fix NRF24 CRClength, add debug & documentation links, added variable error messages using #pragma error
- v0.4.17 add printed circuit board layout, more debug output (#retransmits), improved loop counters (*) EEPROM changes
- v0.4.16 request only one inverter per loop (#53 (comment)), mqtt loop interval calculated by # of inverters and inverter request interval, limit maximum number of retries, added feature request #62 (readable names for channels), improved setup page, added javascript to hide / show channel fields (*) EEPROM changes
- v0.4.15 reduced debug messages, fixes after merge
- v0.4.14 added RX channel 40, improved RF24 ISR, reduced AP active time to 60s (will be increase once a client is connected), added `yield` without success -> random reboot (cause 4) (*) EEPROM changes
- v0.4.13 rename to AHOY-DTU, add RX channel 40, update stats on index based on mSendInterval, MQTT Interval, EEPROM CRC settings, fix #56 v0.4.10 ESP8266 stuck in boot loop
- v0.4.12 version skipped ?
- v0.4.11 inverter dependent mqtt (is avail), implemented heap stats #58, inserted 'break' in ISR while loop
- v0.4.10 reduced heap size (>50%) by using 'F()' for (nearly) all static strings, added Wemos D1 case STL files
- v0.4.9 try to fix mqtt and wifi loss issue #52, document libraries (*) EEPROM changes
- v0.4.8 moved mqtt loop out of checkTicker as mentioned in #49, added irritation and efficiency calculations, improved style (*) EEPROM changes
- v0.4.7 version skipped ?
- v0.4.6 version skipped ?
- v0.4.5 fix #38 4-channel inverter current assignment, added last received timestamp in /hoymiles livedata web page #47, improved style.css, improved NTP as described in #46
- v0.4.4 added free heap, mentioned in #24 (added in serial print, status on index and mqtt), fixed #45, AC current by factor 10 too high, fixed failed payload counter
- v0.4.3 fixed #41 HM800 Yield total and Yield day were mixed around. Found issue while comparing to Python version, fixed #43 HM350 channel 2 is displayed in Live-View, added #42 YieldTotal and YieldTotal Day for HM600 - HM800 inverters
- v0.4.2 fix #39 Assignment 2-Channel inverters (HM-600, HM-700, HM-800)
- v0.4.1 multi inverter support, full re transmit included
- v0.4.0 complete payload processed (and crc checked), inverter type is defined by serial number, serial debug can be switched live (using setup), Note: only one inverter is supported for now!
- v0.3.9 fix #26 ticker / interval in app.cpp
- v0.3.8 improved stability (in comparison to 0.3.7), reset wifi AP timout once a client is detected, fix #26 wrong variable reset
- v0.3.7 added rx channel switching, switched to crc8 check for valid packet-payload
- v0.3.6 improved tickers, only one ticker is active, added feature to use the ESP as access point for all the time, added serial features to setup
- v0.3.5 fixed erase settings, fixed behavior if no MQTT IP is set (the system was nearly unusable because of delayed responses), fixed Station / AP WiFi on startup -> more information will be printed to the serial console, added new ticker for serial value dump
- v0.3.4 added config.h for general configuration, added option to compile WiFi SSID + PWD to firmware, added option to configure WiFi access point name and password, added feature to retry connect to station WiFi (configurable timeouts), updated index.html, added option for factory reset, added info about project on index.html, moved "update" and "home" to footer, fixed #23 HM1200 yield day unit, fixed DNS name of ESP after setup (some commits before)
- v0.3.3 converted to "poor-man-ticker" using millis() for uptime, send and mqtt, added inverter overview, added send count to statistics
- v0.3.2 compile of merge, binary published on https://www.mikrocontroller.net/topic/525778?goto=7051413#7051413
- v0.3.1 fix: doCalculations was not called
- v0.3.0 version 0.3.0, added unit test

15
tools/esp8266/scripts/getVersion.py

@ -9,23 +9,22 @@ def readVersion(path, infile):
today = date.today()
search = ["_MAJOR", "_MINOR", "_PATCH"]
version = today.strftime("%y%m%d") + "_ahoy_"
versionnumber = "ahoy_v"
for line in lines:
if(line.find("VERSION_") != -1):
for s in search:
p = line.find(s)
if(p != -1):
version += line[p+13:].rstrip() + "."
versionnumber += line[p+13:].rstrip() + "."
os.mkdir(path + ".pio/build/out/")
versionout = version[:-1] + "_esp8266_release.bin"
sha = os.getenv("SHA",default="sha")
versionout = version[:-1] + "_esp8266_" + sha + ".bin"
src = path + ".pio/build/esp8266-release/firmware.bin"
dst = path + ".pio/build/out/" + versionout
os.rename(src, dst)
print("::set-output name=name::" + versionnumber[:-1] )
versionout = version[:-1] + "_esp8266_debug.bin"
src = path + ".pio/build/esp8266-debug/firmware.bin"
dst = path + ".pio/build/out/" + versionout
os.rename(src, dst)
readVersion("../", "defines.h")
readVersion("../", "defines.h")
Loading…
Cancel
Save