Skip to content

Commit

Permalink
Merge branch 'main' into update-esp-nn
Browse files Browse the repository at this point in the history
  • Loading branch information
jomjol committed Oct 13, 2024
2 parents 2e0e084 + 14d0c88 commit 2a502d3
Show file tree
Hide file tree
Showing 46 changed files with 1,107 additions and 276 deletions.
35 changes: 25 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
./code/.pio/build/esp32cam/partitions.bin
./code/.pio/build/esp32cam/bootloader.bin
./html/*
./demo/*
key: generated-files-${{ github.run_id }}
restore-keys: generated-files # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache

Expand Down Expand Up @@ -87,6 +88,11 @@ jobs:
echo "Replacing variables..."
cd html; find . -type f -exec sed -i 's/$COMMIT_HASH/${{ steps.vars.outputs.sha_short }}/g' {} \;
- name: Prepare Demo mode files
run: |
rm -rf ./demo
mkdir demo
cp -r ./sd-card/demo/* ./demo/
#########################################################################################
## Pack for Update
Expand All @@ -97,6 +103,7 @@ jobs:
# - /firmware.bin
# - (optional) /html/* (inkl. subfolders)
# - (optional) /config/*.tfl
# - (optional) /demo/*
runs-on: ubuntu-latest
needs: build

Expand All @@ -111,6 +118,7 @@ jobs:
./code/.pio/build/esp32cam/partitions.bin
./code/.pio/build/esp32cam/bootloader.bin
./html/*
./demo/*
key: generated-files-${{ github.run_id }}
restore-keys: generated-files # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache

Expand All @@ -135,6 +143,9 @@ jobs:
- name: Add Web UI to update
run: cp -r ./html ./update/

- name: Add Demo mode files to update
run: cp -r ./demo ./update/

- name: Add CNN to update
run: |
Expand All @@ -158,6 +169,7 @@ jobs:
# remote_setup__version.zip file with following content:
# - /firmware.bin
# - /html/* (inkl. subfolders)
# - /demo/*
# - /config/*
runs-on: ubuntu-latest
needs: build
Expand All @@ -173,6 +185,7 @@ jobs:
./code/.pio/build/esp32cam/partitions.bin
./code/.pio/build/esp32cam/bootloader.bin
./html/*
./demo/*
key: generated-files-${{ github.run_id }}
restore-keys: generated-files # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache

Expand All @@ -197,6 +210,9 @@ jobs:
- name: Add Web UI to remote_setup
run: cp -r ./html ./remote_setup/

- name: Add Demo mode files to update
run: cp -r ./demo ./update/

- name: Add whole config folder to remote_setup
run: |
rm -rf ./remote_setup/config/
Expand Down Expand Up @@ -229,6 +245,7 @@ jobs:
./code/.pio/build/esp32cam/partitions.bin
./code/.pio/build/esp32cam/bootloader.bin
./html/*
./demo/*
key: generated-files-${{ github.run_id }}
restore-keys: generated-files # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache

Expand Down Expand Up @@ -257,7 +274,9 @@ jobs:
cp -f "./code/.pio/build/esp32cam/bootloader.bin" "manual_setup/bootloader.bin"
cp -f "./code/.pio/build/esp32cam/partitions.bin" "manual_setup/partitions.bin"
rm -rf ./sd-card/html
rm -rf ./sd-card/demo
cp -r ./html ./sd-card/ # Overwrite the Web UI with the preprocessed files
cp -r ./demo ./sd-card/
cd sd-card; zip -r ../manual_setup/sd-card.zip *; cd ..
cd ./manual_setup
Expand All @@ -271,7 +290,7 @@ jobs:
#########################################################################################
## Prepare and create release
#########################################################################################
release:
prepare-release:
runs-on: ubuntu-latest
needs: [pack-for-update, pack-for-manual_setup, pack-for-remote_setup]
if: startsWith(github.ref, 'refs/tags/')
Expand Down Expand Up @@ -331,34 +350,30 @@ jobs:
# extract the version used in next step
- id: get_version
if: startsWith(github.ref, 'refs/tags/')
uses: Simply007/get-version-action@v2
uses: drewg13/get-version-action@98dda2a47a257e202c2e6c2ed2e6072ec23f448e

# # the changelog [unreleased] will now be changed to the release version
# - name: Update changelog
# uses: thomaseizinger/keep-a-changelog-new-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# changelogPath: Changelog.md
# version: ${{ steps.get_version.outputs.version-without-v }}

# # the release notes will be extracted from changelog
# - name: Extract release notes
# id: extract-release-notes
# if: startsWith(github.ref, 'refs/tags/')
# uses: ffurrer2/extract-release-notes@v1
# with:
# changelog_file: Changelog.md

# Releases should only be created on master by tagging the last commit.
# all artifacts in firmware folder pushed to the release
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2.0.8
# Note:
# If you get the error "Resource not accessible by integration",
# The access rights are not sufficient, see
# https://github.com/softprops/action-gh-release/issues/232#issuecomment-1131379440
if: startsWith(github.ref, 'refs/tags/')
with:
name: ${{ steps.get_version.outputs.version-without-v }}
body: ${{ steps.extract-release-notes.outputs.release_notes }}
Expand All @@ -367,7 +382,6 @@ jobs:
# # Commit&Push Changelog to master branch. Must be manually merged back to rolling
# - name: Commit changes and push changes
# if: startsWith(github.ref, 'refs/tags/')
# run: |
# git config user.name github-actions
# git config user.email [email protected]
Expand All @@ -380,8 +394,9 @@ jobs:
## Update the Web Installer on a release
#########################################################################################
# Make sure to also update update-webinstaller.yml!
update-web-installer:
needs: [release]
update-web-installer:
if: github.event_name == 'release' && github.event.action == 'published' # Only run on release but not on prerelease
needs: [prepare-release]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/manual-update-contributors-list.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This updates the Contributors list in the README.md
# it only gets run on:
# - Manually triggered

name: Manually update contributors list

on:
workflow_dispatch: # Run on manual trigger

jobs:
manually-update-contributors-list:
runs-on: ubuntu-latest
name: A job to automatically update the contributors list in the README.md
permissions:
contents: write
pull-requests: write
steps:
- name: Contribute List
uses: akhilmhdh/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71 changes: 64 additions & 7 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
## [16.0.0-RC4] - 2024-10-06

For a full list of changes see [Full list of changes](https://github.com/jomjol/AI-on-the-edge-device/compare/v15.7.0...v16.0.0-RC1)

#### Known issues
Please check the [issues](https://github.com/jomjol/AI-on-the-edge-device/issues) and
[discussions](https://github.com/jomjol/AI-on-the-edge-device/discussions) before reporting a new issue.

#### Core Changes
Only changes since RC2 are listed:
- Update esp32-camera submodule to `v2.0.13` (#3316)
- Added contributor list (#3317)
- Added files for demo mode (#3315)

#### Bug Fixes
Only changes since RC2 are listed:
- Added delay in InitCam (#3313) to fix `Camera not detected` issues


## [16.0.0-RC3] - 2024-10-05

For a full list of changes see [Full list of changes](https://github.com/jomjol/AI-on-the-edge-device/compare/v15.7.0...v16.0.0-RC1)

#### Known issues
Please check the [issues](https://github.com/jomjol/AI-on-the-edge-device/issues) and
[discussions](https://github.com/jomjol/AI-on-the-edge-device/discussions) before reporting a new issue.

#### Core Changes
Only changes since RC2 are listed:
- Renamed MQTT topic from `rate_per_digitalization_round` to `rate_per_digitization_round` (change happened already in RC1)

#### Bug Fixes
Only changes since RC2 are listed:
- Re-did revertion of TFlite submodule update as certain modules crash with it (#3269) (change was lost)


## [16.0.0-RC2] - 2024-10-04

For a full list of changes see [Full list of changes](https://github.com/jomjol/AI-on-the-edge-device/compare/v15.7.0...v16.0.0-RC1)

#### Known issues
Please check the [issues](https://github.com/jomjol/AI-on-the-edge-device/issues) and
[discussions](https://github.com/jomjol/AI-on-the-edge-device/discussions) before reporting a new issue.

#### Core Changes
Only changes since RC1 are listed:
- Updated parameter documentation pages
- Rename/remove unused parameters (#3291)
- Migrate-cam-parameters (#3288)

#### Bug Fixes
Only changes since RC1 are listed:
- Reverted TFlite submodule update as certain modules crash with it (#3269)
- Changed the webhook UploadImg to false (#3279)
- Changed default value from boolean to numeric value in parameter camDenoise documentation
- Updated config page

## [16.0.0-RC1] - 2024-09-24

For a full list of changes see [Full list of changes](https://github.com/jomjol/AI-on-the-edge-device/compare/v15.7.0...v16.0.0-RC1)
Expand Down Expand Up @@ -524,16 +581,16 @@ Intermediate Digits
- Implementation of new CNN types to detect intermediate values of digits with rolling numbers

- By default the old algo (0, 1, ..., 9, "N") is active (due to the limited types of digits trained so far)
- Activation can be done by selection a tflite file with the new trained model in the 'config.ini'
- Activation can be done by selecting a tflite file with the new trained model in the 'config.ini'
- **Details can be found in the [wiki](https://github.com/jomjol/AI-on-the-edge-device/wiki/Neural-Network-Types)** (different types, trained image types, naming convention)

- Updated neural network files (and adaption to new naming convention)
- Updated neural network files (and adaptation to new naming convention)

- Published a tool to download and combine log files - **Thanks to **
- Published a tool to download and combine log files - Thanks to [Contributor]

- Files see ['/tools/logfile-tool'](tbd), How-to see [wiki](https://github.com/jomjol/AI-on-the-edge-device/wiki/Gasmeter-Log-Downloader)

- Bug Fix: InfluxDB enabling in grahic configuration
- Bug Fix: InfluxDB enabling in graphic configuration

## [10.6.2](https://github.com/jomjol/AI-on-the-edge-device/releases/tag/v10.6.2), 2022-07-24

Expand All @@ -547,7 +604,7 @@ Stability Increase

- **NEW 10.6.1**: Bug Fix: tflite-filename with ".", HTML spelling error

- IndluxDB: direct injection into InfluxDB - thanks to **[wetneb](https://github.com/wetneb)**
- InfluxDB: direct injection into InfluxDB - thanks to **[wetneb](https://github.com/wetneb)**

- MQTT: implemented "Retain Flag" and extend with absolute Change (in addition to rate)

Expand Down Expand Up @@ -1062,7 +1119,7 @@ External Illumination
- Bug in configuration of analog ROIs corrected


- minor bug correction
- minor Bug correction

## [1.0.1](2020-09-05)

Expand All @@ -1071,7 +1128,7 @@ External Illumination
- preValue.ini Bug corrected


- minor bug correction
- minor Bug correction

## [1.0.0](2020-09-04)

Expand Down
12 changes: 6 additions & 6 deletions FeatureRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ ____
Demo mode requires a working camera (if not, one receives a 'Cam bad' error). Would be nice to demo or play around on other ESP32 boards (or on ESP32-CAM boards when you broke the camera cable...).

#### #35 Use the same model, but provide the image from a Smartphone Camera
as reading the Electricity or Water meter every few minutues only delivers apparent accuracy (DE: "Scheingenauigkeit") you could just as well take a picture with your Smartphone evey so often (e.g. once a week when you are in the Basement anyway), then with some "semi clever" tricks pass this image to the model developed here, and the values then on to who ever needs them e.g. via MQTT.
as reading the Electricity or Water meter every few minutes only delivers apparent accuracy (DE: "Scheingenauigkeit") you could just as well take a picture with your Smartphone every so often (e.g. once a week when you are in the Basement anyway), then with some "semi clever" tricks pass this image to the model developed here, and the values than on to whoever needs them e.g. via MQTT.
IMO: It is not needed to have that many readings (datapoints) as our behaviour (Use of electricity or water) doesn't vary that much, say, over a weeks time. The interpolation between weekly readings will give sufficient information on the power and/or water usage.


#### #34 implement state and Roi for water leak detection
for example see Roi on the next picture..
for example see Roi in 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 case of position change between the measurements 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...
having this state in the mqtt broker can trigger functions like closing the water pipe valve and so on...



Expand All @@ -65,7 +65,7 @@ haveing this state in the mqtt broker can trigger functions like closing the ate

#### #31 Implement InfluxDB v2.x interface

* Currently only InfluxDB v1.x is supportet, extend to v2.x
* Currently only InfluxDB v1.x is supported, extend to v2.x
* Remark: interface has changed
* see [#1160](https://github.com/jomjol/AI-on-the-edge-device/issues/1160)

Expand All @@ -82,7 +82,7 @@ haveing this state in the mqtt broker can trigger functions like closing the ate
#### #28 Improved error handling for ROIs

* In case a ROI is out of the image, there is no error message, but a non sense image is used
* Implement a error message for wrong configuratioin of ROI
* Implement a error message for wrong configuration of ROI

#### #27 Use Homie Spec for Mqtt binding

Expand Down
Loading

0 comments on commit 2a502d3

Please sign in to comment.