Skip to content

Commit

Permalink
Merge 892bf3e into 55f78dc
Browse files Browse the repository at this point in the history
  • Loading branch information
caco3 authored Dec 19, 2022
2 parents 55f78dc + 892bf3e commit 1ee8f47
Show file tree
Hide file tree
Showing 40 changed files with 1,092 additions and 727 deletions.
36 changes: 36 additions & 0 deletions .github/label-commenter-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Reply Bot Configuration
# See https://github.com/peaceiris/actions-label-commenter

labels:
#######################################################################
# Bot Response: Web Console
#######################################################################
- name: bot-reply Web Console
labeled:
issue:
body: |
You can use the [Web Console](https://jomjol.github.io/AI-on-the-edge-device/index.html) to get USB log from the device.
The USB log contains more information about the startup and operation of the device than the normal Web UI log
discussion:
body: |
You can use the [Web Console](https://jomjol.github.io/AI-on-the-edge-device/index.html) to get USB log from the device.
The USB log contains more information about the startup and operation of the device than the normal Web UI log

#######################################################################
# Bot Response: Rolling Build
#######################################################################
- name: bot-reply Rolling Build
labeled:
issue:
body: |
You can use the latest [Automatic Build](https://github.com/jomjol/AI-on-the-edge-device/actions/workflows/build.yaml?query=branch%3Arolling) of the the `rolling` branch. It might already contain a fix for your issue.
Pick the most top passing entry (it has a green circle with a tick in it), then scoll down to the **Artifacts** and download the file named `update_*`.
discussion:
body: |
You can use the latest [Automatic Build](https://github.com/jomjol/AI-on-the-edge-device/actions/workflows/build.yaml?query=branch%3Arolling) of the the `rolling` branch. It might already contain a fix for your issue.
Pick the most top passing entry (it has a green circle with a tick in it), then scoll down to the **Artifacts** and download the file named `update_*`.
91 changes: 5 additions & 86 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,60 +54,10 @@ jobs:
key: ${{ github.run_number }}



#########################################################################################
## Pack for old OTA (v1)
#########################################################################################
pack-for-OTA-v1:
# Old OTA concept
# firmware__*.zip needs to be unpacked before attaching to the release!
# The bin filename can contain versioning.
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v3

- name: Get generated files from cache
uses: actions/cache@v3
with:
path: |
./code/.pio/build/esp32cam/firmware.bin
./code/.pio/build/esp32cam/partitions.bin
./code/.pio/build/esp32cam/bootloader.bin
./sd-card/html/version.txt
key: ${{ github.run_number }}

- name: Set Variables
id: vars
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "branch=$(echo ${{ github.ref_name }} | tr / __)" >> $GITHUB_OUTPUT
- name: Rename firmware file to contain versioning (old ota)
run: |
mkdir -p ./dist_old_ota
cp "./code/.pio/build/esp32cam/firmware.bin" "./dist_old_ota/firmware__${{ steps.vars.outputs.branch }}_(${{ steps.vars.outputs.sha_short }}).bin"
- name: Upload Firmware artifact (old OTA concept)
uses: actions/upload-artifact@v3
with:
# name: "firmware__${{ github.ref_name }}__(${{ steps.vars.outputs.sha_short }})__(extract_before_upload__only_needed_for_migration_from_11.3.1)"
name: "firmware__(extract_before_upload)__${{ steps.vars.outputs.branch }}__(${{ steps.vars.outputs.sha_short }})"
path: ./dist_old_ota/*

- name: Upload Web interface artifact (old OTA concept)
uses: actions/upload-artifact@v3
with:
name: "html__${{ steps.vars.outputs.branch }}__(${{ steps.vars.outputs.sha_short }})"
path: ./sd-card/html/*



#########################################################################################
## Pack for new OTA (v2)
## Pack for new OTA
#########################################################################################
pack-for-OTA-v2:
pack-for-OTA:
# New OTA concept
# update__version.zip file with following content:
# - /firmware.bin
Expand Down Expand Up @@ -140,21 +90,9 @@ jobs:
mkdir -p ./dist
cp "./code/.pio/build/esp32cam/firmware.bin" "dist/firmware.bin"
# - name: Upload update.zip Artifact (Firmware only)
# uses: actions/upload-artifact@v3
# with:
# name: "update_firmware_only__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
# path: ./dist/*

- name: Add Web UI to dist
run: cp -r ./sd-card/html ./dist/

# - name: Upload update.zip artifact (Firmware + Web UI)
# uses: actions/upload-artifact@v3
# with:
# name: "update_firmware+webinterface__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
# path: ./dist/*

- name: Add CNN to dist
run: |
mkdir ./dist/config/
Expand All @@ -171,7 +109,7 @@ jobs:
uses: actions/cache@v3
with:
path: dist
key: ${{ github.run_number }}-pack-for-OTA-v2
key: ${{ github.run_number }}-pack-for-OTA



Expand Down Expand Up @@ -235,7 +173,7 @@ jobs:
#########################################################################################
release:
runs-on: ubuntu-latest
needs: [pack-for-OTA-v2, pack-for-fresh-install]
needs: [pack-for-OTA, pack-for-fresh-install]
if: startsWith(github.ref, 'refs/tags/')

steps:
Expand All @@ -245,22 +183,12 @@ jobs:
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Get generated files from cache
uses: actions/cache@v3
with:
path: |
./code/.pio/build/esp32cam/firmware.bin
./code/.pio/build/esp32cam/partitions.bin
./code/.pio/build/esp32cam/bootloader.bin
./sd-card/html/version.txt
key: ${{ github.run_number }}

# import the changes from
- name: Get generated files from cache
uses: actions/cache@v3
with:
path: dist
key: ${{ github.run_number }}-pack-for-OTA-v2
key: ${{ github.run_number }}-pack-for-OTA

# import cached artifacts from pack-for-fresh-install
- name: Get generated files from cache
Expand All @@ -269,23 +197,16 @@ jobs:
path: firmware
key: ${{ github.run_number }}-pack-for-fresh-install



- name: Prepare artifacts for release
run: |
mkdir -p release
mkdir -p dist
# create a update.zip like "update__rolling"
pwd
ls ./dist
cd ./dist
zip -r ../release/update.zip .
cd ../firmware
zip -r ../release/initial_esp32_setup.zip .
cd ../sd-card/html
zip -r ../../firmware/html-from-11.3.1.zip .
# extract the version used in next step
- id: get_version
if: startsWith(github.ref, 'refs/tags/')
Expand Down Expand Up @@ -318,8 +239,6 @@ jobs:
body: ${{ steps.extract-release-notes.outputs.release_notes }}
files: |
release/*
firmware/firmware.bin
firmware/html-from-11.3.1.zip
# Commit&Push Changelog to master branch. Must be manually merged back to rolling
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/reply-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Reply Bot
# It uses the configuration in .github/label-commenter-config.yml
# See https://github.com/peaceiris/actions-label-commenter

name: Reply-Bot

on:
issues:
types: [labeled]
discussion:
types: [labeled]

permissions:
contents: read
issues: write
pull-requests: write
discussions: write

jobs:
comment:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Remove 'Web Console' label again (issues only)
if: github.event.label.name == 'bot-reply Web Console'
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-labels'
labels: 'bot-reply Web Console'

- name: Remove 'Rolling Build' label again (issues only)
if: github.event.label.name == 'bot-reply Rolling Build'
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-labels'
labels: 'bot-reply Rolling Build'

- name: Write Response
uses: peaceiris/actions-label-commenter@c2d00660c86f2b9ed0fb35b372c451558eba85b3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
42 changes: 28 additions & 14 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## [Unreleased]

## [13.0.7] - 2022-12-11
## [13.0.7] 2022-12-11

**Home Assistant MQTT Discovery Support**

### Update Procedure

:bangbang: **Make sure to read the instructions below carfully!**.
:bangbang: **Make sure to read the instructions below carfully!**

1. Backup your configuration (use the `System -> Backup/Restore` page)!

Expand All @@ -19,13 +19,15 @@
4. Let it restart and check on the `System -> Info` page that the Firmware as well as the Web UI got updated. If only one got updated, redo the update. If it fails several times, you also can update the Firmware and the Web UI separately.

5. Safe way:
1. Update first the `firmware.bin` (extract from zip file) and do the Reboot
1. Update first the `firmware.bin` (extract it from one of the provided zip files) and do the Reboot
2. Update with the full zip file (`update-*.zip`, ignore the version warning after the reboot)

6. Please go to `Settings -> Configuration` and address the changed parameters:
- DataLogging (storing the values for data graph)
- Debug (extended by different debug reporting levels)

7. Make sure it starts to do the digitalization (check the Error field on the overview page). If it does not start a round within a minute, restart the device.

If anything breaks you can try to enforce manual update as following:

**OTA:**
Expand Down Expand Up @@ -65,10 +67,17 @@ If anything breaks you can try to enforce manual update as following:
- NEW v13.0.2: Update Tool "Logfile downloader and combiner" to handle the new csv file format.
- NEW v13.0.2: MQTT: Added MQTT topic `status` (Digitalization Status), Timezone to MQTT topic `timestamp`.#
- NEW v13.0.2: Logging: Disable heap logs by default, cleanup
- **NEW v13.0.5**:
- log NTP server name
- Improved log messages
- Various preparations for next release
- NEW v13.0.7:
- log NTP server name
- Improved log messages
- Various preparations for next release
- **NEW v13.0.8**:
- Continue booting on PSRAM issues, Web UI will show an error
- Updated models
- Various UI enhancements
- Various internal improvements
- Show uptime in log
- Show uptime and round on overview page

### Fixed

Expand All @@ -84,13 +93,18 @@ If anything breaks you can try to enforce manual update as following:
- NEW v13.0.3: Re-updated build environment to v5.2.0 (from accidental downgrad to v4.4.0)
- NEW v13.0.4: Fix for reboot in case of MQTT not used
- NEW v13.0.5: No reboot in case of missing NTP-connection
- **NEW v13.0.5**:
- Prevent autoreboot on cam framebuffer init error
- Properly protect `wlan.ini` against deletion
- Fixed various MQTT topic content issues
- Fix Digit detected as 10 (<https://github.com/jomjol/AI-on-the-edge-device/pull/1525>)
- Fix frozen time in datafile on error
- Various minor fixes
- NEW v13.0.7:
- Prevent autoreboot on cam framebuffer init error
- Properly protect `wlan.ini` against deletion
- Fixed various MQTT topic content issues
- Fix Digit detected as 10 (https://github.com/jomjol/AI-on-the-edge-device/pull/1525)
- Fix frozen time in datafile on error
- Various minor fixes
- **NEW v13.0.8**:
- Fix Rate Problem ([#1578](https://github.com/jomjol/AI-on-the-edge-device/issues/1578), [#1572](https://github.com/jomjol/AI-on-the-edge-device/issues/1572))
- Stabilized MQTT
- Fixed redundant calls in OTA
- Block REST API calls till resource is ready

### Removed

Expand Down
8 changes: 8 additions & 0 deletions FeatureRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@


____
#### #34 implement state and Roi for water leak detection
for example see Roi on the next picture..
![grafik](https://user-images.githubusercontent.com/38385805/207858812-2a6ba41d-1a8c-4fa1-9b6a-53cdd113c106.png)
in case of position change between the measurments set this state to true, if there is no change set it back to false.
In a defined time window this movement can lead into an alarm state / water leak..
haveing this state in the mqtt broker can trigger functions like closing the ater pipe walve and so on...



#### #33 Implement MATTER protocoll

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ There are different ways to flash your ESP32:

See the [Wiki](https://github.com/jomjol/AI-on-the-edge-device/wiki/Installation) for more information.

### Flashing the SD-Card
The SD-Card must be flashed separately, see the [Wiki](https://github.com/jomjol/AI-on-the-edge-device/wiki/Installation) for details.

## Casing

A 3d-printable housing can be found here:
Expand Down
Loading

0 comments on commit 1ee8f47

Please sign in to comment.