Merge branch 'InfluxDB-Fix-Timeshift' into rolling

This commit is contained in:
jomjol
2023-02-08 20:31:17 +01:00
3 changed files with 27 additions and 67 deletions

View File

@@ -326,13 +326,13 @@ jobs:
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: battila7/get-version-action@v2 uses: battila7/get-version-action@v2
# the changelog [unreleased] will now be changed to the release version # # the changelog [unreleased] will now be changed to the release version
- name: Update changelog # - name: Update changelog
uses: thomaseizinger/keep-a-changelog-new-release@v1 # uses: thomaseizinger/keep-a-changelog-new-release@v1
if: startsWith(github.ref, 'refs/tags/') # if: startsWith(github.ref, 'refs/tags/')
with: # with:
changelogPath: Changelog.md # changelogPath: Changelog.md
version: ${{ steps.get_version.outputs.version-without-v }} # version: ${{ steps.get_version.outputs.version-without-v }}
# the release notes will be extracted from changelog # the release notes will be extracted from changelog
- name: Extract release notes - name: Extract release notes
@@ -341,7 +341,6 @@ jobs:
uses: ffurrer2/extract-release-notes@v1 uses: ffurrer2/extract-release-notes@v1
with: with:
changelog_file: Changelog.md changelog_file: Changelog.md
# Releases should only be created on master by tagging the last commit. # Releases should only be created on master by tagging the last commit.
# all artifacts in firmware folder pushed to the release # all artifacts in firmware folder pushed to the release
@@ -358,15 +357,15 @@ jobs:
files: | files: |
release/* release/*
# Commit&Push Changelog to master branch. Must be manually merged back to rolling # # Commit&Push Changelog to master branch. Must be manually merged back to rolling
- name: Commit changes and push changes # - name: Commit changes and push changes
if: startsWith(github.ref, 'refs/tags/') # if: startsWith(github.ref, 'refs/tags/')
run: | # run: |
git config user.name github-actions # git config user.name github-actions
git config user.email github-actions@github.com # git config user.email github-actions@github.com
git add Changelog.md # git add Changelog.md
git commit Changelog.md -m "Update Changelog.md for ${{github.event.inputs.versionIncrement}} release" # git commit Changelog.md -m "Update Changelog.md for ${{github.event.inputs.versionIncrement}} release"
git push origin HEAD:master # git push origin HEAD:master
######################################################################################### #########################################################################################

View File

@@ -1,33 +1,5 @@
# Changelog
## [Unreleased] ## [Unreleased]
### Update Procedure
Update Procedure see [online documentation](https://jomjol.github.io/AI-on-the-edge-device-docs/Installation/#update-ota-over-the-air)
### Changes
For a full list of changes see [Full list of changes](https://github.com/jomjol/AI-on-the-edge-device/compare/rolling...v14.0.0)
#### Added
- n.a.
#### Changed
- n.a.
#### Fixed
- [#1961](https://github.com/jomjol/AI-on-the-edge-device/issues/1961) Weird ROI Image with `FlipImageSize = true`
#### Removed
- n.a.
## [14.0.0] - 2023-02-02
**Stabilization and Improved User Experience** **Stabilization and Improved User Experience**
Thanks to over 80 Pull Requests from 6 contributors, we can anounce another great release with many many improvements and new features: Thanks to over 80 Pull Requests from 6 contributors, we can anounce another great release with many many improvements and new features:
@@ -75,6 +47,7 @@ For a full list of changes see [Full list of changes](https://github.com/jomjol/
- [1530](https://github.com/jomjol/AI-on-the-edge-device/pull/1530) Homeassistant `Problem Sensor` - [1530](https://github.com/jomjol/AI-on-the-edge-device/pull/1530) Homeassistant `Problem Sensor`
- [1518](https://github.com/jomjol/AI-on-the-edge-device/pull/1518) JSON Strings - [1518](https://github.com/jomjol/AI-on-the-edge-device/pull/1518) JSON Strings
- [1817](https://github.com/jomjol/AI-on-the-edge-device/pull/1817) DataGraph: datafiles sorted -> newest on top - [1817](https://github.com/jomjol/AI-on-the-edge-device/pull/1817) DataGraph: datafiles sorted -> newest on top
- **New 14.0.4:** Fix for InfluxDB timeshift problem [#1991](https://github.com/jomjol/AI-on-the-edge-device/issues/1991)
#### Removed #### Removed
@@ -829,24 +802,14 @@ External Illumination
- Initial Version - Initial Version
[14.0.0]: https://github.com/jomjol/AI-on-the-edge-device/compare/v13.0.8...v14.0.2
[13.0.8]: https://github.com/jomjol/AI-on-the-edge-device/compare/v12.0.1...v13.0.8 [13.0.8]: https://github.com/jomjol/AI-on-the-edge-device/compare/v12.0.1...v13.0.8
[13.0.7]: https://github.com/jomjol/AI-on-the-edge-device/compare/v12.0.1...v13.0.7 [13.0.7]: https://github.com/jomjol/AI-on-the-edge-device/compare/v12.0.1...v13.0.7
[13.0.5]: https://github.com/jomjol/AI-on-the-edge-device/compare/v12.0.1...v13.0.5 [13.0.5]: https://github.com/jomjol/AI-on-the-edge-device/compare/v12.0.1...v13.0.5
[13.0.4]: https://github.com/jomjol/AI-on-the-edge-device/compare/v12.0.1...v13.0.4 [13.0.4]: https://github.com/jomjol/AI-on-the-edge-device/compare/v12.0.1...v13.0.4
[13.0.1]: https://github.com/jomjol/AI-on-the-edge-device/compare/v12.0.1...v13.0.1 [13.0.1]: https://github.com/jomjol/AI-on-the-edge-device/compare/v12.0.1...v13.0.1
[12.0.1]: https://github.com/jomjol/AI-on-the-edge-device/compare/v11.3.1...v12.0.1 [12.0.1]: https://github.com/jomjol/AI-on-the-edge-device/compare/v11.3.1...v12.0.1
[11.4.3]: https://github.com/haverland/AI-on-the-edge-device/compare/v10.6.2...v11.4.3 [11.4.3]: https://github.com/haverland/AI-on-the-edge-device/compare/v10.6.2...v11.4.3
[11.4.2]: https://github.com/haverland/AI-on-the-edge-device/compare/v10.6.2...v11.4.2 [11.4.2]: https://github.com/haverland/AI-on-the-edge-device/compare/v10.6.2...v11.4.2
[11.3.9]: https://github.com/haverland/AI-on-the-edge-device/compare/v10.6.2...v11.3.9 [11.3.9]: https://github.com/haverland/AI-on-the-edge-device/compare/v10.6.2...v11.3.9
[Unreleased]: https://github.com/jomjol/AI-on-the-edge-device/compare/14.0.0...HEAD
[14.0.0]: https://github.com/jomjol/AI-on-the-edge-device/compare/13.0.8...14.0.0

View File

@@ -67,23 +67,21 @@ void InfluxDBPublish(std::string _key, std::string _content, std::string _timest
// Format: #define PREVALUE_TIME_FORMAT_OUTPUT "%Y-%m-%dT%H:%M:%S%z" // Format: #define PREVALUE_TIME_FORMAT_OUTPUT "%Y-%m-%dT%H:%M:%S%z"
struct tm tm; struct tm tm;
strptime(_timestamp.c_str(), PREVALUE_TIME_FORMAT_OUTPUT, &tm); strptime(_timestamp.c_str(), PREVALUE_TIME_FORMAT_OUTPUT, &tm);
time_t t = mktime(&tm); // t is now your desired time_t
time_t t = mktime(&tm); // Time in Localtime (looks like timezone is not used by strptime)
struct tm * ptm; struct tm * ptm;
ptm = gmtime ( &t ); ptm = gmtime ( &t );
time_t utc = mktime(ptm); time_t utc = mktime(ptm);
utc = 2*t - utc;
// time_t now;
// time(&now);
char nowTimestamp[21]; char nowTimestamp[21];
// pad with zeroes to get nanoseconds
// sprintf(nowTimestamp,"%ld000000000", (long) now);
// sprintf(nowTimestamp,"%ld000000000", (long) t); // Localtime
sprintf(nowTimestamp,"%ld000000000", (long) utc); // UTC
// LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "Test Time Conversion - t: " + std::to_string(t) + ", utc: " + std::to_string(utc)); sprintf(nowTimestamp,"%ld000000000", (long) utc); // UTC
// LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "Test Time Conversion - now: " + std::to_string(now) + ", timestamp: " + std::to_string(t) + "(correct time not used yet)");
// LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "Test Time Conversion - t: " + std::to_string(t) + ", utc: " + std::to_string(utc) + ", now: " + std::to_string(now) + ", utc_local: " + std::to_string(utc_local));
std::string payload = _influxDBMeasurement + " " + _key + "=" + _content + " " + nowTimestamp; std::string payload = _influxDBMeasurement + " " + _key + "=" + _content + " " + nowTimestamp;
payload.shrink_to_fit(); payload.shrink_to_fit();