Release Preparations (#1925)

* Fix for securing wlan.ini (#1509)

* Fix for securing wlan.ini

* Fixing error with ' instead of "

* Changing to errorcode 403

* maybe strcmp instead of regular ==

Co-authored-by: Pär Hedberg <par.hedberg@nordicmedtest.se>

* Update Web-Installer

* solves #1530 (#1531)

* Refactor JSON (#1518)

* use correct log level

* corrected logging

* typo

* refactored JSON generagion: removed unused parameters, consolidated into singel function, added "pre"

* Wrapped 'rate' into double quotes, like all other JSON values

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Various corrections (#1519)

* use correct log level

* corrected logging

* typo

* add release to webinstaller

* changed logs, added INFO log of raw, value, error

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Prevent auto restart on cam framebuffer init error (#1522)

* use correct log level

* revert autorestart on camera framebuffer init error

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* #1524 - ensure the recognized digit is less than 10 (#1525)

* fix kernel panic (vector out of range) in getReadoutRawString

* fix key of caches

* fix key of caches

* fix key caches

* fix cache keys

* fix cache keys

* move set variables to top

* debug

* fix key

* testing

* try fix changelog

* test

* Update Changelog.md for  release

* Revert "Update Changelog.md for  release"

This reverts commit 4f51ec7962.

* remove testing

* fix release creation

* testing

* Update Changelog.md for  release

* test

* Revert "Merge branch 'master' of https://github.com/haverland/AI-on-the-edge-device"

This reverts commit f68695a4c0, reversing
changes made to a096cf7182.

* Revert "test"

This reverts commit a096cf7182.

* revert testing

* #1524 - ensure the result of ZeigerEvalHybridNeu is <10

* Fix late digit transition #1503

Co-authored-by: github-actions <github-actions@github.com>

* fix frozen time in datafile on error (#1534)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* log NTP server name (#1497)

* log NTP server name

* .

* .

* replace calls to /wasserzaehler.html with calls to /value (#1469)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Fix cookie usage, use correct http response codes, add 404 page (#1495)

* replaced some HTTP response code with better matching codes

* add custom 404 page, add log entry for debugging

* fix cookie

* replace non-necessary whitespace

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Don't autofail if NTP server can't be reached during initalization (#1498)

This fixes an issue with a restricted network without internet access,
where the hardcoded ntp server can't be reached and thus the esp resets,
as it's not able to finish initalization.

* Update Changelog.md

* Update Changelog.md for  release

* Fix for securing wlan.ini (#1509)

* Fix for securing wlan.ini

* Fixing error with ' instead of "

* Changing to errorcode 403

* maybe strcmp instead of regular ==

Co-authored-by: Pär Hedberg <par.hedberg@nordicmedtest.se>

* Update Web-Installer

* solves #1530 (#1531)

* Refactor JSON (#1518)

* use correct log level

* corrected logging

* typo

* refactored JSON generagion: removed unused parameters, consolidated into singel function, added "pre"

* Wrapped 'rate' into double quotes, like all other JSON values

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Various corrections (#1519)

* use correct log level

* corrected logging

* typo

* add release to webinstaller

* changed logs, added INFO log of raw, value, error

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Prevent auto restart on cam framebuffer init error (#1522)

* use correct log level

* revert autorestart on camera framebuffer init error

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* #1524 - ensure the recognized digit is less than 10 (#1525)

* fix kernel panic (vector out of range) in getReadoutRawString

* fix key of caches

* fix key of caches

* fix key caches

* fix cache keys

* fix cache keys

* move set variables to top

* debug

* fix key

* testing

* try fix changelog

* test

* Update Changelog.md for  release

* Revert "Update Changelog.md for  release"

This reverts commit 4f51ec7962.

* remove testing

* fix release creation

* testing

* Update Changelog.md for  release

* test

* Revert "Merge branch 'master' of https://github.com/haverland/AI-on-the-edge-device"

This reverts commit f68695a4c0, reversing
changes made to a096cf7182.

* Revert "test"

This reverts commit a096cf7182.

* revert testing

* #1524 - ensure the result of ZeigerEvalHybridNeu is <10

* Fix late digit transition #1503

Co-authored-by: github-actions <github-actions@github.com>

* only use sntp_getservername() after init sntp

* set default NTP server on dnew installations

Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: Ralf Rachinger <git@ralfrachinger.de>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: parhedberg <par.hedberg@gmail.com>
Co-authored-by: Pär Hedberg <par.hedberg@nordicmedtest.se>
Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
Co-authored-by: Frank Haverland <fspapaping@googlemail.com>

* Renamed variables and added debug log (#1537)

* add debug logs

* renamed variables

* renamed TAGs, added flow status logging

* .

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* replaced printf usage in LogFile.WriteToFile()

* ENABLE_MQTT c++ macro definition (#1546)

* macro

* 2

* 2

* delete jomjol_mqtt from CMakeLists

* mqtt macro

* final

* ENABLE_INFLUXDB c++ macro definition (#1547)

* macro

* 2

* 2

* delete jomjol_mqtt from CMakeLists

* mqtt macro

* final

* ENABLE_INFLUXDB c++ macro definition

* Update Changelog.md

* Update Changelog.md

* Rearange task to CPU (http, camera, mqtt) (#1557)

* Streamlined MQTT interlock when not activated & interlock MQTT when WIFI is not connected (#1556)

* streamlined mqtt interlock when disabled

* Disconnect mqtt client before reboot

* Interlock MQTT with WIFI

* Update

* loglevel to DEBUG

* Update

* mqtt msg id incremental

* new ENABLE_MQTT includes

* Loglevel to DEBUG

* Loglevel

* Update interface_mqtt.cpp

* show uptime on overview page, moved labels from firmware to Web UI (#1543)

* show uptime on overview page, moved labels from firmware to Web UI

* show uptime on info page

* also use formated time in log

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Continue boot on bad PSRAM (#1558)

* add sensor status, show special index/setup page in case of a critical error

* continue booting on PSRAM error

* Update main.cpp

added log messages

* init PSRAM and add more log messages

* cleanup of init checks

* .

* .

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* add sensor status, show special index/setup page in case of a critical error (#1560)

* add sensor status, show special index/setup page in case of a critical error

* Added Reboot

* .

* added more buttons

Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>

* Update Webinstaller to v13.0.7

* remove  html-from-11.3.1 in release (#1565)

* fix kernel panic (vector out of range) in getReadoutRawString

* fix key of caches

* fix key of caches

* fix key caches

* fix cache keys

* fix cache keys

* move set variables to top

* debug

* fix key

* testing

* try fix changelog

* test

* Update Changelog.md for  release

* Revert "Update Changelog.md for  release"

This reverts commit 4f51ec7962.

* remove testing

* fix release creation

* testing

* Update Changelog.md for  release

* test

* Revert "Merge branch 'master' of https://github.com/haverland/AI-on-the-edge-device"

This reverts commit f68695a4c0, reversing
changes made to a096cf7182.

* Revert "test"

This reverts commit a096cf7182.

* revert testing

* #1524 - ensure the result of ZeigerEvalHybridNeu is <10

* Fix late digit transition #1503

* only initial_esp32_setup and update.zip as artefacts

* remove unneeded cache

* rename step ota-v2 to ota

* rename ota-v2 to ota

Co-authored-by: github-actions <github-actions@github.com>

* make the sidebar on the overviw page wider and show the round counter (#1570)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Create reply-bot.yml

* Update ClassFlowPostProcessing.cpp

* Add bot (#1581)

* Update reply-bot.yml

* Create label-commenter-config.yml

* added missing html change

* extended instructions (#1583)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Fix Rate Problem

* removed redundant "Status:"

* Bugfix Double Extract ZIP-Files

* Update FeatureRequest.md (#1591)

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...

* Update manifest.json

* Delete .gitignore

* Delete .gitmodules

* Delete firmware.bin

* Add files via upload

* Block REST API calls till resource is ready (#1609)

* Block REST API call till ressource is ready

* Update

* Update

* Update

* replace relative include of gethost.js with absolute one. This is needed as that file gets incuded on dynamically generated content which can be on different path levels (#1610)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* esp_spiram.h has been replaced by esp32/spiram.h (#1605)

* esp_spiram.h has been replaced by esp32/spiram.h

* Preparations for next Bugfix Release (#1615)

* Merge branch 'rolling' (#1559)

* Fix for securing wlan.ini (#1509)

* Fix for securing wlan.ini

* Fixing error with ' instead of "

* Changing to errorcode 403

* maybe strcmp instead of regular ==

Co-authored-by: Pär Hedberg <par.hedberg@nordicmedtest.se>

* Update Web-Installer

* solves #1530 (#1531)

* Refactor JSON (#1518)

* use correct log level

* corrected logging

* typo

* refactored JSON generagion: removed unused parameters, consolidated into singel function, added "pre"

* Wrapped 'rate' into double quotes, like all other JSON values

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Various corrections (#1519)

* use correct log level

* corrected logging

* typo

* add release to webinstaller

* changed logs, added INFO log of raw, value, error

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Prevent auto restart on cam framebuffer init error (#1522)

* use correct log level

* revert autorestart on camera framebuffer init error

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* #1524 - ensure the recognized digit is less than 10 (#1525)

* fix kernel panic (vector out of range) in getReadoutRawString

* fix key of caches

* fix key of caches

* fix key caches

* fix cache keys

* fix cache keys

* move set variables to top

* debug

* fix key

* testing

* try fix changelog

* test

* Update Changelog.md for  release

* Revert "Update Changelog.md for  release"

This reverts commit 4f51ec7962.

* remove testing

* fix release creation

* testing

* Update Changelog.md for  release

* test

* Revert "Merge branch 'master' of https://github.com/haverland/AI-on-the-edge-device"

This reverts commit f68695a4c0, reversing
changes made to a096cf7182.

* Revert "test"

This reverts commit a096cf7182.

* revert testing

* #1524 - ensure the result of ZeigerEvalHybridNeu is <10

* Fix late digit transition #1503

Co-authored-by: github-actions <github-actions@github.com>

* fix frozen time in datafile on error (#1534)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* log NTP server name (#1497)

* log NTP server name

* .

* .

* replace calls to /wasserzaehler.html with calls to /value (#1469)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Fix cookie usage, use correct http response codes, add 404 page (#1495)

* replaced some HTTP response code with better matching codes

* add custom 404 page, add log entry for debugging

* fix cookie

* replace non-necessary whitespace

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Don't autofail if NTP server can't be reached during initalization (#1498)

This fixes an issue with a restricted network without internet access,
where the hardcoded ntp server can't be reached and thus the esp resets,
as it's not able to finish initalization.

* Update Changelog.md

* Update Changelog.md for  release

* Fix for securing wlan.ini (#1509)

* Fix for securing wlan.ini

* Fixing error with ' instead of "

* Changing to errorcode 403

* maybe strcmp instead of regular ==

Co-authored-by: Pär Hedberg <par.hedberg@nordicmedtest.se>

* Update Web-Installer

* solves #1530 (#1531)

* Refactor JSON (#1518)

* use correct log level

* corrected logging

* typo

* refactored JSON generagion: removed unused parameters, consolidated into singel function, added "pre"

* Wrapped 'rate' into double quotes, like all other JSON values

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Various corrections (#1519)

* use correct log level

* corrected logging

* typo

* add release to webinstaller

* changed logs, added INFO log of raw, value, error

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Prevent auto restart on cam framebuffer init error (#1522)

* use correct log level

* revert autorestart on camera framebuffer init error

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* #1524 - ensure the recognized digit is less than 10 (#1525)

* fix kernel panic (vector out of range) in getReadoutRawString

* fix key of caches

* fix key of caches

* fix key caches

* fix cache keys

* fix cache keys

* move set variables to top

* debug

* fix key

* testing

* try fix changelog

* test

* Update Changelog.md for  release

* Revert "Update Changelog.md for  release"

This reverts commit 4f51ec7962.

* remove testing

* fix release creation

* testing

* Update Changelog.md for  release

* test

* Revert "Merge branch 'master' of https://github.com/haverland/AI-on-the-edge-device"

This reverts commit f68695a4c0, reversing
changes made to a096cf7182.

* Revert "test"

This reverts commit a096cf7182.

* revert testing

* #1524 - ensure the result of ZeigerEvalHybridNeu is <10

* Fix late digit transition #1503

Co-authored-by: github-actions <github-actions@github.com>

* only use sntp_getservername() after init sntp

* set default NTP server on dnew installations

Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: Ralf Rachinger <git@ralfrachinger.de>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: parhedberg <par.hedberg@gmail.com>
Co-authored-by: Pär Hedberg <par.hedberg@nordicmedtest.se>
Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
Co-authored-by: Frank Haverland <fspapaping@googlemail.com>

* Renamed variables and added debug log (#1537)

* add debug logs

* renamed variables

* renamed TAGs, added flow status logging

* .

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* replaced printf usage in LogFile.WriteToFile()

* ENABLE_MQTT c++ macro definition (#1546)

* macro

* 2

* 2

* delete jomjol_mqtt from CMakeLists

* mqtt macro

* final

* ENABLE_INFLUXDB c++ macro definition (#1547)

* macro

* 2

* 2

* delete jomjol_mqtt from CMakeLists

* mqtt macro

* final

* ENABLE_INFLUXDB c++ macro definition

* Update Changelog.md

Co-authored-by: parhedberg <par.hedberg@gmail.com>
Co-authored-by: Pär Hedberg <par.hedberg@nordicmedtest.se>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: Frank Haverland <fspapaping@googlemail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ralf Rachinger <git@ralfrachinger.de>
Co-authored-by: Nicolas Liaudat <nliaudat@users.noreply.github.com>

* Update Changelog.md for  release

Co-authored-by: parhedberg <par.hedberg@gmail.com>
Co-authored-by: Pär Hedberg <par.hedberg@nordicmedtest.se>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: Frank Haverland <fspapaping@googlemail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ralf Rachinger <git@ralfrachinger.de>
Co-authored-by: Nicolas Liaudat <nliaudat@users.noreply.github.com>

* new model version (#1619)

* fix kernel panic (vector out of range) in getReadoutRawString

* fix key of caches

* fix key of caches

* fix key caches

* fix cache keys

* fix cache keys

* move set variables to top

* debug

* fix key

* testing

* try fix changelog

* test

* Update Changelog.md for  release

* Revert "Update Changelog.md for  release"

This reverts commit 4f51ec7962.

* remove testing

* fix release creation

* testing

* Update Changelog.md for  release

* test

* Revert "Merge branch 'master' of https://github.com/haverland/AI-on-the-edge-device"

This reverts commit f68695a4c0, reversing
changes made to a096cf7182.

* Revert "test"

This reverts commit a096cf7182.

* revert testing

* #1524 - ensure the result of ZeigerEvalHybridNeu is <10

* Fix late digit transition #1503

* only initial_esp32_setup and update.zip as artefacts

* remove unneeded cache

* rename step ota-v2 to ota

* rename ota-v2 to ota

* new models

- ana-class100 v1.5.4
- ana-cont-11.0.4
- dig-class100 v1.5.0

Co-authored-by: github-actions <github-actions@github.com>

* Update Changelog.md (#1630)

* Correct RenameNumber

* Update Changelog.md

* Fix reloading of data file (#1635)

* Update data.html

* fixed

* show link to graph

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Centralizing the defines (#1624)

* defines changes

* Finish #define move + #define STBI_ONLY_JPEGsave 2% of Flash

* remove the defines on the old places

* ClassFlowCNNGeneral in define.h

* revert to origin

* fix translation not ready

* Update defines.h

* Update WebInstaller

* Code translation (#1626)

* comment translation

* translation part #2

* code translation from DE to ENG #part3

* translation #4

* dismantled =>splitted

* bereich => range

* Update defines.h

Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>

* Update manifest.json

* Add files via upload

* #ifndef in *.h + #pragma once (#1639)

* Update defines.h (#1640)

comment #define STBI_ONLY_JPEG as you do no want it in rolling but in rolling-minimize-firmware-size

delete old reference to DE 


'''
    #define AnalogFehler 3
    #define AnalogToDigtalFehler 0.8
    #define DigitalUnschaerfe 0.2
    #define DigitalBand 3
    #define DigitalAnalogerVorgaengerUebergangsbereich 2
    #define DigitalUebergangsbereichVorgaenger 0.7 // 9.3 - 0.7
    #define DigitalUebergangsbereichVorlauf 9.7
'''

* Trigger a flow start by REST API or MQTT (#1648)

* Trigger flow start by Rest API

* Increase handlers

* Update

* Update

* Update

* Change max handlers

* Add debug message

* Trigger flow start by MQTT

* Update

* Remove unused function

* Remove handler_doflow + routines

* Cleanup

* MergeCheck

* Optimize logfile write (#1652)

* remove no longer needed OpenFileAndWait()

* remove WriteToDedicatedFile

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* show release in log instead of branch (#1660)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Update sdkconfig.defaults (#1661)

Reverting changes of `sdkconfig.defaults` falsly added within https://github.com/jomjol/AI-on-the-edge-device/pull/1626

* Init GPIO handler before MQTT init (#1663)

* Update HTML & Firmware (#1671)

* Remove unnecessary null pointer checks #1649 (#1673)

* fix kernel panic (vector out of range) in getReadoutRawString

* fix key of caches

* fix key of caches

* fix key caches

* fix cache keys

* fix cache keys

* move set variables to top

* debug

* fix key

* testing

* try fix changelog

* test

* Update Changelog.md for  release

* Revert "Update Changelog.md for  release"

This reverts commit 4f51ec7962.

* remove testing

* fix release creation

* testing

* Update Changelog.md for  release

* test

* Revert "Merge branch 'master' of https://github.com/haverland/AI-on-the-edge-device"

This reverts commit f68695a4c0, reversing
changes made to a096cf7182.

* Revert "test"

This reverts commit a096cf7182.

* revert testing

* #1524 - ensure the result of ZeigerEvalHybridNeu is <10

* Fix late digit transition #1503

* only initial_esp32_setup and update.zip as artefacts

* remove unneeded cache

* rename step ota-v2 to ota

* rename ota-v2 to ota

* new models

- ana-class100 v1.5.4
- ana-cont-11.0.4
- dig-class100 v1.5.0

* Remove unnecessary null pointer checks #1649

Co-authored-by: github-actions <github-actions@github.com>

* Improve NTP handling (#1676)

* fix special case where number is named "default" (keep all topics in top level instead of in a sub-group)

* re-implemented SNTP usage, added way to disable NTP client, added timezone table

* minor fixes

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* fix special case where number is named "default" (keep all topics in top level instead of in a sub-group) (#1664)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* prepare docs for deployment through actions (#1688)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* make more robust, add log (#1690)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Extend Github Actions (#1680)

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* automate manifest update

* Update build.yaml

* revert changes to docs folder

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Add files via upload

* prepare docs for deployment through actions (#1688)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* automate manifest update

# Conflicts:
#	docs/binary/firmware.bin
#	docs/binary/v12.0.1/firmware.bin
#	docs/binary/v12.0.5/firmware.bin
#	docs/binary/v13.0.5/firmware.bin
#	docs/binary/v13.0.7/firmware.bin

* revert changes to docs folder

* revert changes to docs folder

# Conflicts:
#	docs/releases/download/firmware.bin

* Update build.yaml

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Improve initial setup proc (#1692)

* Initial Test

* Initial functional version.

* Add Bot Replies (#1701)

* Update label-commenter-config.yml

* Update reply-bot.yml

* Update label-commenter-config.yml

* disable remove-labels because they no longer work

* delete img_convert.h as included in code\components\tflite-micro-esp-… (#1695)

* delete img_convert.h as included in code\components\tflite-micro-esp-examples\components\esp32-camera\conversions\include\img_converters.h

* macro definition #ifdef ENABLE_SOFTAP

* macro definition #ifdef ENABLE_SOFTAP (#1698)

* macro definition #ifdef ENABLE_SOFTAP

* Update platformio.ini

* softap define in define.h

* Update platformio.ini

* #define WLAN_CONFIG_FILE "/sdcard/wlan.ini"

Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>

* Deinit components before reboot (#1704)

* Deinit all components before reboot

* Update

* Update

* fetch index.html after reboot -> less 404 (#1705)

* Safe optimizations (#1706)

* safe optimizations

* Merge branch 'rolling' of https://github.com/nliaudat/AI-on-the-edge-device into rolling

* Enable SoftAP

* Update defines

* add a define to configure the logfile handling (#1709)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Move Logfile Switch to define.h

* Update Reboot Algo

* Update server_ota.cpp

* Avoid loading of status infos twice (#1711)

* Force a reboot even reboot task cannot be created due to lack of heap (#1713)

* Deinit all components before reboot

* Update

* Update

* Force reboot when reboot task cannot be created

* Improve log message when web UI is incomplete (#1716)

* improve warning if version.txt is missing

* typo

* show round duration in log

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* fix static IP in UP, improve explanation for HA (#1719)

* fix static IP in UP, improve explanation for HA

* Update edit_config_param.html

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Create demo folder at startup (if not present)

* Update defines.h (#1726)

* improve explanations,added example (#1729)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Add demo mode (#1720)

* move main part to cam file

* added demo mode

* .

* add a define to configure the logfile handling (#1709)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Move Logfile Switch to define.h

* Update Reboot Algo

* Update server_ota.cpp

* Avoid loading of status infos twice (#1711)

* Force a reboot even reboot task cannot be created due to lack of heap (#1713)

* Deinit all components before reboot

* Update

* Update

* Force reboot when reboot task cannot be created

* Improve log message when web UI is incomplete (#1716)

* improve warning if version.txt is missing

* typo

* show round duration in log

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* .

* .

* .

* creade demo dir

* fix static IP in UP, improve explanation for HA (#1719)

* fix static IP in UP, improve explanation for HA

* Update edit_config_param.html

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Create demo folder at startup (if not present)

* move demo files

* Update defines.h (#1726)

* updated description

* moved to expert section

* fixed broken enabled state

Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
Co-authored-by: Slider0007 <115730895+Slider0007@users.noreply.github.com>

* Fix regression of reboot handler / reboot waiting script (#1725)

* Reboot after OTA: Avoid exeception

* Overview - optimize reload behaviour after reboot

* Update

* Update

* Moved softAP to the very first checks

* Update SoftAP

* Update build.yaml (#1737)

* Update build.yaml

* Update build.yaml

* #1649 unnecessary np check (#1736)

* consolidate test-ip definition, added missing Access-Control-Allow-Origin,

* Revert "consolidate test-ip definition, added missing Access-Control-Allow-Origin,"

This reverts commit 56cfeb732e.

* consolidate test-ip definition, added missing Access-Control-Allow-Origin (#1741)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Replace alert boxes with overlay info boxes  (#1742)

* consolidate test-ip definition, added missing Access-Control-Allow-Origin

* replace alert boxes with overlay info boxes

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* compiler optimization (#1749)

compiler optimization for tflite-micro-esp-examples

* Modify stack sizes + max open files (SD) , add REST handler for heap/(stack) infos (#1751)

* Modify stack sizes+max open files,add rest handler

* Update

* Optimized CImageBasis

* Update feature.yaml

* cache static files (#1755)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Implemented Reboot for "firmware.bin" as well

* new OTA page with progressbar (#1756)

* new OTA page with progress bar

* improve error message on missing demo files

* .

* Implemented Reboot for "firmware.bin" as well

* Update feature.yaml

* cache static files (#1755)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* .

* .

* added filename validation

* .

* .

* .

* move

* added missing dash to regex

* restrict file type

* .

* .

* .

* .

* cleanup no longer needed mode

* only start restart counter if restart is required

Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>

* Rolling-bot: Only show jomjol repo rollings (#1783)

* Update platfromio.ini

* Add option to disable brownout detector (#1784)

* Update defines.h

* Update main.cpp

* Improve file server (#1785)

* .

* .

* .

* .

* .

* .

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Ignore cache on GIT hash change (new commit or release) (#1787)

* Add hash to all html, css, and js URLs

* Update build.yaml

* Update build.yaml

* .

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* fix overview.html

* GPIO handler: Deinit before delete (#1795)

* Rest handler: Use none chunked transfer (#1797)

* Resthandler info,sysinfo,starttime: no chunk trans

* flowstart,statusflow,cputemp,rssi,uptime,prevalue

* Renamed error messages

* STBI_ONLY_JPEG (#1789)

* Add error handling for memory intensive tasks (#1798)

* tflite model loading: error handling

* FlowAlignment: error handling

* CImageBasis+GetJPGStream : error handling

* Update graph.html (#1802)

* Delete demo-images directory

Data is now provided in the documentation

* REST handler sysinfo + MQTT topic: Free heap memory not reporting (#1815)

* REST handler sysinfo: Fix reporting of free memory

* MQTT topic freemem: Fix reporting of free memory

* Refactor getEspHeapInfo routine (#1816)

* Refactor getEspHeapInfo

* ClassLogfile: Remove redundandent one

* DataGraph: datafiles sorted -> newest on top (#1817)

* plaformio [env:esp32cam-dev] : Add task analysis & test for 8m spiram  real support (#1818)

add support of   TASK_ANALYSIS_ON 
test full support of 8mb spiram board  (https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/himem.html)

* Improve html roi disablement (#1825)

* Improve ROI-Problem

* Update

* Update common.js

* Update links

* Store preprocessed image with ROI to RAM (#1809)

* tflite model loading: error handling

* FlowAlignment: error handling

* CImageBasis+GetJPGStream : error handling

* store preprocessed ALG_ROI.jpg to memory

* Update

* Create clean-branch-cache-after-pull-request-got-closed.yml

* Clean sdkconfig (not default) (#1828)

* Delete sdkconfig - Kopie.defaults

* Delete sdkconfig.esp32cam-testing

* Delete sdkconfig - Kopie.esp32cam

* Update platformio.ini

* Delete clean-branch-cache-after-pull-request-got-closed.yml

* Update README.md

* Esp32 sys info (#1829)

* Add files via upload

* Update defines.h

* Update main.cpp

* git ignore + sdkconfig.esp32cam-dev (#1830)

* update build actions/cache@v3.2.3 (#1831)

* actions/cache@v3.2.3

* Create clear _all_cache.yml

* fix typo naming workflow clear_cache.yml

* Update tflite

* Initial Implementation (#1834)

* Fix pointer call in ClassControllCamera.cpp:310 (#1833)

ClassControllCamera.cpp:310:67: error: request for member 'rgb_image' in '_zwImage', which is of pointer type 'CImageBasis*'
ClassControllCamera.cpp:310:117: error: request for member 'width' in '_zwImage', which is of pointer type 'CImageBasis*'
ClassControllCamera.cpp:310:157: error: request for member 'height' in '_zwImage', which is of pointer type 'CImageBasis*'

* Initial Implementation (#1835)

* improve caching (#1836)

* improve caching

See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache

* Update build.yaml

* Update build.yaml

* Update build.yaml

* Update README.md

* Update build.yaml

* Update build.yaml

* Update README.md

* Update build.yaml

* Update label-commenter-config.yml

* Fix uninitialized filename (#1838)

* fix the uninitialized filename. It only got used for the logging in case the file exists but failed to get loaded (eg. /sdcard/log/data/data_2023-01-14.csv)

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Show ways to get notified about new releases

* update wiki references

* enhance development environment (#1841)

* add sdkconfig.defaults per environment 

https://github.com/platformio/platform-espressif32/issues/638

* add env to platformio

* add sdkconfig.<pioenv>.defaults

* Update platformio.ini

* Update .gitignore

* Delete sdkconfig.esp32cam-cpu-freq-240.defaults

* Delete sdkconfig.esp32cam-dev-himem.defaults

* Delete sdkconfig.esp32cam-dev.defaults

* Delete sdkconfig.esp32cam-no-softap.defaults

* Add files via upload

* Update sdkconfig.esp32cam-cpu-freq-240.defaults

* Update platformio.ini

* Update platformio.ini

* Update CMakeLists.txt

* Update sdkconfig.esp32cam-dev.defaults

* Update platformio.ini

* add HIMEM debugging tools (check free size, and memory test) (#1852)

* Update defines.h

* Update esp_sys.h

* Update esp_sys.cpp

* Add files via upload

* Update perfmon.c

* Update main.cpp

* Update main.cpp

* Delete himem_memory_check.c

* Add files via upload

* Update defines.h

* Update himem_memory_check.cpp

* Update main.cpp

* Update himem_memory_check.cpp

* Update himem_memory_check.h

* Update main.cpp

* fix define

* Avoid multiple Access-Control-Allow-Origin * (#1859)

* Avoid multiple Access-Control-Allow-Origin *

* Adapt loglevel to debug

* Update build.yaml

* Improve data logging on errors (#1839)

* use error level for log if "Rate to High" or "Negative Rate"

* remove redundant data logging

* .

* .

* update time also in case of an error

* move calculation of difference to the top as discussed in PR 1839

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Heap tracing (#1861)

* Update sdkconfig.esp32cam-dev-task-analysis.defaults

* Update defines.h

* Update platformio.ini

* Update main.cpp

* Update defines.h

* Update ClassFlowCNNGeneral.cpp

* Update platformio.ini

* disable HIMEM (external > 4mb ram) not used (#1864)

#force disable HIMEM as not used in default config, can be enabled with [env:esp32cam-dev-himem]
#free 256kb of internal memory :
#I (2112) esp_himem: Initialized. Using last 8 32KB address blocks for bank switching on 4352 KB of physical memory.
CONFIG_SPIRAM_BANKSWITCH_ENABLE=n
#CONFIG_SPIRAM_BANKSWITCH_RESERVE is not set

* Update ota_page.html (#1866)

Fixed the firework to match the actual button text.
Fixed other random typos.

* add AlignmentAlgo=off option (#1867)

* Replace outdated wiki links, wording (#1871)

* Revert "add AlignmentAlgo=off option (#1867)" (#1876)

This reverts commit 3de4cc7c56.

* fixed typo (#1881)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Show WIFI signal text labels / Log RSSI value to logfile (#1877)

* Overview: WIFI RSSI strength text labels

* Log RSSI value (debug level)

* Typo

* Update config.ini (#1880)

* Update Changelog.md for  release (#1892)

Co-authored-by: github-actions <github-actions@github.com>

* Update Changelog.md

* Remove newline in version (#1891)

* remove newline in version

* .

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Show alternative images for states "Initialization" and "Take Image" (#1858)

* Show image for flow not started + take image

* Update

* Adding new images

* .

* Avoid multiple Access-Control-Allow-Origin * (#1859)

* Avoid multiple Access-Control-Allow-Origin *

* Adapt loglevel to debug

* Update build.yaml

* .

* New state "initialization (delayed)", renaming

* Overview: Renamed "Status" + switched position

* Improve data logging on errors (#1839)

* use error level for log if "Rate to High" or "Negative Rate"

* remove redundant data logging

* .

* .

* update time also in case of an error

* move calculation of difference to the top as discussed in PR 1839

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Heap tracing (#1861)

* Update sdkconfig.esp32cam-dev-task-analysis.defaults

* Update defines.h

* Update platformio.ini

* Update main.cpp

* Update defines.h

* Update ClassFlowCNNGeneral.cpp

* Update platformio.ini

* disable HIMEM (external > 4mb ram) not used (#1864)

#force disable HIMEM as not used in default config, can be enabled with [env:esp32cam-dev-himem]
#free 256kb of internal memory :
#I (2112) esp_himem: Initialized. Using last 8 32KB address blocks for bank switching on 4352 KB of physical memory.
CONFIG_SPIRAM_BANKSWITCH_ENABLE=n
#CONFIG_SPIRAM_BANKSWITCH_RESERVE is not set

* Update ota_page.html (#1866)

Fixed the firework to match the actual button text.
Fixed other random typos.

* add AlignmentAlgo=off option (#1867)

* Replace outdated wiki links, wording (#1871)

* Revert "add AlignmentAlgo=off option (#1867)" (#1876)

This reverts commit 3de4cc7c56.

* fixed typo (#1881)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Show WIFI signal text labels / Log RSSI value to logfile (#1877)

* Overview: WIFI RSSI strength text labels

* Log RSSI value (debug level)

* Typo

* Update config.ini (#1880)

* Update Changelog.md for  release (#1892)

Co-authored-by: github-actions <github-actions@github.com>

* Update Changelog.md

* Remove newline in version (#1891)

* remove newline in version

* .

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: CaCO3 <caco3@ruinelli.ch>
Co-authored-by: Nicolas Liaudat <nliaudat@users.noreply.github.com>
Co-authored-by: AngryApostrophe <89547888+AngryApostrophe@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>

* restructure manual setup zip (#1897)

* Update build.yaml

* Update build.yaml

* Update build.yaml

* fix typos and wording on config page (#1898)

* Update label-commenter-config.yml

* Update label-commenter-config.yml

* remove external Web UI dependencies (#1896)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Remove excessive whitespaces and newlines in json (#1904)

* .

* .

* .

* .

* .

* remove newlines in json as it is not needed

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* REST handler CPU temp / RSSI: Remove units (#1908)

* REST CPU temp: escape special character

* REST CPUTemp+RSSI: remove units, output as int

* REST handler sysinfo: CPU tempature as integer

* Update Changelog.md (#1893)

* Update Changelog.md

* Update Changelog.md

* Update Changelog.md

* Update Changelog.md

* Update Index & Index.html

* Move Update description to online docu

* Update index.html

* Update Changelog.md

* Update Changelog.md

---------

Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>

* Update Changelog.md

---------

Co-authored-by: parhedberg <par.hedberg@gmail.com>
Co-authored-by: Pär Hedberg <par.hedberg@nordicmedtest.se>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: Frank Haverland <fspapaping@googlemail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ralf Rachinger <git@ralfrachinger.de>
Co-authored-by: Nicolas Liaudat <nliaudat@users.noreply.github.com>
Co-authored-by: Slider0007 <115730895+Slider0007@users.noreply.github.com>
Co-authored-by: smartboart <38385805+smartboart@users.noreply.github.com>
Co-authored-by: AngryApostrophe <89547888+AngryApostrophe@users.noreply.github.com>
Co-authored-by: Dave <43378003+dkneisz@users.noreply.github.com>
This commit is contained in:
CaCO3
2023-01-27 21:25:58 +01:00
committed by GitHub
parent 0e2ab869cb
commit 245302c6ca
169 changed files with 7615 additions and 3750 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Backup/Restore Configuration</title>
<meta charset="utf-8">
@@ -32,38 +32,31 @@ input[type=number] {
<h2>Backup Configuration</h2>
<p>With the following action the <a href="/fileserver/config/" target="_self">config</a> folder on the SD-card gets zipped and provided as a download.</p>
<table border="0">
</tr>
<td>
<button class="button" id="doBackup" type="button" onclick="doBackup()">Create Config backup</button>
</td>
<td>
<p id=progress></p>
</td>
</tr>
</table>
<button class="button" id="startBackup" type="button" onclick="startBackup()">Create Config backup</button>
<p id=progress></p>
<hr>
<h2>Restore Configuration</h2>
<p>Use the <a href="/fileserver/config/" target="_self">File Server</a> to upload individual files.</p>
</body>
<script src="jszip.min.js"></script>
<script src="FileSaver.min.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="jszip.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="FileSaver.min.js?v=$COMMIT_HASH"></script>
<script>
function doBackup() {
document.getElementById("progress").innerHTML = "Creating backup...";
function startBackup() {
document.getElementById("progress").innerHTML = "Creating backup...<br>\n";
// Get hostname
try {
var xhttp = new XMLHttpRequest();
xhttp.open("GET", "/info?type=Hostname", false);
xhttp.open("GET", getDomainname() + "/info?type=Hostname", false);
xhttp.send();
hostname = xhttp.responseText;
}
catch(err) {
alert("Failed to fetch hostname: " + err.message);
setStatus("<span style=\"color: red\">Failed to fetch hostname: " + err.message + "!</span>");
return;
}
@@ -74,15 +67,16 @@ function doBackup() {
console.log(zipFilename);
// Get files list
setStatus("Fetching File List...");
try {
var xhttp = new XMLHttpRequest();
xhttp.open("GET", "/fileserver/config/", false);
xhttp.open("GET", getDomainname() + "/fileserver/config/", false);
xhttp.send();
var parser = new DOMParser();
var content = parser.parseFromString(xhttp.responseText, 'text/html'); }
catch(err) {
alert("Failed to fetch files list: " + err.message);
setStatus("Failed to fetch files list: " + err.message);
return;
}
@@ -92,49 +86,118 @@ function doBackup() {
for (a of list) {
url = a.getAttribute("href");
urls.push(url);
urls.push(getDomainname() + url);
}
// Pack as zip and download
try {
saveZip(zipFilename, urls);
backup(urls, zipFilename);
}
catch(err) {
alert("Failed to zip files: " + err.message);
setStatus("<span style=\"color: red\">Failed to zip files: " + err.message + "!</span>");
return;
}
}
const saveZip = (filename, urls) => {
if(!urls) return;
function fetchFiles(urls, filesData, index, retry, zipFilename) {
url = urls[index];
const zip = new JSZip();
const folder = zip.folder("");
var i = 0;
urls.forEach((url) => {
const blobPromise = fetch(url).then((r) => {
if (r.status === 200) return r.blob();
return Promise.reject(new Error(r.statusText));
});
const name = url.substring(url.lastIndexOf("/") + 1);
folder.file(name, blobPromise);
// console.log(url + " started (" + index + "/" + urls.length + ")");
if (retry == 0) {
setStatus("&nbsp;- " + getFilenameFromUrl(urls[index]) + " (" + index + "/" + urls.length + ")...");
}
else {
setStatus("<span style=\"color: gray\">&nbsp;&nbsp;&nbsp;Retrying (" + retry + ")...</span>");
}
const xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = "blob";
if (retry == 0) { // Short timeout on first retry
xhr.timeout = 2000; // time in milliseconds
}
else if (retry == 1) { // longer timeout
xhr.timeout = 5000; // time in milliseconds
}
else { // very long timeout
xhr.timeout = 20000; // time in milliseconds
}
xhr.onload = () => { // Request finished
//console.log(url + " done");
filesData[index] = xhr.response;
if (index == urls.length - 1) {
setStatus("Fetched all files");
generateZipFile(urls, filesData, zipFilename);
return;
}
else { // Next file
fetchFiles(urls, filesData, index+1, 0, zipFilename);
}
};
xhr.ontimeout = (e) => { // XMLHttpRequest timed out
console.log("Timeout on fetching " + url + "!");
if (retry > 5) {
setStatus("<span style=\"color: red\">Backup failed, please restart the device and try again!</span>");
}
else {
fetchFiles(urls, filesData, index, retry+1, zipFilename);
}
};
xhr.send(null);
}
function generateZipFile(urls, filesData, zipFilename) {
setStatus("Creating Zip File...");
var zip = new JSZip();
for (var i = 0; i < urls.length; i++) {
zip.file(getFilenameFromUrl(urls[i]), filesData[i]);
}
zip.generateAsync({type:"blob"})
.then(function(content) {
saveAs(content, zipFilename);
});
zip.generateAsync({ type: "blob" },
function updateCallback(metadata) {
var msg = "Progress: " + metadata.percent.toFixed(0) + "%";
if(metadata.currentFile) {
msg += ", " + metadata.currentFile;
}
setStatus("Backup completed");
}
console.log(msg);
document.getElementById("progress").innerHTML = msg;
}
).then((blob) => saveAs(blob, filename));
const backup = (urls, zipFilename) => {
if(!urls) return;
/* Testing */
/*len = urls.length;
for (i = 0; i < len - 3; i++) {
urls.pop();
}*/
console.log(urls);
urlIndex = 0;
setStatus("Fetching files...");
fetchFiles(urls, [], 0, 0, zipFilename);
};
function setStatus(status) {
console.log(status);
document.getElementById("progress").innerHTML += status + "<br>\n";
}
function getFilenameFromUrl(url) {
return filename = url.substring(url.lastIndexOf('/')+1);
}
</script>
</html>

BIN
sd-card/html/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

@@ -1,8 +1,52 @@
var basepath = "http://192.168.178.22";
/* The UI can also be run locally, but you have to set the IP of your devide accordingly.
* And you also might have to disable CORS in your webbrowser! */
var domainname_for_testing = "192.168.178.44";
function gethost_Version(){
return "1.0.0 - 20200910";
}
/* Returns the domainname with prepended protocol.
Eg. http://watermeter.fritz.box or http://192.168.1.5 */
function getDomainname(){
var host = window.location.hostname;
if (((host == "127.0.0.1") || (host == "localhost") || (host == ""))
// && ((window.location.port == "80") || (window.location.port == ""))
)
{
console.log("Using pre-defined domainname for testing: " + domainname_for_testing);
domainname = "http://" + domainname_for_testing
}
else
{
domainname = window.location.protocol + "//" + host;
if (window.location.port != "") {
domainname = domainname + ":" + window.location.port;
}
}
return domainname;
}
function UpdatePage(_dosession = true){
var zw = location.href;
zw = zw.substr(0, zw.indexOf("?"));
if (_dosession) {
window.location = zw + '?session=' + Math.floor((Math.random() * 1000000) + 1);
}
else {
window.location = zw;
}
}
function LoadHostname() {
_basepath = getbasepath();
_domainname = getDomainname();
var xhttp = new XMLHttpRequest();
@@ -19,7 +63,7 @@ function LoadHostname() {
// var xhttp = new XMLHttpRequest();
try {
url = _basepath + '/info?type=Hostname';
url = _domainname + '/info?type=Hostname';
xhttp.open("GET", url, true);
xhttp.send();
@@ -35,7 +79,7 @@ var fwVersion = "";
var webUiVersion = "";
function LoadFwVersion() {
_basepath = getbasepath();
_domainname = getDomainname();
var xhttp = new XMLHttpRequest();
xhttp.addEventListener('load', function(event) {
@@ -52,7 +96,7 @@ function LoadFwVersion() {
});
try {
url = _basepath + '/info?type=FirmwareVersion';
url = _domainname + '/info?type=FirmwareVersion';
xhttp.open("GET", url, true);
xhttp.send();
}
@@ -62,7 +106,7 @@ function LoadFwVersion() {
}
function LoadWebUiVersion() {
_basepath = getbasepath();
_domainname = getDomainname();
var xhttp = new XMLHttpRequest();
xhttp.addEventListener('load', function(event) {
@@ -78,7 +122,8 @@ function LoadWebUiVersion() {
});
try {
url = _basepath + '/info?type=HTMLVersion';
url = _domainname + '/info?type=HTMLVersion';
console.log("url");
xhttp.open("GET", url, true);
xhttp.send();
}
@@ -100,6 +145,8 @@ function compareVersions() {
console.log("FW Hash: " + fWGitHash + ", Web UI Hash: " + webUiHash);
if (fWGitHash != webUiHash) {
alert("The Version of the Web Interface (" + webUiHash + ") does not match the Firmware Version (" + fWGitHash + ")! It is suggested to keep them on the same version!");
firework.launch("The Version of the Web Interface (" + webUiHash +
") does not match the Firmware Version (" +
fWGitHash + ")! It is suggested to keep them on the same version!", 'warning', 30000);
}
}

View File

@@ -30,21 +30,22 @@
font-size: small;
}
</style>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
</head>
<body>
<div class="box">
<div class="row header">
<button onClick="reload();">Reload</button>
<button onClick="window.open('datafileact');">Show full data</button>
<button onClick="window.location.href = 'fileserver/log/data/'">Show older data files</button>
<a href="graph.html" target="_self">Show graph</a>
<button onClick="window.open(getDomainname() + '/datafileact');">Show full data</button>
<button onClick="window.location.href = getDomainname() + '/fileserver/log/data/'">Show older data files</button>
<button onClick="window.location.href = 'graph.html?v=$COMMIT_HASH'">Show graph</button>
</div>
<div class="row content" id="data"><br><br><br><b>Loading Data file, please wait...</b></div>
<div class="row footer">
<button onClick="reload();">Reload</button>
<button onClick="window.open('datafileact');">Show full data</button>
<button onClick="window.location.href = 'fileserver/log/data/'">Show older data files</button>
<a href="graph.html" target="_self">Show graph</a>
<button onClick="window.open(getDomainname() + '/datafileact');">Show full data</button>
<button onClick="window.location.href = getDomainname() + '/fileserver/log/data/'">Show older data files</button>
<button onClick="window.location.href = 'graph.html?v=$COMMIT_HASH'">Show graph</button>
</div>
</div>
</body>
@@ -53,7 +54,7 @@
function reload() {
document.getElementById('data').innerHTML += "<br><b>Reloading...<b><br><br>";
window.scrollBy(0,document.body.scrollHeight);
funcRequest('data');
funcRequest(getDomainname() + '/data');
}
async function funcRequest(url){
@@ -76,7 +77,7 @@
});
}
funcRequest('data');
funcRequest(getDomainname() + '/data');
</script>
</html>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Make Alignment</title>
<meta charset="utf-8"/>
@@ -41,7 +41,9 @@ select {
font-size: 16px;
}
</style>
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
</head>
<body style="font-family: arial; padding: 0px 10px;">
@@ -93,9 +95,9 @@ select {
</tr>
</table>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfigcommon.js"></script>
<script type="text/javascript" src="./readconfigparam.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
<script language="JavaScript">
var canvas = document.getElementById('canvas'),
@@ -107,13 +109,12 @@ select {
refInfo,
enhanceCon = false,
param;
basepath = "http://192.168.178.26";
basepath = "",
domainname = getDomainname();
param;
function doReboot() {
if (confirm("Are you sure you want to reboot? Did you save the config?")) {
var stringota = "/reboot";
var stringota = getDomainname() + "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
@@ -128,9 +129,9 @@ function ChangeSelection(){
function SaveToConfig(){
WriteConfigININew();
UpdateConfigReference(basepath)
SaveConfigToServer(basepath);
alert("Config.ini is updated!");
UpdateConfigReference(domainname)
SaveConfigToServer(domainname);
firework.launch('Configuration got updated. Please reboot to activate changes!', 'success', 5000);
}
function EnhanceContrast(){
@@ -141,7 +142,7 @@ function EnhanceContrast(){
refInfo[aktindex]["dy"] = document.getElementById("refdy").value;
enhanceCon = true;
MakeContrastImageZW(refInfo[aktindex], enhanceCon, basepath);
MakeContrastImageZW(refInfo[aktindex], enhanceCon, domainname);
UpdateReference();
}
@@ -158,11 +159,11 @@ function UpdateReference(){
_filenameurl = refInfo[aktindex]["name"].replace("/config/", "/img_tmp/");
var url = basepath + "/fileserver" + _filenameurl + "?" + Date.now();
var url = domainname + "/fileserver" + _filenameurl + "?" + Date.now();
document.getElementById("img_ref").src = url;
_filenameurl = _filenameurl.replace(".jpg", "_org.jpg");
var url = basepath + "/fileserver" + _filenameurl + "?" + Date.now();
var url = domainname + "/fileserver" + _filenameurl + "?" + Date.now();
document.getElementById("img_ref_org").src = url;
document.getElementById("name").value = refInfo[aktindex]["name"];
@@ -214,17 +215,17 @@ function dataURLtoBlob(dataurl) {
function init() {
basepath = getbasepath();
loadConfig(basepath);
domainname = getDomainname();
loadConfig(domainname);
ParseConfig();
param = getConfigParameters();
canvas.addEventListener('mousedown', mouseDown, false);
canvas.addEventListener('mouseup', mouseUp, false);
canvas.addEventListener('mousemove', mouseMove, false);
loadCanvas(basepath + "/fileserver/config/reference.jpg");
loadCanvas(domainname + "/fileserver/config/reference.jpg");
CopyReferenceToImgTmp(basepath);
CopyReferenceToImgTmp(domainname);
refInfo = GetReferencesInfo();
UpdateReference();
@@ -247,7 +248,7 @@ function dataURLtoBlob(dataurl) {
refInfo[aktindex]["y"] = document.getElementById("refy").value;
refInfo[aktindex]["dx"] = document.getElementById("refdx").value;
refInfo[aktindex]["dy"] = document.getElementById("refdy").value;
MakeRefZW(refInfo[aktindex], basepath);
MakeRefZW(refInfo[aktindex], domainname);
UpdateReference();
document.getElementById("enhancecontrast").disabled = false;
}

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<meta charset="utf-8"/>
<title>Make Analog Alignment</title>
@@ -60,7 +60,9 @@ th, td {
opacity: 0.4;
}
</style>
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
</head>
<body style="font-family: arial; padding: 0px 10px;">
@@ -140,9 +142,9 @@ th, td {
</table>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfigcommon.js"></script>
<script type="text/javascript" src="./readconfigparam.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
<script language="JavaScript">
var canvas = document.getElementById('canvas'),
@@ -152,14 +154,17 @@ th, td {
drag = false,
aktindex = 0,
ROIInfo,
cofcat,
param,
enhanceCon = false;
lockAR = true;
lockSizes = true;
basepath = "http://192.168.178.26";
domainname = getDomainname();
function doReboot() {
if (confirm("Are you sure you want to reboot? Did you save the config?")) {
var stringota = "/reboot";
var stringota = getDomainname() + "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
@@ -183,6 +188,10 @@ function EnDisableAnalog() {
}
sah1(document.getElementById("div1"), !isEnabled);
cofcat["Analog"]["enabled"] = isEnabled;
if (isEnabled)
{
UpdateROIs();
@@ -227,7 +236,7 @@ function newROI(){
erg = CreateROI(_number, "analog", sel.selectedIndex, _roinew, 1, 1, 30, 30, false);
if (erg != "")
alert(erg);
firework.launch(erg, 'danger', 30000);
else
UpdateROIs(_roinew);
}
@@ -277,11 +286,11 @@ function ChangeSelection(){
}
function SaveToConfig(){
_zwcat = getConfigCategory();
_zwcat["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
// _zwcat = getConfigCategory();
cofcat["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
WriteConfigININew();
SaveConfigToServer(basepath);
alert("Config.ini is updated!");
SaveConfigToServer(domainname);
firework.launch('Configuration got updated. Please reboot to activate changes!', 'success', 5000);
}
@@ -291,18 +300,18 @@ function UpdateROIs(_sel){
var _number = sel.options[sel.selectedIndex].text;
ROIInfo = getROIInfo("analog", _number);
_catzw = getConfigCategory();
// _catzw = getConfigCategory();
if (_catzw["Analog"]["enabled"] == false)
if (cofcat["Analog"]["enabled"] == false)
{
document.getElementById("Category_Analog_enabled").checked = false;
EnDisableDigits();
alert("Analog ROIs are disabled - please enable (Check box top left).\n");
EnDisableAnalog();
firework.launch('Analog ROIs are disabled - please enable first (Check box top left)', 'warning', 10000);
return;
}
if (ROIInfo.length == 0){
alert("There are no ROIs defined.\nPlease first create a new ROI (\"New ROIs ...\").\n");
firework.launch('There are no ROIs defined. Please first create a new ROI ("New ROIs ...")', 'danger', 10000);
document.getElementById("newROI").disabled = false;
document.getElementById("deleteROI").disabled = true;
document.getElementById("index").disabled = true;
@@ -398,14 +407,15 @@ function UpdateROIs(_sel){
function init() {
basepath = getbasepath();
domainname = getDomainname();
canvas.addEventListener('mousedown', mouseDown, false);
canvas.addEventListener('mouseup', mouseUp, false);
canvas.addEventListener('mousemove', mouseMove, false);
loadCanvas(basepath + "/fileserver/config/reference.jpg");
loadConfig(basepath);
loadCanvas(domainname + "/fileserver/config/reference.jpg");
loadConfig(domainname);
ParseConfig();
param = getConfigParameters();
cofcat = getConfigCategory();
UpdateNUMBERS();
drawImage();
draw();
@@ -454,7 +464,7 @@ function renameNumber(){
erg = RenameNUMBER(_delte, _numbernew);
if (erg != "")
alert(erg);
firework.launch(erg, 'danger', 30000);
else
UpdateNUMBERS(_numbernew);
}
@@ -464,7 +474,7 @@ function newNumber(){
erg = CreateNUMBER(_numbernew);
if (erg != "")
alert(erg);
firework.launch(erg, 'danger', 30000);
else
UpdateNUMBERS(_numbernew);
}
@@ -476,7 +486,7 @@ function removeNumber(){
var _delte= sel.options[sel.selectedIndex].text;
erg = DeleteNUMBER(_delte);
if (erg != "")
alert(erg);
firework.launch(erg, 'danger', 30000);
UpdateNUMBERS();
}
}
@@ -683,7 +693,7 @@ function drawTextBG(context, txt, x, y, padding) {
erg = RenameROI(_number, "analog", _roialt, _roinew);
if (erg != "")
alert(erg);
firework.launch(erg, 'danger', 30000);
else
UpdateROIs(_roinew);
}

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<meta charset="utf-8"/>
<title>Check</title>
@@ -50,22 +50,22 @@ p {font-size: 1em;}
</tr>
</table>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfig.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfig.js?v=$COMMIT_HASH"></script>
<script type="text/javascript">
var basepath = "http://192.168.178.26";
var domainname = getDomainname();
function doAnalog(){
var xhttp = new XMLHttpRequest();
url = basepath + "/editflow?task=test_analog";
if (basepath.length > 0){
url = url + "&host=" + basepath;
url = domainname + "/editflow?task=test_analog";
if (domainname.length > 0){
url = url + "&host=" + domainname;
}
xhttp.open("GET", url, false);
xhttp.send();
var html = xhttp.responseText;
html = html.replace("src=\"/", "src=\"" + basepath + "/");
html = html.replace("src=\"/", "src=\"" + domainname + "/");
document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
}
@@ -73,14 +73,14 @@ p {font-size: 1em;}
function doDigits(){
var xhttp = new XMLHttpRequest();
url = basepath + "/editflow?task=test_digits";
if (basepath.length > 0){
url = url + "&host=" + basepath;
url = domainname + "/editflow?task=test_digits";
if (domainname.length > 0){
url = url + "&host=" + domainname;
}
xhttp.open("GET", url, false);
xhttp.send();
var html = xhttp.responseText;
html = html.replace("src=\"/", "src=\"" + basepath + "/");
html = html.replace("src=\"/", "src=\"" + domainname + "/");
document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
}
@@ -88,14 +88,14 @@ p {font-size: 1em;}
function doAlign(){
var xhttp = new XMLHttpRequest();
url = basepath + "/editflow?task=test_align";
if (basepath.length > 0){
url = url + "&host=" + basepath;
url = domainname + "/editflow?task=test_align";
if (domainname.length > 0){
url = url + "&host=" + domainname;
}
xhttp.open("GET", url, false);
xhttp.send();
var html = xhttp.responseText;
html = html.replace("src=\"/", "src=\"" + basepath + "/");
html = html.replace("src=\"/", "src=\"" + domainname + "/");
document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
@@ -107,9 +107,9 @@ p {font-size: 1em;}
function doTake(){
var xhttp = new XMLHttpRequest();
url = basepath + "/editflow?task=test_take";
if (basepath.length > 0){
url = url + "&host=" + basepath;
url = domainname + "/editflow?task=test_take";
if (domainname.length > 0){
url = url + "&host=" + domainname;
}
xhttp.open("GET", url, false);
xhttp.send();
@@ -122,7 +122,7 @@ p {font-size: 1em;}
}
function Init(){
basepath = getbasepath();
domainname = getDomainname();
document.getElementById("align").disabled = true;
document.getElementById("digits").disabled = true;
document.getElementById("analog").disabled = true;

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Edit Config</title>
<meta charset="utf-8">
@@ -21,7 +21,9 @@ textarea {
font-size: 14px;
}
</style>
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
</head>
<body style="font-family: arial; padding: 0px 10px;">
@@ -41,27 +43,27 @@ textarea {
</tr>
</table>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfigcommon.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript">
var canvas = document.getElementById('canvas'),
basepath = "http://192.168.178.26";
domainname = getDomainname();
function LoadConfigNeu() {
basepath = getbasepath();
loadConfig(basepath);
domainname = getDomainname();
loadConfig(domainname);
document.getElementById("inputTextToSave").value = getConfig();
}
function saveTextAsFile()
{
if (confirm("Are you sure you want to update \"config.ini\"?")) {
FileDeleteOnServer("/config/config.ini", basepath);
FileDeleteOnServer("/config/config.ini", domainname);
var textToSave = document.getElementById("inputTextToSave").value;
FileSendContent(textToSave, "/config/config.ini", basepath);
alert("Config.ini is updated!")
FileSendContent(textToSave, "/config/config.ini", domainname);
firework.launch('Configuration got updated. Please reboot to activate changes!', 'success', 5000);
}
}

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Edit Config</title>
<meta charset="utf-8">
@@ -72,7 +72,9 @@ textarea {
}
</style>
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
</head>
<body style="font-family: arial; padding: 0px 10px;">
@@ -121,6 +123,23 @@ textarea {
<td class="description">
Time to keep the raw image (in days, resp. "0" = forever)
</td>
</tr>
<tr class="expert" id="ex1">
<td class="indent1">
<input type="checkbox" id="MakeImage_Demo_enabled" value="1" onclick = 'InvertEnableItem("MakeImage", "Demo")' unchecked >
<label for=MakeImage_Demo_enabled><class id="MakeImage_Demo_text" style="color:black;">Demo Mode</class></label>
</td>
<td>
<select id="MakeImage_Demo_value1">
<option value="true">true</option>
<option value="false" selected>false</option>
</select>
</td>
<td style="font-size: 80%;">
Enable to use demo images instead of the real camera images.<br>
Make sure to have a demo folder on your SD-Card!
Check the <a href="https://jomjol.github.io/AI-on-the-edge-device-docs/Demo-Mode" target="_blank">documentation</a> for details.
</td>
</tr>
<tr class="expert" id="ex1">
@@ -131,7 +150,7 @@ textarea {
<input type="number" id="MakeImage_WaitBeforeTakingPicture_value1" size="13" min="0" step="any">
</td>
<td class="description">
Wait time between illumination switch on and take the picture (in seconds)
Wait time between switching illumination on and taking the picture (in seconds)
</td>
</tr>
<tr class="expert" id="ex2">
@@ -157,7 +176,7 @@ textarea {
</select>
</td>
<td class="description">
Picture size camera (default = "VGA")
Size of camera picture (default = "VGA")
</td>
</tr>
@@ -286,7 +305,8 @@ textarea {
</select>
</td>
<td style="font-size: 80%;">
Path to CNN model file for image recognition. Check the <a href="https://github.com/jomjol/AI-on-the-edge-device/wiki/Choosing-the-Model" target="_blank">documentation</a> for details.
Path to CNN model file for image recognition.<br>
Check the <a href="https://jomjol.github.io/AI-on-the-edge-device-docs/Choosing-the-Model" target="_blank">documentation</a> for details.
</td>
</tr>
@@ -342,7 +362,8 @@ textarea {
<select id="Analog_Model_value1">
</select>
</td>
<td style="font-size: 80%;"> Path to CNN model file for image recognition. Check the <a href="https://github.com/jomjol/AI-on-the-edge-device/wiki/Choosing-the-Model" target="_blank">documentation</a> for details.</td>
<td style="font-size: 80%;"> Path to CNN model file for image recognition.<br>
Check the <a href="https://jomjol.github.io/AI-on-the-edge-device-docs/Choosing-the-Model" target="_blank">documentation</a> for details.</td>
</tr>
<tr>
<td class="indent1">
@@ -391,21 +412,6 @@ textarea {
Time (in minutes), how long a previous read value is valid after reboot (default = 720 min)
</td>
</tr>
<tr>
<td class="indent1">
<input type="checkbox" id="PostProcessing_AllowNegativeRates_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "AllowNegativeRates")' unchecked >
<label for=PostProcessing_AllowNegativeRates_enabled><class id="PostProcessing_AllowNegativeRates_text" style="color:black;">AllowNegativeRates</class></label>
</td>
<td>
<select id="PostProcessing_AllowNegativeRates_value1">
<option value="true" selected>true</option>
<option value="false" >false</option>
</select>
</td>
<td style="font-size: 80%;">
Set on "false" to ensure, that only positive changes are accepted (typically for counter)
</td>
</tr>
<tr class="expert" id="ex12">
<td class="indent1">
<input type="checkbox" id="PostProcessing_ErrorMessage_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "ErrorMessage")' unchecked >
@@ -448,6 +454,21 @@ textarea {
</select></b>
</td>
</tr>
<tr>
<td class="indent1">
<input type="checkbox" id="PostProcessing_AllowNegativeRates_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "AllowNegativeRates")' unchecked >
<label for=PostProcessing_AllowNegativeRates_enabled><class id="PostProcessing_AllowNegativeRates_text" style="color:black;">AllowNegativeRates</class></label>
</td>
<td>
<select id="PostProcessing_AllowNegativeRates_value1">
<option value="true" selected>true</option>
<option value="false" >false</option>
</select>
</td>
<td style="font-size: 80%;">
Set to "false" to ensure, that only positive changes are accepted (typically for counter)
</td>
</tr>
<tr>
<td class="indent1">
<input type="checkbox" id="PostProcessing_DecimalShift_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "DecimalShift")' unchecked >
@@ -457,7 +478,8 @@ textarea {
<input type="number" id="PostProcessing_DecimalShift_value1" step="1">
</td>
<td style="font-size: 80%;">
Shift the digit separator within the digital digits (positiv and negativ)
Shift the decimal separator (positiv or negativ).<br>
Eg. to move from 'm&sup3;' to 'l' (Multiply by 1000), you need to set it to +3.
</td>
</tr>
<tr>
@@ -483,7 +505,7 @@ textarea {
<input type="number" id="PostProcessing_MaxRateValue_value1" size="13" min="0" step="any">
</td>
<td style="font-size: 80%;">
Maximum change of a reading - if threated as absolute or relative change see next parameter.
Maximum change of a reading - if treated as absolute or relative change see next parameter.
</td>
</tr>
<tr>
@@ -513,7 +535,7 @@ textarea {
</select>
</td>
<td style="font-size: 80%;">
Enable to use the after point resolution for the last analog counter
Enable to use the decimal place of the last analog counter
</td>
</tr>
@@ -667,7 +689,9 @@ textarea {
</td>
<td style="font-size: 80%;">
Select the meter type so the sensors have the right units in Homeassistant.<br>
Note: For 'Watermeter' you need to have Homeassistant 2022.11 or never!
Note: For 'Watermeter' you need to have Homeassistant 2022.11 or never!<br>
Please also make sure that it matches the dimention of the value provided by the meter! Eg. if your meter provides m3, you need to also set it to m3.
Alternatively you could set 'DecimalShift' to '3' so the value is converted to 'l'!
</td>
</tr>
@@ -1345,7 +1369,8 @@ textarea {
<input type="text" id="System_TimeZone_value1">
</td>
<td class="description">
Time zone in POSIX syntax (Europe/Berlin = "CET-1CEST,M3.5.0,M10.5.0/3" - incl. daylight saving)
Time zone in POSIX syntax (Europe/Berlin = "CET-1CEST,M3.5.0,M10.5.0/3" - incl. daylight saving)<br>
Use this <a href=timezones.html?v=$COMMIT_HASH target=_blank>table</a> to find the settings for your region.
</td>
</tr>
<tr class="expert" id="ex16">
@@ -1357,7 +1382,11 @@ textarea {
<input type="text" id="System_TimeServer_value1">
</td>
<td class="description">
Time server to synchronize system time (default: "pool.ntp.org" - used if nothing is specified)
Time server to synchronize system time. If it is disabled or "undefined", "pool.ntp.org" will be used.<br>
You can also set it to the IP of your router. Many routers like
<a href=https://en.avm.de/service/knowledge-base/dok/FRITZ-Box-7590-AX/336_Configuring-time-synchronization-NTP-for-FRITZ-Box-and-network-devices/
target=_blank>Fritzboxes</a> can act as a local NTP server.<br>
To disable NTP, you need to activate it but set the TimeServer config to be empty. In such case the time always starts at 01.01.1970 after each power cycle!
</td>
</tr>
<tr class="expert" id="System_Hostname">
@@ -1371,6 +1400,18 @@ textarea {
Hostname for server - will be transfered to wlan.ini at next startup)
</td>
</tr>
<tr class="expert" id="System_RSSIThreashold">
<td class="indent1">
<input type="checkbox" id="System_RSSIThreashold_enabled" value="1" onclick = 'InvertEnableItem("System", "RSSIThreashold")' unchecked >
<label for=System_RSSIThreashold_enabled><class id="System_RSSIThreashold_text" style="color:black;">RSSIThreashold</class></label>
</td>
<td>
<input type="number" name="name" id="System_RSSIThreashold_value1" min="-100" max="0" step="1">
<td class="description">
WLAN Mesh Parameter: Threashold for RSSI value to check for start switching access point in a mesh system.
Possible values: -100 to 0, 0 = disabled - Value will be transfered to wlan.ini at next startup)
</td>
</tr>
</table>
@@ -1390,13 +1431,13 @@ textarea {
</div>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfigcommon.js"></script>
<script type="text/javascript" src="./readconfigparam.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
<script type="text/javascript">
var canvas = document.getElementById('canvas'),
basepath = "http://192.168.178.22";
domainname = getDomainname();
param;
category;
NUNBERSAkt = -1;
@@ -1411,9 +1452,9 @@ function LoadConfigNeu() {
}
basepath = getbasepath();
if (!loadConfig(basepath)) {
alert("Config.ini could not be loaded!\nPlease reload the page.");
domainname = getDomainname();
if (!loadConfig(domainname)) {
firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
return;
}
ParseConfig();
@@ -1491,8 +1532,8 @@ function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1)
if (!_isFound)
{
_zw_txt = "In the selected field the value '" + textToFind + "' in the parameter '";
_zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid.\nPLEASE CHECK BEFORE SAVING!";
alert(_zw_txt);
_zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
firework.launch(_zw_txt, 'warning', 10000);
}
}
else if ((element.getAttribute("type") != null) && (element.getAttribute("type").toLowerCase() == "checkbox")) {
@@ -1532,8 +1573,8 @@ function WriteParameter(_param, _category, _cat, _name, _optional, _number = -1)
if (!_isFound)
{
_zw_txt = "In the selected field the value '" + textToFind + "' in the section '";
_zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid.\nPLEASE CHECK BEFORE SAVING!";
alert(_zw_txt);
_zw_txt = _zw_txt + _cat + "' in the field '" + _name + "' is invalid. PLEASE CHECK BEFORE SAVING!";
firework.launch(_zw_txt, 'warning', 10000);
}
}
@@ -1736,6 +1777,7 @@ function UpdateInputIndividual()
ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt)
ReadParameter(param, "PostProcessing", "ExtendedResolution", true, NUNBERSAkt)
ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", true, NUNBERSAkt)
ReadParameter(param, "PostProcessing", "AllowNegativeRates", true, NUNBERSAkt)
}
var sel = document.getElementById("Numbers_value1");
@@ -1746,6 +1788,7 @@ function UpdateInputIndividual()
WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "ExtendedResolution", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true, NUNBERSAkt);
}
function UpdateInput() {
@@ -1758,6 +1801,7 @@ function UpdateInput() {
WriteParameter(param, category, "MakeImage", "LogImageLocation", true);
WriteParameter(param, category, "MakeImage", "LogfileRetentionInDays", true);
WriteParameter(param, category, "MakeImage", "Demo", true);
WriteParameter(param, category, "MakeImage", "WaitBeforeTakingPicture", false);
WriteParameter(param, category, "MakeImage", "ImageQuality", false);
WriteParameter(param, category, "MakeImage", "Brightness", false);
@@ -1780,7 +1824,7 @@ function UpdateInput() {
WriteParameter(param, category, "PostProcessing", "PreValueUse", true);
WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true);
WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true);
// WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", true);
WriteParameter(param, category, "PostProcessing", "ErrorMessage", true);
WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", true);
@@ -1821,6 +1865,7 @@ function UpdateInput() {
WriteParameter(param, category, "System", "TimeZone", true);
WriteParameter(param, category, "System", "Hostname", true);
WriteParameter(param, category, "System", "TimeServer", true);
WriteParameter(param, category, "System", "RSSIThreashold", true);
WriteModelFiles();
}
@@ -1876,7 +1921,8 @@ function ReadParameterAll()
category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked;
ReadParameter(param, "MakeImage", "LogImageLocation", true);
ReadParameter(param, "MakeImage", "LogfileRetentionInDays", true);
ReadParameter(param, "MakeImage", "LogfileRetentionInDays", true);
ReadParameter(param, "MakeImage", "Demo", true);
ReadParameter(param, "MakeImage", "WaitBeforeTakingPicture", false);
ReadParameter(param, "MakeImage", "ImageQuality", false);
ReadParameter(param, "MakeImage", "Brightness", false);
@@ -1901,7 +1947,7 @@ function ReadParameterAll()
ReadParameter(param, "PostProcessing", "PreValueUse", true);
ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true);
ReadParameter(param, "PostProcessing", "AllowNegativeRates", true);
// ReadParameter(param, "PostProcessing", "AllowNegativeRates", true);
ReadParameter(param, "PostProcessing", "ErrorMessage", true);
ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", true);
@@ -1949,6 +1995,7 @@ function ReadParameterAll()
ReadParameter(param, "System", "TimeZone", true);
ReadParameter(param, "System", "Hostname", true);
ReadParameter(param, "System", "TimeServer", true);
ReadParameter(param, "System", "RSSIThreashold", true);
UpdateInputIndividual();
@@ -2016,21 +2063,21 @@ function saveTextAsFile()
{
ReadParameterAll();
if (document.getElementsByClassName("invalid-input").length > 0) {
alert("Settings cannot be saved. Please check your entries.");
firework.launch("Settings cannot be saved. Please check your entries!", 'danger', 30000);
return;
}
if (confirm("Are you sure you want to update \"config.ini\"?")) {
ReadParameterAll();
WriteConfigININew();
SaveConfigToServer(basepath);
alert("Config.ini is updated!")
SaveConfigToServer(domainname);
firework.launch('Configuration got updated. Please reboot to activate changes!', 'success', 5000);
}
}
function doReboot() {
if (confirm("Are you sure you want to reboot the ESP32?")) {
var stringota = "/reboot";
var stringota = getDomainname() + "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
@@ -2040,7 +2087,7 @@ function doReboot() {
function editConfigDirect() {
if (confirm("Did you save your changes?")) {
var stringota = "/edit_config.html";
var stringota = getDomainname() + "/edit_config.html?v=$COMMIT_HASH";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<meta charset="utf-8"/>
<title>Make Digital Alignment</title>
@@ -51,7 +51,9 @@ th, td {
padding: 5px 5px 5px 0px;
}
</style>
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
</head>
<body style="font-family: arial; padding: 0px 10px;">
@@ -131,11 +133,11 @@ th, td {
</tr>
</table>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfigcommon.js"></script>
<script type="text/javascript" src="./readconfigparam.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="./jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script language="JavaScript">
var canvas = document.getElementById('canvas'),
@@ -144,16 +146,18 @@ th, td {
drag = false,
aktindex = 0,
ROIInfo,
cofcat,
param,
enhanceCon = false;
lockAR = true;
lockSizes = true;
lockSpaceEquidistant = true;
space = 3;
basepath = "http://192.168.1.151";
domainname = getDomainname();
function doReboot() {
if (confirm("Are you sure you want to reboot? Did you save the config?")) {
var stringota = "/reboot";
var stringota = getDomainname() + "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
@@ -177,6 +181,9 @@ function EnDisableDigits() {
}
sah1(document.getElementById("div1"), !isEnabled);
cofcat["Digits"]["enabled"] = isEnabled;
if (isEnabled)
{
UpdateROIs();
@@ -228,7 +235,7 @@ function newROI() {
erg = CreateROI(_number, "digit", sel.selectedIndex, _roinew, 1, 1, 30, 51, 0);
if (erg != "")
alert(erg);
firework.launch(erg, 'danger', 30000);
else {
UpdateROIs(_roinew);
// Shift all ROIs on right side to the right
@@ -265,7 +272,7 @@ function changelockSizes(){
lockSizes = document.getElementById("lockSizes").checked;
if (!lockSizes) {
alert("For best results it is (in most cases) advised to keep the y, Δx and Δy identical!");
firework.launch("For best results it is in most cases advised to keep the y, Δx and Δy identical!", 'warning', 10000);
}
}
@@ -280,11 +287,11 @@ function ChangeSelection(){
}
function SaveToConfig(){
_zwcat = getConfigCategory();
_zwcat["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
// _zwcat = getConfigCategory();
cofcat["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked;
WriteConfigININew();
SaveConfigToServer(basepath);
alert("Config.ini is updated!");
SaveConfigToServer(domainname);
firework.launch('Configuration got updated. Please reboot to activate changes!', 'success', 5000);
}
@@ -294,18 +301,18 @@ function UpdateROIs(_sel){
var _number = sel.options[sel.selectedIndex].text;
ROIInfo = getROIInfo("digit", _number);
_catzw = getConfigCategory();
// _catzw = getConfigCategory();
if (_catzw["Digits"]["enabled"] == false)
if (cofcat["Digits"]["enabled"] == false)
{
document.getElementById("Category_Digits_enabled").checked = false;
EnDisableDigits();
alert("Digital ROIs are disabled - please enable (Check box top left).\n");
firework.launch('Digital ROIs are disabled - please enable first (Check box top left)', 'warning', 10000);
return;
}
if (ROIInfo.length == 0){
alert("There are no ROIs defined.\nPlease first create a new ROI (\"New ROIs ...\").\n");
firework.launch('There are no ROIs defined. Please first create a new ROI ("New ROIs ...")', 'danger', 10000);
document.getElementById("newROI").disabled = false;
document.getElementById("deleteROI").disabled = true;
document.getElementById("index").disabled = true;
@@ -400,14 +407,15 @@ function UpdateROIs(_sel){
}
function init() {
basepath = getbasepath();
domainname = getDomainname();
canvas.addEventListener('mousedown', mouseDown, false);
canvas.addEventListener('mouseup', mouseUp, false);
canvas.addEventListener('mousemove', mouseMove, false);
loadCanvas(basepath + "/fileserver/config/reference.jpg");
loadConfig(basepath);
loadCanvas(domainname + "/fileserver/config/reference.jpg");
loadConfig(domainname);
ParseConfig();
param = getConfigParameters();
cofcat = getConfigCategory();
UpdateNUMBERS();
space = ROIInfo[1].x - parseInt(ROIInfo[0].x) - parseInt(ROIInfo[0].dx);
@@ -460,7 +468,7 @@ function renameNumber(){
erg = RenameNUMBER(_delte, _numbernew);
if (erg != "")
alert(erg);
firework.launch(erg, 'danger', 30000);
else
UpdateNUMBERS(_numbernew);
}
@@ -470,7 +478,7 @@ function newNumber(){
erg = CreateNUMBER(_numbernew);
if (erg != "")
alert(erg);
firework.launch(erg, 'danger', 30000);
else
UpdateNUMBERS(_numbernew);
}
@@ -482,7 +490,7 @@ function removeNumber(){
var _delte= sel.options[sel.selectedIndex].text;
erg = DeleteNUMBER(_delte);
if (erg != "")
alert(erg);
firework.launch(erg, 'danger', 30000);
UpdateNUMBERS();
}
}
@@ -747,7 +755,7 @@ function draw() {
erg = RenameROI(_number, "digit", _roialt, _roinew);
if (erg != "")
alert(erg);
firework.launch(erg, 'danger', 30000);
else
UpdateROIs(_roinew);
}

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html style="width: fit-content">
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -57,7 +57,7 @@ p {font-size: 1em;}
After step 5 setup mode is completed, it then reboots and starts into the normal mode.
<br><br>
If you need help. have a look on the <a href=https://github.com/jomjol/AI-on-the-edge-device/wiki target=_blank>Wiki</a> and the <a href=https://github.com/jomjol/AI-on-the-edge-device/discussions target=_blank>Discussion</a> pages.<br>
If you need support, have a look to the <a href=https://jomjol.github.io/AI-on-the-edge-device-docs target=_blank>documenation</a> or the <a href=https://github.com/jomjol/AI-on-the-edge-device/discussions target=_blank>discussion</a> pages.<br>
<h4>Have fun with the digitizer!</h4>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html style="width: fit-content">
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -21,6 +21,9 @@ p {font-size: 1em;}
</style>
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
</head>
<body style="font-family: arial">
@@ -41,20 +44,20 @@ p {font-size: 1em;}
<button class="button" onclick="reboot()">Leave Setup Modus and Reboot to Normal modus</button>
</p>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfigparam.js"></script>
<script type="text/javascript" src="./readconfigcommon.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript">
var canvas = document.getElementById('canvas'),
basepath = "http://192.168.178.22";
domainname = getDomainname();
aktstatu = 0;
function reboot() {
if (confirm("Do you want to leave the configuration mode and restart the ESP32?\n\nPlease reload the page in about 30s.")) {
basepath = getbasepath();
if (!loadConfig(basepath)) {
alert("Setup Modus could not be deactivated!\Please retry.");
if (confirm("Do you want to leave the configuration mode and restart the ESP32?")) {
domainname = getDomainname();
if (!loadConfig(domainname)) {
firework.launch('Setup Modus could not be deactivated! Please try again!', 'danger', 30000);
return;
}
ParseConfig();
@@ -63,7 +66,7 @@ p {font-size: 1em;}
param["System"]["SetupMode"]["value1"] = "false";
WriteConfigININew();
SaveConfigToServer(basepath);
SaveConfigToServer(domainname);
var stringota = "/reboot";

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Make Reference</title>
<meta charset="utf-8"/>
@@ -30,7 +30,9 @@ table {
padding: 5px;
}
</style>
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
</head>
<body style="font-family: arial; padding: 0px 10px;">
@@ -93,9 +95,9 @@ table {
</table>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfigcommon.js"></script>
<script type="text/javascript" src="./readconfigparam.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
@@ -103,13 +105,13 @@ table {
var canvas = document.getElementById('canvas'),
ctx = canvas.getContext('2d'),
imageObj = new Image()
basepath = "http://192.168.178.26";
domainname = getDomainname();
isActReference = false;
param;
function doReboot() {
if (confirm("Are you sure you want to reboot? Did you save the config?")) {
var stringota = "/reboot";
var stringota = getDomainname() + "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
@@ -126,15 +128,15 @@ table {
_brightness = document.getElementById("MakeImage_Brightness_value1").value;
_contrast = document.getElementById("MakeImage_Contrast_value1").value;
_saturation = document.getElementById("MakeImage_Saturation_value1").value;
url = basepath + "/editflow?task=test_take&bri=" + _brightness;
url = getDomainname() + "/editflow?task=test_take&bri=" + _brightness;
url = url + "&con=" + _saturation + "&sat=" + _saturation + "&int=" + _intensity;
}
else
{
url = basepath + "/editflow?task=test_take";
url = domainname + "/editflow?task=test_take";
}
if (basepath.length > 0){
url = url + "&host=" + basepath;
if (domainname.length > 0){
url = url + "&host=" + domainname;
}
xhttp.open("GET", url, false);
@@ -145,7 +147,7 @@ table {
}
function loadRawImage(){
url = basepath + "/img_tmp/raw.jpg" + "?session=" + Math.floor((Math.random() * 1000000) + 1);
url = getDomainname() + "/img_tmp/raw.jpg" + "?session=" + Math.floor((Math.random() * 1000000) + 1);
document.getElementById("finerotate").disabled = false;
document.getElementById("prerotateangle").disabled = false;
document.getElementById("updatereferenceimage").disabled = false;
@@ -189,7 +191,7 @@ table {
}
function showReference(_param){
url = basepath + "/fileserver/config/reference.jpg" + "?session=" + Math.floor((Math.random() * 1000000) + 1);;
url = getDomainname() + "/fileserver/config/reference.jpg" + "?session=" + Math.floor((Math.random() * 1000000) + 1);;
document.getElementById("finerotate").value = 0;
document.getElementById("prerotateangle").value = _param["Alignment"]["InitialRotate"].value1;
@@ -263,12 +265,12 @@ table {
drawRotated(false);
WriteConfigININew();
SaveConfigToServer(basepath);
SaveConfigToServer(getDomainname());
SaveCanvasToImage(canvas, "/config/reference.jpg", true, basepath);
SaveCanvasToImage(canvas, "/config/reference.jpg", true, getDomainname());
showReference(param);
UpdatePage();
alert("Reference is updated!");
firework.launch('Reference got updated. Please reboot to activate changes!', 'success', 5000);
}
}
@@ -301,8 +303,7 @@ table {
function init() {
canvas.addEventListener('mousemove', mouseMove, false);
basepath = getbasepath();
loadConfig(basepath);
loadConfig(getDomainname());
ParseConfig();
param = getConfigParameters();

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html style="width: fit-content">
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html style="width: fit-content">
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html style="width: fit-content">
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html style="width: fit-content">
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html style="width: fit-content">
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html style="width: fit-content">
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@@ -0,0 +1,173 @@
<html>
<head>
<link href="/firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="/jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="/firework.js?v=$COMMIT_HASH"></script>
<style>
#files_table {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#files_table td, #files_table th {
border: 1px solid #ddd;
padding: 8px;
}
#files_table tr:nth-child(even){
background-color: #f2f2f2;
}
#files_table tr:hover {
background-color: #ddd;
}
#files_table th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #0011ff;
color: white;
}
</style>
</head>
</body>
<table class="fixed" border="0" width=100% style="font-family: arial">
<tr><td>
<h2>Content on SD-Card</h2>
</td>
<td rowspan="2" width="500px">
<table border="0">
<tr>
<td>
<label for="newfile">Upload a file</label>
</td>
<td colspan="2">
<input id="newfile" type="file" onchange="setpath()" style="width:100%;">
</td>
</tr>
<tr>
<td>
<label for="filepath">Set path on server</label>
</td>
<td>
<input id="filepath" type="text" style="width:100%;">
</td>
<td>
<button id="upload" type="button" onclick="upload()">Upload</button>
</td>
</tr>
</table>
</td></tr>
<tr>
<td>
<span id="currentpath"></span> &nbsp;&nbsp;&nbsp;&nbsp;<button id="dirup" type="button" onclick="dirup()" disabled>&#129041; Directory up</button>
</td>
</tr>
</table>
<script type="text/javascript" src="/common.js?v=$COMMIT_HASH">
</script>
<script language="JavaScript">
function setpath() {
var fileserverpraefix = "/fileserver";
var anz_zeichen_fileserver = fileserverpraefix.length;
var default_path = window.location.pathname.substring(anz_zeichen_fileserver) + document.getElementById("newfile").files[0].name;
document.getElementById("filepath").value = default_path;
}
function dirup() {
var str = window.location.href;
str = str.substring(0, str.length-1);
var zw = str.indexOf("/");
var found = zw;
while (zw >= 0)
{
zw = str.indexOf("/", found+1);
if (zw >= 0)
found = zw;
}
var res = str.substring(0, found+1);
window.location.href = res;
}
function upload() {
var filePath = document.getElementById("filepath").value;
var upload_path = "/upload/" + filePath;
var fileInput = document.getElementById("newfile").files;
/* Max size of an individual file. Make sure this
* value is same as that set in file_server.c */
var MAX_FILE_SIZE = 8000*1024;
var MAX_FILE_SIZE_STR = "8000KB";
if (fileInput.length == 0) {
firework.launch('No file selected!', 'danger', 30000);
} else if (filePath.length == 0) {
firework.launch('File path on server is not set!', 'danger', 30000);
} else if (filePath.length > 100) {
firework.launch('Filename is to long! Max 100 characters.', 'danger', 30000);
} else if (filePath.indexOf(' ') >= 0) {
firework.launch('File path on server cannot have spaces!', 'danger', 30000);
} else if (filePath[filePath.length-1] == '/') {
firework.launch('File name not specified after path!', 'danger', 30000);
} else if (fileInput[0].size > MAX_FILE_SIZE) {
firework.launch("File size must be less than " + MAX_FILE_SIZE_STR + "!", 'danger', 30000);
} else {
document.getElementById("newfile").disabled = true;
document.getElementById("filepath").disabled = true;
document.getElementById("upload").disabled = true;
var file = fileInput[0];
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
if (xhttp.status == 200) {
document.open();
document.write(xhttp.responseText);
document.close();
} else if (xhttp.status == 0) {
firework.launch('Server closed the connection abruptly!', 'danger', 30000);
UpdatePage(false);
} else {
firework.launch('An error occured: ' + xhttp.responseText, 'danger', 30000);
UpdatePage(false);
}
}
};
xhttp.open("POST", upload_path, true);
xhttp.send(file);
}
}
function checkAtRootLevel(res) {
if (getPath() == "/fileserver/") { // Already at root level
document.getElementById("dirup").disabled = true;
console.log("Already on sd-card root level!");
return true;
}
document.getElementById("dirup").disabled = false;
return false;
}
function getPath() {
return window.location.pathname.replace(/\/+$/, '') + "/"
}
checkAtRootLevel();
console.log("Current path: " + getPath().replace("/fileserver", ""));
document.getElementById("currentpath").innerHTML = "Current path: <b>" + getPath().replace("/fileserver", "") + "</b>";
document.cookie = "page=" + getPath() + "; path=/";
</script>
</body>
</html>

38
sd-card/html/firework.css Normal file
View File

@@ -0,0 +1,38 @@
/* Firework JS */
.firework {
background-color: #888;
border-color: #888;
border-radius: 6px;
color: #fff;
left: 200px;
padding: 5px;
position: fixed;
opacity: 0;
text-align: center;
top: 0px;
width: 600px;
z-index: 99;
font-size:120%;
}
.firework a {
color: rgba(255, 255, 255, 0.9);
cursor: pointer;
float: right;
margin: 0 -5px 0 0;
padding: 0 5px;
}
.firework.success {
background-color: #669936f0;
border-color: #669936;
color: #fff
}
.firework.danger {
background-color: #E65A27f0;
border-color: #E65A27;
color: #fff
}
.firework.warning {
color: #5F612C;
background-color: #dbd567f0;
border-color: #DBD667;
}

68
sd-card/html/firework.js Normal file
View File

@@ -0,0 +1,68 @@
/**
* Firework displays short notifications at top of page,
* then fades out a few seconds later (no user interaction)
* Source: https://www.jqueryscript.net/other/Simple-Top-Notification-Plugin-with-jQuery-firework-js.html
* https://github.com/smalldogs/fireworkjs
* @param m string message
* @param t string (optional) message type ('success', 'danger')
* @param l number (optional) length of time to display message in milliseconds
*/
;(function ($, window) {
"use strict";
window.firework = {
launch: function(m, t, l) {
if (typeof m != 'string') {
console.error('Error: Call to firework() without a message');
return false
}
var c = 'firework' // css class(es)
, p = 10 // pixels from top or page to display
, d = new Date()
, s = d.getTime() // used to create unique element ids
, fid = "firework-"+ s; // firework id
if (typeof t !== 'undefined') c += ' '+ t; // add any user defined classes
$('.firework').each(function(){ // account for existing fireworks and move new one below
p += parseInt($(this).height()) + 30
});
$('<div id="'+ fid +'" class="'+ c +'">'+ m +'<a onclick="firework.remove(\'#'+ fid +'\')"><img src=close.png></a></div>')
.appendTo('body')
.animate({
opacity: 1,
top: p +'px'
});
setTimeout(function(){ firework.remove("#"+ fid) }, typeof l == "number" ? l : 1500);
},
remove : function(t) {
$(t)
.animate({
opacity: 0
})
.promise()
.done(function(){
$(t).remove()
})
},
sticky : function(m, t, l) {
$.cookie("firework", '{ "message" : "'+ m +'", "type" : "'+ t +'", "display" : "'+ l +'" }', { path: '/' })
}
};
// checks for firework cookie on dom ready
$(function() {
if (typeof $.cookie == "function") {
if ($.cookie("firework")) {
var ex = $.parseJSON($.cookie("firework"))
setTimeout(function(){ firework.launch(ex.message, ex.type, parseInt(ex.display) > 0 ? parseInt(ex.display) : null) }, 1000)
$.cookie("firework", null, { path: '/'})
}
}
});
})(jQuery, window);

View File

@@ -13,7 +13,7 @@ function getbasepath(){
{
// host = "http://192.168.2.219"; // jomjol interner test
// host = "http://192.168.178.46"; // jomjol interner test
host = "http://192.168.178.46"; // jomjol interner Real
host = "http://192.168.178.62"; // jomjol interner Real
// host = "http://192.168.43.191";
// host = "."; // jomjol interner localhost

View File

@@ -1,10 +1,10 @@
<html>
<head>
<script src='https://cdn.plot.ly/plotly-2.14.0.min.js'></script>
<script type="text/javascript" src='plotly-2.14.0.min.js?v=$COMMIT_HASH'></script>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfigcommon.js"></script>
<script type="text/javascript" src="./readconfigparam.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
<style>
textarea {
@@ -18,7 +18,9 @@
el && eval(el.value);
}
</script>
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
</head>
<body>
<div id='chart'></div>
@@ -31,7 +33,7 @@
<option value="6">Change-Absolut</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=fileserver/log/data/>Download</a>
<button onClick="window.location.href = getDomainname() + '/fileserver/log/data/'">Show data files</button>
<!-- <button onclick="document.getElementById('editor').hidden = false; this.hidden = true;" >Editor</button> -->
<div id='editor' hidden='true'>
@@ -41,12 +43,12 @@ numbername = document.getElementById("numbers").value;
datatype = document.getElementById("datatype").value;
//alert("Auslesen: " + datefile + " " + numbername);
_basepath = getbasepath();
fetch(_basepath + '/fileserver/log/data/' + datefile)
_domainname = getDomainname();
fetch(_domainname + '/fileserver/log/data/' + datefile)
.then(response => {
// handle the response
if (response.status == 404) {
alert("no log data available for "+dateString);
firework.launch("No log data available for " + dateString, 'warning', 10000);
}
response.text()
.then( result => {
@@ -79,7 +81,6 @@ fetch(_basepath + '/fileserver/log/data/' + datefile)
}).catch((error) => {
// handle the error
console.log(error);
alert("test");
});
</textarea><br />
<button onclick="run();">run</button>

View File

@@ -1,21 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css" type="text/css" >
<link rel="stylesheet" href="style.css?v=$COMMIT_HASH" type="text/css" >
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="gethost.js"></script>
<script type="text/javascript" src="readconfigcommon.js"></script>
<script type="text/javascript" src="readconfigparam.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
<script>
async function loadPage(page) {
console.log("loadPage(" + page + ")");
document.cookie = "page="+page;
document.cookie = "page="+page + "; path=/";
document.getElementById('maincontent').src = page;
[].forEach.call(document.querySelectorAll('.submenu'), function (el) {
@@ -52,7 +55,7 @@
<div class="main">
<table style="border: none">
<tr><td style="padding-right: 10px;"><img src="favicon.ico"></td>
<tr><td style="padding-right: 10px;"><img src="favicon.ico?v=$COMMIT_HASH"></td>
<td><h1 id="id_title"> Digitizer - AI on the edge</h1>
<h2>An ESP32 all inclusive neural network recognition system for meter digitalization</h2>
</td></tr>
@@ -60,36 +63,36 @@
<div class="menu" onmouseover="resetMenu()">
<ul>
<li><a href="#" onclick="loadPage('overview.html');">Overview</a></li>
<li><a href="#" onclick="loadPage('overview.html?v=$COMMIT_HASH');">Overview</a></li>
<li><a>Settings <i class="arrow down"></i></a>
<ul class="submenu">
<li><a href="#" onclick="loadPage('prevalue_set.html');">Set Previous Value</a></li>
<li><a href="#" onclick="loadPage('edit_config_param.html');">Configuration</a></li>
<li><a href="#" onclick="loadPage('prevalue_set.html?v=$COMMIT_HASH');">Set Previous Value</a></li>
<li><a href="#" onclick="loadPage('edit_config_param.html?v=$COMMIT_HASH');">Configuration</a></li>
<li><a>Alignment <i class="arrow right"></i></a>
<ul>
<li><a href="#" onclick="loadPage('edit_reference.html');">Reference Image</a></li>
<li><a href="#" onclick="loadPage('edit_alignment.html');">Alignment Marks</a></li>
<li><a href="#" onclick="loadPage('edit_reference.html?v=$COMMIT_HASH');">Reference Image</a></li>
<li><a href="#" onclick="loadPage('edit_alignment.html?v=$COMMIT_HASH');">Alignment Marks</a></li>
</ul>
</li>
<li><a><strong>R</strong>egions <strong>O</strong>f <strong>I</strong>nterest <i class="arrow right"></i></a>
<ul>
<li><a href="#" onclick="loadPage('edit_digits.html');">Digital ROIs</a></li>
<li><a href="#" onclick="loadPage('edit_analog.html');">Analog ROIs</a></li>
<li><a href="#" onclick="loadPage('edit_digits.html?v=$COMMIT_HASH');">Digital ROIs</a></li>
<li><a href="#" onclick="loadPage('edit_analog.html?v=$COMMIT_HASH');">Analog ROIs</a></li>
</ul>
</li>
</ul>
<li><a href="#" onclick="loadPage('value?full');">Recognition</a></li>
<li><a href="#" onclick="loadPage('graph.html');">Data Graph</a></li>
<li><a href="#" onclick="loadPage('fileserver/');">File Server</a></li>
<li><a href="#" onclick="loadPage(getDomainname() + '/value?full');">Recognition</a></li>
<li><a href="#" onclick="loadPage('graph.html?v=$COMMIT_HASH');">Data Graph</a></li>
<li><a href="#" onclick="loadPage(getDomainname() + '/fileserver/');">File Server</a></li>
<li><a>System <i class="arrow down"></i></a>
<ul class="submenu">
<li><a href="#" onclick="loadPage('backup.html');">Backup/Restore</a></li>
<li><a href="#" onclick="loadPage('ota_page.html');">OTA Update</a></li>
<li><a href="#" onclick="loadPage('log.html');">Log Viewer</a></li>
<li><a href="#" onclick="loadPage('data.html');">Data Viewer</a></li>
<li><a href="#" onclick="loadPage('reboot_page.html');">Reboot</a></li>
<li><a href="#" onclick="loadPage('info.html');">Info</a></li>
<li><a href="#" onclick="loadPage('backup.html?v=$COMMIT_HASH');">Backup/Restore</a></li>
<li><a href="#" onclick="loadPage('ota_page.html?v=$COMMIT_HASH');">OTA Update</a></li>
<li><a href="#" onclick="loadPage('log.html?v=$COMMIT_HASH');">Log Viewer</a></li>
<li><a href="#" onclick="loadPage('data.html?v=$COMMIT_HASH');">Data Viewer</a></li>
<li><a href="#" onclick="loadPage('reboot_page.html?v=$COMMIT_HASH');">Reboot</a></li>
<li><a href="#" onclick="loadPage('info.html?v=$COMMIT_HASH');">Info</a></li>
</ul>
</li>
</ul>
@@ -104,8 +107,8 @@
LoadFwVersion();
LoadWebUiVersion();
if (getCookie("page") == "" || getCookie("page") == "reboot_page.html") {
document.cookie = "page=overview.html";
if (getCookie("page") == "" || getCookie("page") == "reboot_page.html?v=$COMMIT_HASH") {
document.cookie = "page=overview.html?v=$COMMIT_HASH" + "; path=/";
}
console.log("Loading page: " + getCookie("page"));
document.getElementById('maincontent').src = getCookie("page");

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Info</title>
<meta charset="utf-8">

View File

@@ -30,19 +30,20 @@
font-size: small;
}
</style>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
</head>
<body>
<div class="box">
<div class="row header">
<button onClick="reload();">Reload</button>
<button onClick="window.open('logfileact');">Show full log</button>
<button onClick="window.location.href = 'fileserver/log/message/'">Show older log files</button>
<button onClick="window.open(getDomainname() + '/logfileact');">Show full log</button>
<button onClick="window.location.href = getDomainname() + '/fileserver/log/message/'">Show older log files</button>
</div>
<div class="row content" id="log"><br><br><br><b>Loading Logfile, please wait...</b></div>
<div class="row footer">
<button onClick="reload();">Reload</button>
<button onClick="window.open('logfileact');">Show full log</button>
<button onClick="window.location.href = 'fileserver/log/message/'">Show older log files</button>
<button onClick="window.open(getDomainname() + '/logfileact');">Show full log</button>
<button onClick="window.location.href = getDomainname() + '/fileserver/log/message/'">Show older log files</button>
</div>
</div>
</body>
@@ -52,7 +53,7 @@
// document.getElementById('log').innerHTML += "<br><b>Reloading...<b><br><br>";
document.getElementById('log').innerHTML += "<b>Reloading...</b>";
window.scrollBy(0,document.body.scrollHeight);
funcRequest('log');
funcRequest(getDomainname() + '/log');
}
@@ -102,7 +103,7 @@
});
}
funcRequest('log');
funcRequest(getDomainname() + '/log');
</script>
</html>

View File

@@ -1,266 +1,295 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<title>OTA Update</title>
<meta charset="utf-8">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>OTA Update</title>
<meta charset="utf-8">
<script type="text/javascript" src="./gethost.js"></script>
<style>
h1 {font-size: 2em;}
h2 {font-size: 1.5em;}
h3 {font-size: 1.2em;}
p {font-size: 1em;}
input[type=number] {
width: 138px;
padding: 10px 5px;
display: inline-block;
border: 1px solid #ccc;
font-size: 16px;
}
.button {
padding: 10px 20px;
width: 211px;
font-size: 16px;
}
</style>
<style>
h1 {font-size: 2em;}
h2 {font-size: 1.5em;}
h3 {font-size: 1.2em;}
p {font-size: 1em;}
input[type=number] {
width: 138px;
padding: 10px 5px;
display: inline-block;
border: 1px solid #ccc;
font-size: 16px;
}
.button {
padding: 10px 20px;
width: 211px;
font-size: 16px;
}
</style>
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
</head>
<body style="font-family: arial; padding: 0px 10px;">
<p>Check the <a href="https://github.com/jomjol/AI-on-the-edge-device/releases" target=_blank>Release Page</a> to see if there is an update available.</p>
<p>Normally, the overall update package (<i><span style="font-family:monospace">update__*.zip</span></i>) is your best choice!<br>
Alternatively you can use the old style <i><span style="font-family:monospace">firmware__*.bin</span></i> and
web interface (<i><span style="font-family:monospace">html__*.zip</span></i>). How ever it is strongly recommended to update firmware and
web interface at the same time!</p>
<hr>
<h2>Update</h2>
<b>Do not reload the page or switch to another page while the update is in progress!</b>
<table class="fixed" border="0">
<tr>
<p>
<label for="newfile">Select the file containig the update (
<i><span style="font-family:monospace">update__*.zip</span></i>,
<i><span style="font-family:monospace">firmware__*.bin</span></i>,
<i><span style="font-family:monospace">html__*.zip</span></i>,
<i><span style="font-family:monospace">*.tfl/tflite</span></i>)
</p>
<h2>OTA Update</h2>
<p>Check the <a href="https://github.com/jomjol/AI-on-the-edge-device/releases" target=_blank>Release Page</a> to see if there is an update available. </p>
<p>You can also automatically get notified about a release, see <a href="https://jomjol.github.io/AI-on-the-edge-device-docs/New-Releases-Notification" target=_blank>Release Notifications</a>.</p>
<h3>Update</h3>
On the <a href="https://github.com/jomjol/AI-on-the-edge-device/releases" target=_blank>Release Page</a>, pick the <i><span style="font-family:monospace">AI-on-the-edge-device__update__*.zip</span></i> file!</p>
<p>Alternatively the following file formats are supported (Make sure the file extention is lower case):</p>
<ul>
<li><span style="font-family:monospace">*.zip</span> &rarr; Gets unpacked on the SD-Card (most top folder)</li>
<li><span style="font-family:monospace">*.bin</span> &rarr; gets installed onto the ESP32</li>
<li><span style="font-family:monospace">*.tfl/tflite</span> &rarr; Gets copied to your <i>SD-Card/config</i></li>
</ul>
<p><b>Do not reload this page or switch to another page while the update is in progress!</b><br></p>
<form id="upload_form" enctype="multipart/form-data" method="post">
<input type="file" accept=".bin,.zip,.tfl,.tflite" name="file_selector" id="file_selector" onchange="validate_file()"><br><br>
<button class="button" style="width:300px" id="start_OTA_button" type="button" onclick="start_OTA()" disabled>Upload and install</button>
<br><br>
<progress id="progressBar" value="0" max="100" style="width:600px;"></progress>
<p id="loaded_n_total"></p>
<h3><span id="status">Status: idle</span></h3>
</form>
<script language="JavaScript">
var domainname = getDomainname();
</tr>
<tr>
<p>
<input id="newfile" type="file" onchange="setpath()" style="width:100%;">
</p>
</tr>
<tr>
<p>
<button class="button" style="width:300px" id="doUpdate" type="button" onclick="prepareOnServer()">Upload and update<br>(incl. reboot - if needed)</button>
</p>
</tr>
<tr>
<p>
<h3><span id="status">Status: idle</span> <span id="progress"></span></h3>
</p>
</tr>
</table>
var action_runtime = 0;
/* Max size of an individual file. Make sure this
* value is same as that set in server_file.c */
var MAX_FILE_SIZE = 8000*1024;
var MAX_FILE_SIZE_STR = "8MB";
function validate_file() {
document.getElementById("start_OTA_button").disabled = true;
var fileInput = document.getElementById("file_selector").files;
var filepath = document.getElementById("file_selector").value;
<script language="JavaScript">
console.log("filepath: " + filepath);
var basepath = "http://192.168.178.26";
filename = filepath.split(/[\\\/]/).pop();
console.log("filename: " + filename);
/* Max size of an individual file. Make sure this
* value is same as that set in server_file.c */
var MAX_FILE_SIZE = 8000*1024;
var MAX_FILE_SIZE_STR = "8MB";
var action_runtime = 0;
var progressTimerHandle = null;
function init(){
basepath = getbasepath();
document.getElementById("doUpdate").disabled = true;
}
function doRebootAfterUpdate() {
if (confirm("Upload completed!\nThe device will reboot now and complete the update.\nThis will take up to 180s!")) {
var stringota = "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
window.location.replace(stringota);
}
}
function setpath() {
var nameneu = document.getElementById("newfile").value;
nameneu = nameneu.split(/[\\\/]/).pop();
document.getElementById("doUpdate").disabled = false;
document.getElementById("status").innerText = "Status: File selected";
}
function prepareOnServer() {
var fileInput = document.getElementById("newfile").files;
var nameneu = document.getElementById("newfile").value;
filePath = nameneu.split(/[\\\/]/).pop();
if (fileInput.length == 0) {
alert("No file selected!");
return;
} else if (filePath.length == 0) {
alert("File path on server is not set!");
return;
} else if (filePath.length > 100) {
alert("Filename is to long! Max 100 characters.");
return;
} else if (filePath.indexOf(' ') >= 0) {
alert("File path on server cannot have spaces!");
return;
} else if (filePath[filePath.length-1] == '/') {
alert("File name not specified after path!");
return;
} else if (fileInput[0].size > MAX_FILE_SIZE) {
alert("File size must be less than " + MAX_FILE_SIZE_STR + "!");
return;
}
document.getElementById("status").innerText = "Status: Preparations on device";
document.getElementById("doUpdate").disabled = true;
var xhttp = new XMLHttpRequest();
var nameneu = document.getElementById("newfile").value;
filePath = nameneu.split(/[\\\/]/).pop();
/* first delete the old firmware AND empty the /firmware directory*/
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
stopProgressTimer();
if (xhttp.status == 200) {
/* keine Reaktion, damit sich das Dokument nicht ändert */
upload();
} else if (xhttp.status == 0) {
alert("Server closed the connection abruptly!");
document.getElementById("doUpdate").disabled = false;
} else {
alert(xhttp.status + " Error!\n" + xhttp.responseText);
document.getElementById("doUpdate").disabled = false;
}
}
};
startProgressTimer("Server preparations...");
var _toDo = basepath + "/ota?task=emptyfirmwaredir";
xhttp.open("GET", _toDo, true);
xhttp.send();
}
function upload() {
document.getElementById("newfile").disabled = true;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
stopProgressTimer();
if (xhttp.status == 200) {
// alert("Upload successfull!")
// document.reload();
extract();
} else if (xhttp.status == 0) {
alert("Server closed the connection abruptly!");
document.getElementById("doUpdate").disabled = false;
} else {
alert(xhttp.status + " Error!\n" + xhttp.responseText);
document.getElementById("doUpdate").disabled = false;
/* Various checks on filename length and file size */
if (fileInput.length == 0) {
firework.launch('No file selected!', 'danger', 30000);
return;
} else if (filename.length == 0) {
firework.launch('File path on server is not set!', 'danger', 30000);
return;
} else if (filename.length > 100) {
firework.launch('Filename is too long! Max 100 characters.', 'danger', 30000);
return;
} else if (filename.indexOf(' ') >= 0) {
firework.launch('Filename can not have spaces!', 'danger', 30000);
return;
} else if (filename[filename.length-1] == '/') {
firework.launch('Filename not specified after path!', 'danger', 30000);
return;
} else if (fileInput[0].size > MAX_FILE_SIZE) {
firework.launch("File size must be less than " + MAX_FILE_SIZE_STR + "!", 'danger', 30000);
return;
}
}
};
startProgressTimer("Upload");
var fileInput = document.getElementById("newfile").files;
var file = fileInput[0];
var upload_path = "/upload/firmware/" + filePath;
xhttp.open("POST", upload_path, true);
document.getElementById("status").innerText = "Status: Uploading (takes up to 60s)...";
xhttp.send(file);
}
function extract() {
document.getElementById("status").innerText = "Status: Processing on device (takes up to 3 minutes)...";
var xhttp = new XMLHttpRequest();
/* first delete the old firmware */
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
stopProgressTimer();
if (xhttp.status == 200) {
document.getElementById("status").innerText = "Status: Update completed!";
document.getElementById("doUpdate").disabled = true;
document.getElementById("newfile").disabled = false;
document.cookie = "page=overview.html"; // Make sure after the reboot we go to the overview page
if (xhttp.responseText.startsWith("reboot"))
{
doRebootAfterUpdate();
}
else
{
alert("Processing done!\n\n" + xhttp.responseText);
}
} else if (xhttp.status == 0) {
alert("Server closed the connection abruptly!");
UpdatePage();
} else {
alert(xhttp.status + " Error!\n" + xhttp.responseText);
UpdatePage();
/* Check if the fillename matches our expected pattern
* - AI-on-the-edge-device__update__*.zip
* - firmware__*.bin
* - *.ftl
* - *.tflite */
if ( /(^AI-on-the-edge-device__update__)[a-z0-9()_\-.]*(\.zip$)/.test(filename) || // OK
( /(^AI-on-the-edge-device__firmware)[a-z0-9()_\-.]*(\.bin$)/.test(filename)) ||
( /[a-z0-9()_\-.]*(\.tfl$)/.test(filename)) ||
( /[a-z0-9()_\-.]*(\.tflite$)/.test(filename))) {
firework.launch('Great, the filename matches our expectations. You can now press "Upload and install".', 'success', 5000);
}
/* Following filenames are acceptiod but not prefered:
* - *.bin
* - *.zip */
else if (filename.endsWith(".zip") || filename.endsWith(".bin")) { // Warning but still accepted
firework.launch('The filename does not match the suggested filename pattern, but is nevertheless accepted. You can now press "Upload and install', 'warning', 10000);
}
/* Any other file name format is not accepted */
else { // invalid
firework.launch('The filename does not match our expectations!', 'danger', 30000);
return;
}
document.getElementById("start_OTA_button").disabled = false;
}
};
startProgressTimer("Extraction");
var nameneu = document.getElementById("newfile").value;
filePath = nameneu.split(/[\\\/]/).pop();
var _toDo = basepath + "/ota?task=update&file=" + filePath;
xhttp.open("GET", _toDo, true);
xhttp.send();
}
function start_OTA() {
document.getElementById("start_OTA_button").disabled = true;
var file_name = document.getElementById("file_selector").value;
document.getElementById("file_selector").disabled = true;
file_name = file_name.split(/[\\\/]/).pop();
document.getElementById("status").innerText = "Status: File selected";
prepareOnServer();
}
function startProgressTimer(step) {
console.log(step + "...");
document.getElementById('progress').innerHTML = "(0s)";
action_runtime = 0;
progressTimerHandle = setInterval(function() {
action_runtime += 1;
console.log("Progress: " + action_runtime + "s");
document.getElementById('progress').innerHTML = "(" + action_runtime + "s)";
}, 1000);
}
function doRebootAfterUpdate() {
var xhttp = new XMLHttpRequest();
xhttp.open("GET", "/reboot", true);
xhttp.send();
}
function stopProgressTimer() {
clearInterval(progressTimerHandle);
document.getElementById('progress').innerHTML = "";
}
function prepareOnServer() {
document.getElementById("status").innerText = "Status: Preparing device...";
var xhttp = new XMLHttpRequest();
var file_name = document.getElementById("file_selector").value;
filePath = file_name.split(/[\\\/]/).pop();
/* first delete the old firmware AND empty the /firmware directory*/
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
if (xhttp.status == 200) {
/* keine Reaktion, damit sich das Dokument nicht ändert */
upload();
} else if (xhttp.status == 0) {
firework.launch('Server closed the connection abruptly!', 'danger', 30000);
} else {
firework.launch('An error occured: ' + xhttp.responseText, 'danger', 30000);
}
}
};
var _toDo = domainname + "/ota?task=emptyfirmwaredir";
xhttp.open("GET", _toDo, true);
xhttp.send();
}
init();
function extract() {
document.getElementById("status").innerText = "Status: Processing on device...";
</script>
var xhttp = new XMLHttpRequest();
/* first delete the old firmware */
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
if (xhttp.status == 200) {
document.cookie = "page=overview.html?v=$COMMIT_HASH" + "; path=/"; // Make sure after the reboot we go to the overview page
if (xhttp.responseText.startsWith("reboot")) { // Reboot required
console.log("Upload completed, the device will now restart and install the update!");
document.getElementById("status").innerText = "Status: Installing...";
firework.launch('Upload completed, the device will now restart and install the update', 'success', 5000);
/* Tell it to reboot */
doRebootAfterUpdate();
action_runtime = 0;
updateTimer = setInterval(function() {
action_runtime += 1;
console.log("Waiting: " + action_runtime + "s");
_("progressBar").value = Math.round(action_runtime);
if (action_runtime > 10) { // After 10 seconds, start to check if we are up again
/* Check if the device is up again and forward to index page if so */
fetch('reboot_page.html?v=$COMMIT_HASH&' + Math.random(), {mode: 'no-cors'}).then(
r=>{parent.location.href=('index.html?v=$COMMIT_HASH');}
)
}
if (action_runtime > 100) { // We reached 300 seconds but device is not ready yet
firework.launch("The device seems not do be up again, or maybe we missed it. Try to reload this page or reset the device!", 'danger', 30000);
clearInterval(updateTimer);
}
}, 3000);
}
else // No reboot required
{
document.getElementById("status").innerText = "Status: Update completed";
firework.launch('Update completed!', 'success', 5000);
document.getElementById("file_selector").disabled = false;
}
} else if (xhttp.status == 0) {
firework.launch('Server closed the connection abruptly!', 'danger', 30000);
} else {
firework.launch('An error occured: ' + xhttp.responseText, 'danger', 30000);
}
}
};
var file_name = document.getElementById("file_selector").value;
filePath = file_name.split(/[\\\/]/).pop();
var _toDo = domainname + "/ota?task=update&file=" + filePath;
xhttp.open("GET", _toDo, true);
xhttp.send();
}
function _(el) {
return document.getElementById(el);
}
function upload() {
document.getElementById("status").innerText = "Status: Uploading...";
var upload_path = "/upload/firmware/" + filePath;
var file = _("file_selector").files[0];
var formdata = new FormData();
formdata.append("file_selector", file);
var ajax = new XMLHttpRequest();
ajax.upload.addEventListener("progress", progressHandler, false);
ajax.addEventListener("load", completeHandler, false);
ajax.addEventListener("error", errorHandler, false);
ajax.addEventListener("abort", abortHandler, false);
ajax.open("POST", upload_path);
ajax.send(file);
}
function progressHandler(event) {
_("loaded_n_total").innerHTML = "Uploaded " + (event.loaded / 1024 / 1024).toFixed(2) +
" MBytes of " + (event.total / 1024/ 1024).toFixed(2) + " MBytes.";
var percent = (event.loaded / event.total) * 100;
_("progressBar").value = Math.round(percent);
_("status").innerHTML = "Status: " + Math.round(percent) + "% uploaded... please wait";
}
function completeHandler(event) {
_("status").innerHTML = "Status: " + event.target.responseText;
_("progressBar").value = 0; //will clear progress bar after successful upload
_("loaded_n_total").innerHTML = "";
extract();
}
function errorHandler(event) {
_("status").innerHTML = "Status: Upload Failed";
firework.launch('Upload failed!', 'danger', 30000);
document.getElementById("file_selector").disabled = false;
}
function abortHandler(event) {
_("status").innerHTML = "Status: Upload Aborted";
firework.launch('Upload aborted!', 'danger', 30000);
document.getElementById("file_selector").disabled = false;
}
</script>
</body>
</html>
</html>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Overview</title>
<meta charset="utf-8">
@@ -55,8 +55,8 @@
</tr>
<tr>
<td class="tg-3">
<div id="timestamp" ></div>
<div id="statusflow" ></div>
<div id="timestamp" ></div>
<div id="cputemp" ></div>
<div id="rssi" ></div>
<div>
@@ -68,95 +68,117 @@
</table>
<script src="/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfigcommon.js"></script>
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript">
function addZero(i) {
function addZero(i) {
if (i < 10) {
i = "0" + i;
}
return i;
}
$(document).ready(function() {
var d = new Date();
var h = addZero(d.getHours());
var m = addZero(d.getMinutes());
var s = addZero(d.getSeconds());
$('#img').html('<img src="/img_tmp/alg_roi.jpg" style="max-height:555px; display:block; margin-left:auto; margin-right:auto;"></img>');
$('#timestamp').html("Last Page Refresh:" + (h + ":" + m + ":" + s));
loadStatus();
loadCPUTemp();
loadRSSI();
loadUptime();
loadRoundCounter();
refresh();
$(document).ready(function() {
LoadData();
LoadROIImage();
});
function refresh() {
setTimeout (function() {
var time = new Date();
var timestamp = new Date().getTime();
var d = new Date();
var h = addZero(d.getHours());
var m = addZero(d.getMinutes());
var s = addZero(d.getSeconds());
// reassign the url to be like alg_roi.jpg?timestamp=456784512 based on timestamp
$('#img').html('<img src="/img_tmp/alg_roi.jpg?timestamp='+ timestamp +'"max-height:555px; display:block; margin-left:auto; margin-right:auto;"></img>');
$('#timestamp').html("Last Page Refresh:" + (h + ":" + m + ":" + s));
init();
refresh();
}, 300000);
}
function LoadData(){
loadValue("value", "value");
loadValue("raw", "raw");
loadValue("prevalue", "prevalue");
loadValue("error", "error", "font-size:8px");
loadStatus();
loadCPUTemp();
loadRSSI();
loadUptime();
loadRoundCounter();
}
function LoadROIImage(){
var d = new Date();
var timestamp = d.getTime();
var h = addZero(d.getHours());
var m = addZero(d.getMinutes());
var s = addZero(d.getSeconds());
$('#img').html('<img src=' + getDomainname() + '/img_tmp/alg_roi.jpg?timestamp='+ timestamp +'" max-height:555px; display:block; margin-left:auto; margin-right:auto;"></img>');
$('#timestamp').html("Last Page Refresh:" + (h + ":" + m + ":" + s));
}
function Refresh() {
setTimeout (function() {
LoadData();
LoadROIImage();
Refresh();
}, 300000);
}
var basepath = "http://192.168.178.22";
function loadStatus() {
url = basepath + '/statusflow';
url = domainname + '/statusflow';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var _rsp = xhttp.responseText;
$('#statusflow').html("Status: " + _rsp);
$('#statusflow').html("State: " + _rsp);
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function loadCPUTemp() {
url = basepath + '/cpu_temperature';
url = domainname + '/cpu_temperature';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var _rsp = xhttp.responseText;
$('#cputemp').html("CPU Temperature: " +_rsp);
$('#cputemp').html("CPU Temperature: " +_rsp + "°C");
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function loadRSSI() {
url = basepath + '/rssi';
url = domainname + '/rssi';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var _rsp = xhttp.responseText;
$('#rssi').html("RSSI: " + _rsp);
if (_rsp >= -55) {
$('#rssi').html("WIFI Signal: Excellent (" + _rsp + "dBm)");
}
else if (_rsp < -55 && _rsp >= -67) {
$('#rssi').html("WIFI Signal: Good (" + _rsp + "dBm)");
}
else if (_rsp < -67 && _rsp >= -78) {
$('#rssi').html("WIFI Signal: Fair (" + _rsp + "dBm)");
}
else if (_rsp < -78 && _rsp >= -85) {
$('#rssi').html("WIFI Signal: Weak (" + _rsp + "dBm)");
}
else {
$('#rssi').html("WIFI Signal: Unreliable (" + _rsp + "dBm)");
}
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function loadUptime() {
url = basepath + '/uptime';
url = domainname + '/uptime';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
@@ -168,8 +190,9 @@ function refresh() {
xhttp.send();
}
function loadRoundCounter() {
url = basepath + '/info?type=Round';
url = domainname + '/info?type=Round';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
@@ -181,8 +204,9 @@ function refresh() {
xhttp.send();
}
function loadValue(_type, _div, _style) {
url = basepath + '/value?all=true&type=' + _type;
url = domainname + '/value?all=true&type=' + _type;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
@@ -221,19 +245,13 @@ function refresh() {
xhttp.send();
}
function init(){
basepath = getbasepath();
loadValue("value", "value");
loadValue("raw", "raw");
loadValue("prevalue", "prevalue");
loadValue("error", "error", "font-size:8px");
loadStatus();
loadCPUTemp();
loadRSSI();
loadUptime();
loadRoundCounter();
domainname = getDomainname();
Refresh();
}
init();
</script>

65
sd-card/html/plotly-2.14.0.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Set PreValue</title>
<meta charset="utf-8">
@@ -68,13 +68,16 @@ input[type=number] {
</body></html>
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="./readconfigcommon.js"></script>
<script type="text/javascript" src="./readconfigparam.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
<script type="text/javascript">
var basepath = "http://192.168.178.22";
var domainname = getDomainname();
var NUMBERS;
function setprevalue() {
@@ -84,7 +87,7 @@ function setprevalue() {
inputVal = inputVal.replace(",", ".");
var xhttp = new XMLHttpRequest();
try {
url = basepath + "/setPreValue?value=" + inputVal + "&numbers=" + _number;
url = domainname + "/setPreValue?value=" + inputVal + "&numbers=" + _number;
xhttp.open("GET", url, false);
xhttp.send();
response = xhttp.responseText;
@@ -92,18 +95,18 @@ function setprevalue() {
}
catch (error)
{
alert("Failed to get data from device!");
firework.launch('Failed to get data from device!', 'danger', 30000);
}
}
function loadPrevalue(_basepath) {
function loadPrevalue(_domainname) {
// Get current Pre Value
var sel = document.getElementById("Numbers_value1");
var _number = sel.options[sel.selectedIndex].text;
var xhttp = new XMLHttpRequest();
try {
url = _basepath + '/setPreValue?numbers=' + _number;
url = _domainname + '/setPreValue?numbers=' + _number;
xhttp.open("GET", url, false);
xhttp.send();
response = xhttp.responseText;
@@ -111,7 +114,7 @@ function loadPrevalue(_basepath) {
}
catch (error)
{
alert("Failed to get data from device!");
firework.launch('Failed to get data from device!', 'danger', 30000);
}
// Get current RAW Value
@@ -120,7 +123,7 @@ function loadPrevalue(_basepath) {
var xhttp = new XMLHttpRequest();
try {
url = _basepath + '/value?all=true&type=raw';
url = _domainname + '/value?all=true&type=raw';
xhttp.open("GET", url, false);
xhttp.send();
response = xhttp.responseText;
@@ -138,13 +141,13 @@ function loadPrevalue(_basepath) {
}
catch (error)
{
alert("Failed to get data from device!");
firework.launch('Failed to get data from device!', 'danger', 30000);
}
}
function numberChanged(){
loadPrevalue(basepath);
loadPrevalue(domainname);
}
function UpdateNUMBERS(_sel){
@@ -170,16 +173,16 @@ function UpdateNUMBERS(_sel){
}
_index.selectedIndex = index;
loadPrevalue(basepath);
loadPrevalue(domainname);
}
function init(){
basepath = getbasepath();
loadConfig(basepath);
domainname = getDomainname();
loadConfig(domainname);
ParseConfig();
UpdateNUMBERS();
loadPrevalue(basepath);
loadPrevalue(domainname);
}
init();

View File

@@ -1,8 +1,4 @@
function readconfig_Version(){
return "1.0.0 - 20200910";
}
function SaveConfigToServer(_basepath){
function SaveConfigToServer(_domainname){
// leere Zeilen am Ende löschen
var zw = config_split.length - 1;
while (config_split[zw] == "") {
@@ -15,16 +11,16 @@ function SaveConfigToServer(_basepath){
config_gesamt = config_gesamt + config_split[i] + "\n";
}
FileDeleteOnServer("/config/config.ini", _basepath);
FileDeleteOnServer("/config/config.ini", _domainname);
FileSendContent(config_gesamt, "/config/config.ini", _basepath);
FileSendContent(config_gesamt, "/config/config.ini", _domainname);
}
function UpdateConfig(zw, _index, _enhance, _basepath){
function UpdateConfig(zw, _index, _enhance, _domainname){
var namezw = zw["name"];
FileCopyOnServer("/img_tmp/ref_zw.jpg", namezw, _basepath);
FileCopyOnServer("/img_tmp/ref_zw.jpg", namezw, _domainname);
var namezw = zw["name"].replace(".jpg", "_org.jpg");
FileCopyOnServer("/img_tmp/ref_zw_org.jpg", namezw, _basepath);
FileCopyOnServer("/img_tmp/ref_zw_org.jpg", namezw, _domainname);
}
@@ -35,7 +31,7 @@ function createReader(file) {
image.onload = function(evt) {
var width = this.width;
var height = this.height;
alert (width); // will produce something like 198
//alert (width); // will produce something like 198
};
image.src = evt.target.result;
};
@@ -134,10 +130,10 @@ function getConfig()
}
function loadConfig(_basepath) {
function loadConfig(_domainname) {
var xhttp = new XMLHttpRequest();
try {
url = _basepath + '/fileserver/config/config.ini';
url = _domainname + '/fileserver/config/config.ini';
xhttp.open("GET", url, false);
xhttp.send();
config_gesamt = xhttp.responseText;
@@ -145,7 +141,7 @@ function loadConfig(_basepath) {
}
catch (error)
{
// alert("Deleting Config.ini failed");
// firework.launch('Deleting Config.ini failed!', 'danger', 30000);
}
return true;
}
@@ -162,19 +158,19 @@ function dataURLtoBlob(dataurl) {
return new Blob([u8arr], {type:mime});
}
function FileCopyOnServer(_source, _target, _basepath = ""){
url = _basepath + "/editflow?task=copy&in=" + _source + "&out=" + _target;
function FileCopyOnServer(_source, _target, _domainname = ""){
url = _domainname + "/editflow?task=copy&in=" + _source + "&out=" + _target;
var xhttp = new XMLHttpRequest();
try {
xhttp.open("GET", url, false);
xhttp.send(); }
catch (error)
{
// alert("Deleting Config.ini failed");
// firework.launch('Deleting Config.ini failed!', 'danger', 30000);
}
}
function FileDeleteOnServer(_filename, _basepath = ""){
function FileDeleteOnServer(_filename, _domainname = ""){
var xhttp = new XMLHttpRequest();
var okay = false;
@@ -183,28 +179,28 @@ function FileDeleteOnServer(_filename, _basepath = ""){
if (xhttp.status == 200) {
okay = true;
} else if (xhttp.status == 0) {
// alert("Server closed the connection on delete abruptly!");
// firework.launch('Server closed the connection abruptly!', 'danger', 30000);
// location.reload()
} else {
// alert(xhttp.status + " Error!\n" + xhttp.responseText);
// firework.launch('An error occured: ' + xhttp.responseText, 'danger', 30000);
// location.reload()
}
}
};
try {
var url = _basepath + "/delete" + _filename;
var url = _domainname + "/delete" + _filename;
xhttp.open("POST", url, false);
xhttp.send();
}
catch (error)
{
// alert("Deleting Config.ini failed");
// firework.launch('Deleting Config.ini failed!', 'danger', 30000);
}
return okay;
}
function FileSendContent(_content, _filename, _basepath = ""){
function FileSendContent(_content, _filename, _domainname = ""){
var xhttp = new XMLHttpRequest();
var okay = false;
@@ -213,41 +209,41 @@ function FileSendContent(_content, _filename, _basepath = ""){
if (xhttp.status == 200) {
okay = true;
} else if (xhttp.status == 0) {
alert("Server closed the connection abruptly!");
firework.launch('Server closed the connection abruptly!', 'danger', 30000);
} else {
alert(xhttp.status + " Error!\n" + xhttp.responseText);
firework.launch('An error occured: ' + xhttp.responseText, 'danger', 30000);
}
}
};
try {
upload_path = _basepath + "/upload" + _filename;
upload_path = _domainname + "/upload" + _filename;
xhttp.open("POST", upload_path, false);
xhttp.send(_content);
}
catch (error)
{
// alert("Deleting Config.ini failed");
// firework.launch('Deleting Config.ini failed!', 'danger', 30000);
}
return okay;
}
function SaveCanvasToImage(_canvas, _filename, _delete = true, _basepath = ""){
function SaveCanvasToImage(_canvas, _filename, _delete = true, _domainname = ""){
var JPEG_QUALITY=0.8;
var dataUrl = _canvas.toDataURL('image/jpeg', JPEG_QUALITY);
var rtn = dataURLtoBlob(dataUrl);
if (_delete) {
FileDeleteOnServer(_filename, _basepath);
FileDeleteOnServer(_filename, _domainname);
}
FileSendContent(rtn, _filename, _basepath);
FileSendContent(rtn, _filename, _domainname);
}
function MakeContrastImageZW(zw, _enhance, _basepath){
function MakeContrastImageZW(zw, _enhance, _domainname){
_filename = zw["name"].replace("/config/", "/img_tmp/");
url = _basepath + "/editflow?task=cutref&in=/config/reference.jpg&out=" + _filename + "&x=" + zw["x"] + "&y=" + zw["y"] + "&dx=" + zw["dx"] + "&dy=" + zw["dy"];
url = _domainname + "/editflow?task=cutref&in=/config/reference.jpg&out=" + _filename + "&x=" + zw["x"] + "&y=" + zw["y"] + "&dx=" + zw["dx"] + "&dy=" + zw["dy"];
if (_enhance == true){
url = url + "&enhance=true";
}
@@ -258,26 +254,26 @@ function MakeContrastImageZW(zw, _enhance, _basepath){
xhttp.send(); }
catch (error)
{
// alert("Deleting Config.ini failed");
// firework.launch('Deleting Config.ini failed!', 'danger', 30000);
}
}
function MakeRefZW(zw, _basepath){
function MakeRefZW(zw, _domainname){
_filetarget = zw["name"].replace("/config/", "/img_tmp/");
_filetarget = _filetarget.replace(".jpg", "_org.jpg");
url = _basepath + "/editflow?task=cutref&in=/config/reference.jpg&out="+_filetarget+"&x=" + zw["x"] + "&y=" + zw["y"] + "&dx=" + zw["dx"] + "&dy=" + zw["dy"];
url = _domainname + "/editflow?task=cutref&in=/config/reference.jpg&out="+_filetarget+"&x=" + zw["x"] + "&y=" + zw["y"] + "&dx=" + zw["dx"] + "&dy=" + zw["dy"];
var xhttp = new XMLHttpRequest();
try {
xhttp.open("GET", url, false);
xhttp.send(); }
catch (error)
{
// alert("Deleting Config.ini failed");
// firework.launch('Deleting Config.ini failed!', 'danger', 30000);
}
_filetarget2 = zw["name"].replace("/config/", "/img_tmp/");
// _filetarget2 = _filetarget2.replace(".jpg", "_org.jpg");
FileCopyOnServer(_filetarget, _filetarget2, _basepath);
FileCopyOnServer(_filetarget, _filetarget2, _domainname);
}

View File

@@ -1,7 +1,3 @@
function readconfig_Version(){
return "1.0.0 - 20200910";
}
var config_gesamt = "";
var config_split = [];
var param = [];
@@ -12,96 +8,94 @@ var REFERENCES = new Array(0);
function getNUMBERSList() {
_basepath = getbasepath();
var datalist = "";
_domainname = getDomainname();
var namenumberslist = "";
var xhttp = new XMLHttpRequest();
xhttp.addEventListener('load', function(event) {
if (xhttp.status >= 200 && xhttp.status < 300) {
datalist = xhttp.responseText;
} else {
console.warn(request.statusText, request.responseText);
}
});
if (xhttp.status >= 200 && xhttp.status < 300) {
namenumberslist = xhttp.responseText;
} else {
console.warn(request.statusText, request.responseText);
}
});
try {
url = _basepath + '/editflow?task=namenumbers';
xhttp.open("GET", url, false);
xhttp.send();
try {
url = _domainname + '/editflow?task=namenumbers';
xhttp.open("GET", url, false);
xhttp.send();
}
catch (error)
{
// alert("Loading Hostname failed");
}
}
catch (error)
{
alert("Loading Hostname failed");
}
namenumberslist = namenumberslist.split("\t");
// namenumberslist.pop();
datalist = datalist.split("\t");
// datalist.pop();
return datalist;
}
return namenumberslist;
}
function getDATAList() {
_basepath = getbasepath();
tflitelist = "";
_domainname = getDomainname();
datalist = "";
var xhttp = new XMLHttpRequest();
xhttp.addEventListener('load', function(event) {
if (xhttp.status >= 200 && xhttp.status < 300) {
tflitelist = xhttp.responseText;
} else {
console.warn(request.statusText, request.responseText);
}
});
if (xhttp.status >= 200 && xhttp.status < 300) {
datalist = xhttp.responseText;
} else {
console.warn(request.statusText, request.responseText);
}
});
try {
url = _basepath + '/editflow?task=data';
xhttp.open("GET", url, false);
xhttp.send();
}
catch (error)
{
try {
url = _domainname + '/editflow?task=data';
xhttp.open("GET", url, false);
xhttp.send();
}
catch (error)
{
// alert("Loading Hostname failed");
}
}
tflitelist = tflitelist.split("\t");
tflitelist.pop();
datalist = datalist.split("\t");
datalist.pop();
datalist.sort();
return tflitelist;
}
return datalist;
}
function getTFLITEList() {
_basepath = getbasepath();
_domainname = getDomainname();
tflitelist = "";
var xhttp = new XMLHttpRequest();
xhttp.addEventListener('load', function(event) {
if (xhttp.status >= 200 && xhttp.status < 300) {
tflitelist = xhttp.responseText;
} else {
console.warn(request.statusText, request.responseText);
}
});
if (xhttp.status >= 200 && xhttp.status < 300) {
tflitelist = xhttp.responseText;
} else {
console.warn(request.statusText, request.responseText);
}
});
try {
url = _basepath + '/editflow?task=tflite';
xhttp.open("GET", url, false);
xhttp.send();
}
catch (error)
{
try {
url = _domainname + '/editflow?task=tflite';
xhttp.open("GET", url, false);
xhttp.send();
}
catch (error)
{
// alert("Loading Hostname failed");
}
}
tflitelist = tflitelist.split("\t");
tflitelist.pop();
tflitelist = tflitelist.split("\t");
tflitelist.pop();
return tflitelist;
}
return tflitelist;
}
function ParseConfig() {
@@ -119,6 +113,7 @@ function ParseConfig() {
ParamAddValue(param, catname, "LogImageLocation");
ParamAddValue(param, catname, "WaitBeforeTakingPicture");
ParamAddValue(param, catname, "LogfileRetentionInDays");
ParamAddValue(param, catname, "Demo");
ParamAddValue(param, catname, "Brightness");
ParamAddValue(param, catname, "Contrast");
ParamAddValue(param, catname, "Saturation");
@@ -167,7 +162,7 @@ function ParseConfig() {
ParamAddValue(param, catname, "AnalogDigitalTransitionStart", 1, true);
ParamAddValue(param, catname, "PreValueUse");
ParamAddValue(param, catname, "PreValueAgeStartup");
ParamAddValue(param, catname, "AllowNegativeRates");
ParamAddValue(param, catname, "AllowNegativeRates", 1, true);
ParamAddValue(param, catname, "MaxRateValue", 1, true);
ParamAddValue(param, catname, "MaxRateType", 1, true);
ParamAddValue(param, catname, "ExtendedResolution", 1, true);
@@ -256,6 +251,7 @@ function ParseConfig() {
ParamAddValue(param, catname, "TimeServer");
ParamAddValue(param, catname, "AutoAdjustSummertime");
ParamAddValue(param, catname, "Hostname");
ParamAddValue(param, catname, "RSSIThreashold");
ParamAddValue(param, catname, "SetupMode");
@@ -560,7 +556,7 @@ function isCommented(input)
return [isComment, input];
}
function SaveConfigToServer(_basepath){
function SaveConfigToServer(_domainname){
// leere Zeilen am Ende löschen
var zw = config_split.length - 1;
while (config_split[zw] == "") {
@@ -573,8 +569,8 @@ function SaveConfigToServer(_basepath){
config_gesamt = config_gesamt + config_split[i] + "\n";
}
FileDeleteOnServer("/config/config.ini", _basepath);
FileSendContent(config_gesamt, "/config/config.ini", _basepath);
FileDeleteOnServer("/config/config.ini", _domainname);
FileSendContent(config_gesamt, "/config/config.ini", _domainname);
}
function getConfig() {
@@ -663,19 +659,19 @@ function getNUMBERS(_name, _type, _create = true)
function CopyReferenceToImgTmp(_basepath)
function CopyReferenceToImgTmp(_domainname)
{
for (index = 0; index < 2; ++index)
{
_filenamevon = REFERENCES[index]["name"];
_filenamenach = _filenamevon.replace("/config/", "/img_tmp/");
FileDeleteOnServer(_filenamenach, _basepath);
FileCopyOnServer(_filenamevon, _filenamenach, _basepath);
FileDeleteOnServer(_filenamenach, _domainname);
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
_filenamevon = _filenamevon.replace(".jpg", "_org.jpg");
_filenamenach = _filenamenach.replace(".jpg", "_org.jpg");
FileDeleteOnServer(_filenamenach, _basepath);
FileCopyOnServer(_filenamevon, _filenamenach, _basepath);
FileDeleteOnServer(_filenamenach, _domainname);
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
}
}
@@ -684,18 +680,18 @@ function GetReferencesInfo(){
}
function UpdateConfigReference(_basepath){
function UpdateConfigReference(_domainname){
for (var index = 0; index < 2; ++index)
{
_filenamenach = REFERENCES[index]["name"];
_filenamevon = _filenamenach.replace("/config/", "/img_tmp/");
FileDeleteOnServer(_filenamenach, _basepath);
FileCopyOnServer(_filenamevon, _filenamenach, _basepath);
FileDeleteOnServer(_filenamenach, _domainname);
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
_filenamenach = _filenamenach.replace(".jpg", "_org.jpg");
_filenamevon = _filenamevon.replace(".jpg", "_org.jpg");
FileDeleteOnServer(_filenamenach, _basepath);
FileCopyOnServer(_filenamevon, _filenamenach, _basepath);
FileDeleteOnServer(_filenamenach, _domainname);
FileCopyOnServer(_filenamevon, _filenamenach, _domainname);
}
}

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>Reboot</title>
<meta charset="utf-8">
@@ -18,6 +18,7 @@ p {font-size: 1em;}
}
</style>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
</head>
<body style="font-family: arial; padding: 0px 10px;">
@@ -35,7 +36,7 @@ p {font-size: 1em;}
<script>
function doReboot() {
// if (confirm("Are you sure you want to reboot the ESP32?")) {
var stringota = "/reboot";
var stringota = getDomainname() + "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html style="width: fit-content">
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -29,7 +29,7 @@ p {font-size: 1em;}
<body style="font-family: arial">
<table style="border: none">
<tr><td style="padding-right: 10px;"><img src="favicon.ico"></td>
<tr><td style="padding-right: 10px;"><img src="favicon.ico?v=$COMMIT_HASH"></td>
<td><h1 id="id_title"> Digitizer - Initial Setup</h1>
<h2>An ESP32 all inclusive neural network recognition system for meter digitalization</h2>
</td></tr>
@@ -40,7 +40,7 @@ p {font-size: 1em;}
<td>
<button class="button" id="previous" name="previous" onclick="clickPrevious()">Previous</button>
<button class="button" id="next" name="next" onclick="clickNext()">Next</button>
If you need help. have a look on the <a href=https://github.com/jomjol/AI-on-the-edge-device/wiki target=_blank>Wiki</a> and the <a href=https://github.com/jomjol/AI-on-the-edge-device/discussions target=_blank>Discussion</a> pages.
If you need support, have a look to the <a href=https://jomjol.github.io/AI-on-the-edge-device-docs target=_blank>documenation</a> or the <a href=https://github.com/jomjol/AI-on-the-edge-device/discussions target=_blank>discussion</a> pages.
</td>
</tr>
</table>
@@ -58,9 +58,10 @@ p {font-size: 1em;}
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript">
var canvas = document.getElementById('canvas'),
basepath = "http://192.168.178.22";
domainname = getDomainname();
aktstatu = 0;
function clickNext() {
@@ -82,53 +83,53 @@ function clickPrevious() {
function LoadStep(){
switch (aktstatu) {
case 0:
document.getElementById('maincontent').src = '/edit_explain_0.html';
document.getElementById('maincontent').src = '/edit_explain_0.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "none";
document.getElementById("previous").disabled = true;
document.getElementById("next").disabled = false;
break;
case 1:
document.getElementById('maincontent').src = '/edit_reference.html';
document.getElementById('explaincontent').src = '/explain_1.html';
document.getElementById('maincontent').src = '/edit_reference.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = '/explain_1.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = false;
break;
case 2:
document.getElementById('maincontent').src = '/edit_alignment.html';
document.getElementById('explaincontent').src = '/explain_2.html';
document.getElementById('maincontent').src = '/edit_alignment.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = '/explain_2.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = false;
break;
case 3:
document.getElementById('maincontent').src = '/edit_digits.html';
document.getElementById('explaincontent').src = '/explain_3.html';
document.getElementById('maincontent').src = '/edit_digits.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = '/explain_3.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = false;
break;
case 4:
document.getElementById('maincontent').src = '/edit_analog.html';
document.getElementById('explaincontent').src = '/explain_4.html';
document.getElementById('maincontent').src = '/edit_analog.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = '/explain_4.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = false;
break;
case 5:
document.getElementById('maincontent').src = '/edit_config_param.html?InitialSetup=true';
document.getElementById('explaincontent').src = '/explain_5.html';
document.getElementById('maincontent').src = '/edit_config_param.html?v=$COMMIT_HASH?InitialSetup=true';
document.getElementById('explaincontent').src = '/explain_5.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = false;
break;
case 6:
document.getElementById('maincontent').src = '/edit_explain_6.html';
document.getElementById('explaincontent').src = '/explain_6.html';
document.getElementById('maincontent').src = '/edit_explain_6.html?v=$COMMIT_HASH';
document.getElementById('explaincontent').src = '/explain_6.html?v=$COMMIT_HASH';
document.getElementById('h_iframe_explain').style.display = "none";
document.getElementById("previous").disabled = false;
document.getElementById("next").disabled = true;

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico?v=$COMMIT_HASH" type="image/x-icon">
<meta charset="utf-8">
</head>
@@ -10,13 +10,13 @@
<div id="value"></div>
</html>
<script type="text/javascript" src="./gethost.js"></script>
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
<script type="text/javascript">
var basepath = "http://192.168.178.22";
var domainname = getDomainname();
function testinit(){
basepath = getbasepath();
url = basepath + '/value?all=true';
domainname = getDomainname();
url = domainname + '/value?all=true';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {

542
sd-card/html/timezones.html Normal file
View File

@@ -0,0 +1,542 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
box-sizing: border-box;
}
#myInput {
background-image: url('/css/searchicon.png');
background-position: 10px 10px;
background-repeat: no-repeat;
width: 100%;
font-size: 16px;
padding: 12px 20px 12px 40px;
border: 1px solid #ddd;
margin-bottom: 12px;
}
#data {
border-collapse: collapse;
width: 100%;
border: 1px solid #ddd;
font-size: 18px;
}
#data th, #data td {
text-align: left;
padding: 12px;
}
#data tr {
border-bottom: 1px solid #ddd;
}
#data tr.header, #data tr:hover {
background-color: #f1f1f1;
}
</style>
</head>
<body>
<h2>Timezones</h2>
<input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for your region..." title="Type in a region">
<table id="data">
<tr class="header">
<th>Region</th>
<th>Code</th>
</tr>
<tr><td>Africa/Abidjan</td><td>GMT0</td></tr>
<tr><td>Africa/Accra</td><td>GMT0</td></tr>
<tr><td>Africa/Addis_Ababa</td><td>EAT-3</td></tr>
<tr><td>Africa/Algiers</td><td>CET-1</td></tr>
<tr><td>Africa/Asmara</td><td>EAT-3</td></tr>
<tr><td>Africa/Bamako</td><td>GMT0</td></tr>
<tr><td>Africa/Bangui</td><td>WAT-1</td></tr>
<tr><td>Africa/Banjul</td><td>GMT0</td></tr>
<tr><td>Africa/Bissau</td><td>GMT0</td></tr>
<tr><td>Africa/Blantyre</td><td>CAT-2</td></tr>
<tr><td>Africa/Brazzaville</td><td>WAT-1</td></tr>
<tr><td>Africa/Bujumbura</td><td>CAT-2</td></tr>
<tr><td>Africa/Cairo</td><td>EET-2</td></tr>
<tr><td>Africa/Casablanca</td><td>&lt;+01>-1</td></tr>
<tr><td>Africa/Ceuta</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Africa/Conakry</td><td>GMT0</td></tr>
<tr><td>Africa/Dakar</td><td>GMT0</td></tr>
<tr><td>Africa/Dar_es_Salaam</td><td>EAT-3</td></tr>
<tr><td>Africa/Djibouti</td><td>EAT-3</td></tr>
<tr><td>Africa/Douala</td><td>WAT-1</td></tr>
<tr><td>Africa/El_Aaiun</td><td>&lt;+01>-1</td></tr>
<tr><td>Africa/Freetown</td><td>GMT0</td></tr>
<tr><td>Africa/Gaborone</td><td>CAT-2</td></tr>
<tr><td>Africa/Harare</td><td>CAT-2</td></tr>
<tr><td>Africa/Johannesburg</td><td>SAST-2</td></tr>
<tr><td>Africa/Juba</td><td>CAT-2</td></tr>
<tr><td>Africa/Kampala</td><td>EAT-3</td></tr>
<tr><td>Africa/Khartoum</td><td>CAT-2</td></tr>
<tr><td>Africa/Kigali</td><td>CAT-2</td></tr>
<tr><td>Africa/Kinshasa</td><td>WAT-1</td></tr>
<tr><td>Africa/Lagos</td><td>WAT-1</td></tr>
<tr><td>Africa/Libreville</td><td>WAT-1</td></tr>
<tr><td>Africa/Lome</td><td>GMT0</td></tr>
<tr><td>Africa/Luanda</td><td>WAT-1</td></tr>
<tr><td>Africa/Lubumbashi</td><td>CAT-2</td></tr>
<tr><td>Africa/Lusaka</td><td>CAT-2</td></tr>
<tr><td>Africa/Malabo</td><td>WAT-1</td></tr>
<tr><td>Africa/Maputo</td><td>CAT-2</td></tr>
<tr><td>Africa/Maseru</td><td>SAST-2</td></tr>
<tr><td>Africa/Mbabane</td><td>SAST-2</td></tr>
<tr><td>Africa/Mogadishu</td><td>EAT-3</td></tr>
<tr><td>Africa/Monrovia</td><td>GMT0</td></tr>
<tr><td>Africa/Nairobi</td><td>EAT-3</td></tr>
<tr><td>Africa/Ndjamena</td><td>WAT-1</td></tr>
<tr><td>Africa/Niamey</td><td>WAT-1</td></tr>
<tr><td>Africa/Nouakchott</td><td>GMT0</td></tr>
<tr><td>Africa/Ouagadougou</td><td>GMT0</td></tr>
<tr><td>Africa/Porto-Novo</td><td>WAT-1</td></tr>
<tr><td>Africa/Sao_Tome</td><td>GMT0</td></tr>
<tr><td>Africa/Tripoli</td><td>EET-2</td></tr>
<tr><td>Africa/Tunis</td><td>CET-1</td></tr>
<tr><td>Africa/Windhoek</td><td>CAT-2</td></tr>
<tr><td>America/Adak</td><td>HST10HDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Anchorage</td><td>AKST9AKDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Anguilla</td><td>AST4</td></tr>
<tr><td>America/Antigua</td><td>AST4</td></tr>
<tr><td>America/Araguaina</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/Buenos_Aires</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/Catamarca</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/Cordoba</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/Jujuy</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/La_Rioja</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/Mendoza</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/Rio_Gallegos</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/Salta</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/San_Juan</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/San_Luis</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/Tucuman</td><td>&lt;-03>3</td></tr>
<tr><td>America/Argentina/Ushuaia</td><td>&lt;-03>3</td></tr>
<tr><td>America/Aruba</td><td>AST4</td></tr>
<tr><td>America/Asuncion</td><td>&lt;-04>4&lt;-03>,M10.1.0/0,M3.4.0/0</td></tr>
<tr><td>America/Atikokan</td><td>EST5</td></tr>
<tr><td>America/Bahia</td><td>&lt;-03>3</td></tr>
<tr><td>America/Bahia_Banderas</td><td>CST6CDT,M4.1.0,M10.5.0</td></tr>
<tr><td>America/Barbados</td><td>AST4</td></tr>
<tr><td>America/Belem</td><td>&lt;-03>3</td></tr>
<tr><td>America/Belize</td><td>CST6</td></tr>
<tr><td>America/Blanc-Sablon</td><td>AST4</td></tr>
<tr><td>America/Boa_Vista</td><td>&lt;-04>4</td></tr>
<tr><td>America/Bogota</td><td>&lt;-05>5</td></tr>
<tr><td>America/Boise</td><td>MST7MDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Cambridge_Bay</td><td>MST7MDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Campo_Grande</td><td>&lt;-04>4</td></tr>
<tr><td>America/Cancun</td><td>EST5</td></tr>
<tr><td>America/Caracas</td><td>&lt;-04>4</td></tr>
<tr><td>America/Cayenne</td><td>&lt;-03>3</td></tr>
<tr><td>America/Cayman</td><td>EST5</td></tr>
<tr><td>America/Chicago</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Chihuahua</td><td>MST7MDT,M4.1.0,M10.5.0</td></tr>
<tr><td>America/Costa_Rica</td><td>CST6</td></tr>
<tr><td>America/Creston</td><td>MST7</td></tr>
<tr><td>America/Cuiaba</td><td>&lt;-04>4</td></tr>
<tr><td>America/Curacao</td><td>AST4</td></tr>
<tr><td>America/Danmarkshavn</td><td>GMT0</td></tr>
<tr><td>America/Dawson</td><td>MST7</td></tr>
<tr><td>America/Dawson_Creek</td><td>MST7</td></tr>
<tr><td>America/Denver</td><td>MST7MDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Detroit</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Dominica</td><td>AST4</td></tr>
<tr><td>America/Edmonton</td><td>MST7MDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Eirunepe</td><td>&lt;-05>5</td></tr>
<tr><td>America/El_Salvador</td><td>CST6</td></tr>
<tr><td>America/Fort_Nelson</td><td>MST7</td></tr>
<tr><td>America/Fortaleza</td><td>&lt;-03>3</td></tr>
<tr><td>America/Glace_Bay</td><td>AST4ADT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Godthab</td><td>&lt;-03>3&lt;-02>,M3.5.0/-2,M10.5.0/-1</td></tr>
<tr><td>America/Goose_Bay</td><td>AST4ADT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Grand_Turk</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Grenada</td><td>AST4</td></tr>
<tr><td>America/Guadeloupe</td><td>AST4</td></tr>
<tr><td>America/Guatemala</td><td>CST6</td></tr>
<tr><td>America/Guayaquil</td><td>&lt;-05>5</td></tr>
<tr><td>America/Guyana</td><td>&lt;-04>4</td></tr>
<tr><td>America/Halifax</td><td>AST4ADT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Havana</td><td>CST5CDT,M3.2.0/0,M11.1.0/1</td></tr>
<tr><td>America/Hermosillo</td><td>MST7</td></tr>
<tr><td>America/Indiana/Indianapolis</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Indiana/Knox</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Indiana/Marengo</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Indiana/Petersburg</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Indiana/Tell_City</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Indiana/Vevay</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Indiana/Vincennes</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Indiana/Winamac</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Inuvik</td><td>MST7MDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Iqaluit</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Jamaica</td><td>EST5</td></tr>
<tr><td>America/Juneau</td><td>AKST9AKDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Kentucky/Louisville</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Kentucky/Monticello</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Kralendijk</td><td>AST4</td></tr>
<tr><td>America/La_Paz</td><td>&lt;-04>4</td></tr>
<tr><td>America/Lima</td><td>&lt;-05>5</td></tr>
<tr><td>America/Los_Angeles</td><td>PST8PDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Lower_Princes</td><td>AST4</td></tr>
<tr><td>America/Maceio</td><td>&lt;-03>3</td></tr>
<tr><td>America/Managua</td><td>CST6</td></tr>
<tr><td>America/Manaus</td><td>&lt;-04>4</td></tr>
<tr><td>America/Marigot</td><td>AST4</td></tr>
<tr><td>America/Martinique</td><td>AST4</td></tr>
<tr><td>America/Matamoros</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Mazatlan</td><td>MST7MDT,M4.1.0,M10.5.0</td></tr>
<tr><td>America/Menominee</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Merida</td><td>CST6CDT,M4.1.0,M10.5.0</td></tr>
<tr><td>America/Metlakatla</td><td>AKST9AKDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Mexico_City</td><td>CST6CDT,M4.1.0,M10.5.0</td></tr>
<tr><td>America/Miquelon</td><td>&lt;-03>3&lt;-02>,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Moncton</td><td>AST4ADT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Monterrey</td><td>CST6CDT,M4.1.0,M10.5.0</td></tr>
<tr><td>America/Montevideo</td><td>&lt;-03>3</td></tr>
<tr><td>America/Montreal</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Montserrat</td><td>AST4</td></tr>
<tr><td>America/Nassau</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/New_York</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Nipigon</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Nome</td><td>AKST9AKDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Noronha</td><td>&lt;-02>2</td></tr>
<tr><td>America/North_Dakota/Beulah</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/North_Dakota/Center</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/North_Dakota/New_Salem</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Nuuk</td><td>&lt;-03>3&lt;-02>,M3.5.0/-2,M10.5.0/-1</td></tr>
<tr><td>America/Ojinaga</td><td>MST7MDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Panama</td><td>EST5</td></tr>
<tr><td>America/Pangnirtung</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Paramaribo</td><td>&lt;-03>3</td></tr>
<tr><td>America/Phoenix</td><td>MST7</td></tr>
<tr><td>America/Port_of_Spain</td><td>AST4</td></tr>
<tr><td>America/Port-au-Prince</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Porto_Velho</td><td>&lt;-04>4</td></tr>
<tr><td>America/Puerto_Rico</td><td>AST4</td></tr>
<tr><td>America/Punta_Arenas</td><td>&lt;-03>3</td></tr>
<tr><td>America/Rainy_River</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Rankin_Inlet</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Recife</td><td>&lt;-03>3</td></tr>
<tr><td>America/Regina</td><td>CST6</td></tr>
<tr><td>America/Resolute</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Rio_Branco</td><td>&lt;-05>5</td></tr>
<tr><td>America/Santarem</td><td>&lt;-03>3</td></tr>
<tr><td>America/Santiago</td><td>&lt;-04>4&lt;-03>,M9.1.6/24,M4.1.6/24</td></tr>
<tr><td>America/Santo_Domingo</td><td>AST4</td></tr>
<tr><td>America/Sao_Paulo</td><td>&lt;-03>3</td></tr>
<tr><td>America/Scoresbysund</td><td>&lt;-01>1&lt;+00>,M3.5.0/0,M10.5.0/1</td></tr>
<tr><td>America/Sitka</td><td>AKST9AKDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/St_Barthelemy</td><td>AST4</td></tr>
<tr><td>America/St_Johns</td><td>NST3:30NDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/St_Kitts</td><td>AST4</td></tr>
<tr><td>America/St_Lucia</td><td>AST4</td></tr>
<tr><td>America/St_Thomas</td><td>AST4</td></tr>
<tr><td>America/St_Vincent</td><td>AST4</td></tr>
<tr><td>America/Swift_Current</td><td>CST6</td></tr>
<tr><td>America/Tegucigalpa</td><td>CST6</td></tr>
<tr><td>America/Thule</td><td>AST4ADT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Thunder_Bay</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Tijuana</td><td>PST8PDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Toronto</td><td>EST5EDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Tortola</td><td>AST4</td></tr>
<tr><td>America/Vancouver</td><td>PST8PDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Whitehorse</td><td>MST7</td></tr>
<tr><td>America/Winnipeg</td><td>CST6CDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Yakutat</td><td>AKST9AKDT,M3.2.0,M11.1.0</td></tr>
<tr><td>America/Yellowknife</td><td>MST7MDT,M3.2.0,M11.1.0</td></tr>
<tr><td>Antarctica/Casey</td><td>&lt;+11>-11</td></tr>
<tr><td>Antarctica/Davis</td><td>&lt;+07>-7</td></tr>
<tr><td>Antarctica/DumontDUrville</td><td>&lt;+10>-10</td></tr>
<tr><td>Antarctica/Macquarie</td><td>AEST-10AEDT,M10.1.0,M4.1.0/3</td></tr>
<tr><td>Antarctica/Mawson</td><td>&lt;+05>-5</td></tr>
<tr><td>Antarctica/McMurdo</td><td>NZST-12NZDT,M9.5.0,M4.1.0/3</td></tr>
<tr><td>Antarctica/Palmer</td><td>&lt;-03>3</td></tr>
<tr><td>Antarctica/Rothera</td><td>&lt;-03>3</td></tr>
<tr><td>Antarctica/Syowa</td><td>&lt;+03>-3</td></tr>
<tr><td>Antarctica/Troll</td><td>&lt;+00>0&lt;+02>-2,M3.5.0/1,M10.5.0/3</td></tr>
<tr><td>Antarctica/Vostok</td><td>&lt;+06>-6</td></tr>
<tr><td>Arctic/Longyearbyen</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Asia/Aden</td><td>&lt;+03>-3</td></tr>
<tr><td>Asia/Almaty</td><td>&lt;+06>-6</td></tr>
<tr><td>Asia/Amman</td><td>EET-2EEST,M2.5.4/24,M10.5.5/1</td></tr>
<tr><td>Asia/Anadyr</td><td>&lt;+12>-12</td></tr>
<tr><td>Asia/Aqtau</td><td>&lt;+05>-5</td></tr>
<tr><td>Asia/Aqtobe</td><td>&lt;+05>-5</td></tr>
<tr><td>Asia/Ashgabat</td><td>&lt;+05>-5</td></tr>
<tr><td>Asia/Atyrau</td><td>&lt;+05>-5</td></tr>
<tr><td>Asia/Baghdad</td><td>&lt;+03>-3</td></tr>
<tr><td>Asia/Bahrain</td><td>&lt;+03>-3</td></tr>
<tr><td>Asia/Baku</td><td>&lt;+04>-4</td></tr>
<tr><td>Asia/Bangkok</td><td>&lt;+07>-7</td></tr>
<tr><td>Asia/Barnaul</td><td>&lt;+07>-7</td></tr>
<tr><td>Asia/Beirut</td><td>EET-2EEST,M3.5.0/0,M10.5.0/0</td></tr>
<tr><td>Asia/Bishkek</td><td>&lt;+06>-6</td></tr>
<tr><td>Asia/Brunei</td><td>&lt;+08>-8</td></tr>
<tr><td>Asia/Chita</td><td>&lt;+09>-9</td></tr>
<tr><td>Asia/Choibalsan</td><td>&lt;+08>-8</td></tr>
<tr><td>Asia/Colombo</td><td>&lt;+0530>-5:30</td></tr>
<tr><td>Asia/Damascus</td><td>EET-2EEST,M3.5.5/0,M10.5.5/0</td></tr>
<tr><td>Asia/Dhaka</td><td>&lt;+06>-6</td></tr>
<tr><td>Asia/Dili</td><td>&lt;+09>-9</td></tr>
<tr><td>Asia/Dubai</td><td>&lt;+04>-4</td></tr>
<tr><td>Asia/Dushanbe</td><td>&lt;+05>-5</td></tr>
<tr><td>Asia/Famagusta</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Asia/Gaza</td><td>EET-2EEST,M3.4.4/48,M10.5.5/1</td></tr>
<tr><td>Asia/Hebron</td><td>EET-2EEST,M3.4.4/48,M10.5.5/1</td></tr>
<tr><td>Asia/Ho_Chi_Minh</td><td>&lt;+07>-7</td></tr>
<tr><td>Asia/Hong_Kong</td><td>HKT-8</td></tr>
<tr><td>Asia/Hovd</td><td>&lt;+07>-7</td></tr>
<tr><td>Asia/Irkutsk</td><td>&lt;+08>-8</td></tr>
<tr><td>Asia/Jakarta</td><td>WIB-7</td></tr>
<tr><td>Asia/Jayapura</td><td>WIT-9</td></tr>
<tr><td>Asia/Jerusalem</td><td>IST-2IDT,M3.4.4/26,M10.5.0</td></tr>
<tr><td>Asia/Kabul</td><td>&lt;+0430>-4:30</td></tr>
<tr><td>Asia/Kamchatka</td><td>&lt;+12>-12</td></tr>
<tr><td>Asia/Karachi</td><td>PKT-5</td></tr>
<tr><td>Asia/Kathmandu</td><td>&lt;+0545>-5:45</td></tr>
<tr><td>Asia/Khandyga</td><td>&lt;+09>-9</td></tr>
<tr><td>Asia/Kolkata</td><td>IST-5:30</td></tr>
<tr><td>Asia/Krasnoyarsk</td><td>&lt;+07>-7</td></tr>
<tr><td>Asia/Kuala_Lumpur</td><td>&lt;+08>-8</td></tr>
<tr><td>Asia/Kuching</td><td>&lt;+08>-8</td></tr>
<tr><td>Asia/Kuwait</td><td>&lt;+03>-3</td></tr>
<tr><td>Asia/Macau</td><td>CST-8</td></tr>
<tr><td>Asia/Magadan</td><td>&lt;+11>-11</td></tr>
<tr><td>Asia/Makassar</td><td>WITA-8</td></tr>
<tr><td>Asia/Manila</td><td>PST-8</td></tr>
<tr><td>Asia/Muscat</td><td>&lt;+04>-4</td></tr>
<tr><td>Asia/Nicosia</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Asia/Novokuznetsk</td><td>&lt;+07>-7</td></tr>
<tr><td>Asia/Novosibirsk</td><td>&lt;+07>-7</td></tr>
<tr><td>Asia/Omsk</td><td>&lt;+06>-6</td></tr>
<tr><td>Asia/Oral</td><td>&lt;+05>-5</td></tr>
<tr><td>Asia/Phnom_Penh</td><td>&lt;+07>-7</td></tr>
<tr><td>Asia/Pontianak</td><td>WIB-7</td></tr>
<tr><td>Asia/Pyongyang</td><td>KST-9</td></tr>
<tr><td>Asia/Qatar</td><td>&lt;+03>-3</td></tr>
<tr><td>Asia/Qyzylorda</td><td>&lt;+05>-5</td></tr>
<tr><td>Asia/Riyadh</td><td>&lt;+03>-3</td></tr>
<tr><td>Asia/Sakhalin</td><td>&lt;+11>-11</td></tr>
<tr><td>Asia/Samarkand</td><td>&lt;+05>-5</td></tr>
<tr><td>Asia/Seoul</td><td>KST-9</td></tr>
<tr><td>Asia/Shanghai</td><td>CST-8</td></tr>
<tr><td>Asia/Singapore</td><td>&lt;+08>-8</td></tr>
<tr><td>Asia/Srednekolymsk</td><td>&lt;+11>-11</td></tr>
<tr><td>Asia/Taipei</td><td>CST-8</td></tr>
<tr><td>Asia/Tashkent</td><td>&lt;+05>-5</td></tr>
<tr><td>Asia/Tbilisi</td><td>&lt;+04>-4</td></tr>
<tr><td>Asia/Tehran</td><td>&lt;+0330>-3:30&lt;+0430>,J79/24,J263/24</td></tr>
<tr><td>Asia/Thimphu</td><td>&lt;+06>-6</td></tr>
<tr><td>Asia/Tokyo</td><td>JST-9</td></tr>
<tr><td>Asia/Tomsk</td><td>&lt;+07>-7</td></tr>
<tr><td>Asia/Ulaanbaatar</td><td>&lt;+08>-8</td></tr>
<tr><td>Asia/Urumqi</td><td>&lt;+06>-6</td></tr>
<tr><td>Asia/Ust-Nera</td><td>&lt;+10>-10</td></tr>
<tr><td>Asia/Vientiane</td><td>&lt;+07>-7</td></tr>
<tr><td>Asia/Vladivostok</td><td>&lt;+10>-10</td></tr>
<tr><td>Asia/Yakutsk</td><td>&lt;+09>-9</td></tr>
<tr><td>Asia/Yangon</td><td>&lt;+0630>-6:30</td></tr>
<tr><td>Asia/Yekaterinburg</td><td>&lt;+05>-5</td></tr>
<tr><td>Asia/Yerevan</td><td>&lt;+04>-4</td></tr>
<tr><td>Atlantic/Azores</td><td>&lt;-01>1&lt;+00>,M3.5.0/0,M10.5.0/1</td></tr>
<tr><td>Atlantic/Bermuda</td><td>AST4ADT,M3.2.0,M11.1.0</td></tr>
<tr><td>Atlantic/Canary</td><td>WET0WEST,M3.5.0/1,M10.5.0</td></tr>
<tr><td>Atlantic/Cape_Verde</td><td>&lt;-01>1</td></tr>
<tr><td>Atlantic/Faroe</td><td>WET0WEST,M3.5.0/1,M10.5.0</td></tr>
<tr><td>Atlantic/Madeira</td><td>WET0WEST,M3.5.0/1,M10.5.0</td></tr>
<tr><td>Atlantic/Reykjavik</td><td>GMT0</td></tr>
<tr><td>Atlantic/South_Georgia</td><td>&lt;-02>2</td></tr>
<tr><td>Atlantic/St_Helena</td><td>GMT0</td></tr>
<tr><td>Atlantic/Stanley</td><td>&lt;-03>3</td></tr>
<tr><td>Australia/Adelaide</td><td>ACST-9:30ACDT,M10.1.0,M4.1.0/3</td></tr>
<tr><td>Australia/Brisbane</td><td>AEST-10</td></tr>
<tr><td>Australia/Broken_Hill</td><td>ACST-9:30ACDT,M10.1.0,M4.1.0/3</td></tr>
<tr><td>Australia/Currie</td><td>AEST-10AEDT,M10.1.0,M4.1.0/3</td></tr>
<tr><td>Australia/Darwin</td><td>ACST-9:30</td></tr>
<tr><td>Australia/Eucla</td><td>&lt;+0845>-8:45</td></tr>
<tr><td>Australia/Hobart</td><td>AEST-10AEDT,M10.1.0,M4.1.0/3</td></tr>
<tr><td>Australia/Lindeman</td><td>AEST-10</td></tr>
<tr><td>Australia/Lord_Howe</td><td>&lt;+1030>-10:30&lt;+11>-11,M10.1.0,M4.1.0</td></tr>
<tr><td>Australia/Melbourne</td><td>AEST-10AEDT,M10.1.0,M4.1.0/3</td></tr>
<tr><td>Australia/Perth</td><td>AWST-8</td></tr>
<tr><td>Australia/Sydney</td><td>AEST-10AEDT,M10.1.0,M4.1.0/3</td></tr>
<tr><td>Etc/GMT</td><td>GMT0</td></tr>
<tr><td>Etc/GMT-0</td><td>GMT0</td></tr>
<tr><td>Etc/GMT-1</td><td>&lt;+01>-1</td></tr>
<tr><td>Etc/GMT-10</td><td>&lt;+10>-10</td></tr>
<tr><td>Etc/GMT-11</td><td>&lt;+11>-11</td></tr>
<tr><td>Etc/GMT-12</td><td>&lt;+12>-12</td></tr>
<tr><td>Etc/GMT-13</td><td>&lt;+13>-13</td></tr>
<tr><td>Etc/GMT-14</td><td>&lt;+14>-14</td></tr>
<tr><td>Etc/GMT-2</td><td>&lt;+02>-2</td></tr>
<tr><td>Etc/GMT-3</td><td>&lt;+03>-3</td></tr>
<tr><td>Etc/GMT-4</td><td>&lt;+04>-4</td></tr>
<tr><td>Etc/GMT-5</td><td>&lt;+05>-5</td></tr>
<tr><td>Etc/GMT-6</td><td>&lt;+06>-6</td></tr>
<tr><td>Etc/GMT-7</td><td>&lt;+07>-7</td></tr>
<tr><td>Etc/GMT-8</td><td>&lt;+08>-8</td></tr>
<tr><td>Etc/GMT-9</td><td>&lt;+09>-9</td></tr>
<tr><td>Etc/GMT+0</td><td>GMT0</td></tr>
<tr><td>Etc/GMT+1</td><td>&lt;-01>1</td></tr>
<tr><td>Etc/GMT+10</td><td>&lt;-10>10</td></tr>
<tr><td>Etc/GMT+11</td><td>&lt;-11>11</td></tr>
<tr><td>Etc/GMT+12</td><td>&lt;-12>12</td></tr>
<tr><td>Etc/GMT+2</td><td>&lt;-02>2</td></tr>
<tr><td>Etc/GMT+3</td><td>&lt;-03>3</td></tr>
<tr><td>Etc/GMT+4</td><td>&lt;-04>4</td></tr>
<tr><td>Etc/GMT+5</td><td>&lt;-05>5</td></tr>
<tr><td>Etc/GMT+6</td><td>&lt;-06>6</td></tr>
<tr><td>Etc/GMT+7</td><td>&lt;-07>7</td></tr>
<tr><td>Etc/GMT+8</td><td>&lt;-08>8</td></tr>
<tr><td>Etc/GMT+9</td><td>&lt;-09>9</td></tr>
<tr><td>Etc/GMT0</td><td>GMT0</td></tr>
<tr><td>Etc/Greenwich</td><td>GMT0</td></tr>
<tr><td>Etc/UCT</td><td>UTC0</td></tr>
<tr><td>Etc/Universal</td><td>UTC0</td></tr>
<tr><td>Etc/UTC</td><td>UTC0</td></tr>
<tr><td>Etc/Zulu</td><td>UTC0</td></tr>
<tr><td>Europe/Amsterdam</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Andorra</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Astrakhan</td><td>&lt;+04>-4</td></tr>
<tr><td>Europe/Athens</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Europe/Belgrade</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Berlin</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Bratislava</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Brussels</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Bucharest</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Europe/Budapest</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Busingen</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Chisinau</td><td>EET-2EEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Copenhagen</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Dublin</td><td>IST-1GMT0,M10.5.0,M3.5.0/1</td></tr>
<tr><td>Europe/Gibraltar</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Guernsey</td><td>GMT0BST,M3.5.0/1,M10.5.0</td></tr>
<tr><td>Europe/Helsinki</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Europe/Isle_of_Man</td><td>GMT0BST,M3.5.0/1,M10.5.0</td></tr>
<tr><td>Europe/Istanbul</td><td>&lt;+03>-3</td></tr>
<tr><td>Europe/Jersey</td><td>GMT0BST,M3.5.0/1,M10.5.0</td></tr>
<tr><td>Europe/Kaliningrad</td><td>EET-2</td></tr>
<tr><td>Europe/Kiev</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Europe/Kirov</td><td>&lt;+03>-3</td></tr>
<tr><td>Europe/Lisbon</td><td>WET0WEST,M3.5.0/1,M10.5.0</td></tr>
<tr><td>Europe/Ljubljana</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/London</td><td>GMT0BST,M3.5.0/1,M10.5.0</td></tr>
<tr><td>Europe/Luxembourg</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Madrid</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Malta</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Mariehamn</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Europe/Minsk</td><td>&lt;+03>-3</td></tr>
<tr><td>Europe/Monaco</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Moscow</td><td>MSK-3</td></tr>
<tr><td>Europe/Oslo</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Paris</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Podgorica</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Prague</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Riga</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Europe/Rome</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Samara</td><td>&lt;+04>-4</td></tr>
<tr><td>Europe/San_Marino</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Sarajevo</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Saratov</td><td>&lt;+04>-4</td></tr>
<tr><td>Europe/Simferopol</td><td>MSK-3</td></tr>
<tr><td>Europe/Skopje</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Sofia</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Europe/Stockholm</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Tallinn</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Europe/Tirane</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Ulyanovsk</td><td>&lt;+04>-4</td></tr>
<tr><td>Europe/Uzhgorod</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Europe/Vaduz</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Vatican</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Vienna</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Vilnius</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Europe/Volgograd</td><td>&lt;+03>-3</td></tr>
<tr><td>Europe/Warsaw</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Zagreb</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Europe/Zaporozhye</td><td>EET-2EEST,M3.5.0/3,M10.5.0/4</td></tr>
<tr><td>Europe/Zurich</td><td>CET-1CEST,M3.5.0,M10.5.0/3</td></tr>
<tr><td>Indian/Antananarivo</td><td>EAT-3</td></tr>
<tr><td>Indian/Chagos</td><td>&lt;+06>-6</td></tr>
<tr><td>Indian/Christmas</td><td>&lt;+07>-7</td></tr>
<tr><td>Indian/Cocos</td><td>&lt;+0630>-6:30</td></tr>
<tr><td>Indian/Comoro</td><td>EAT-3</td></tr>
<tr><td>Indian/Kerguelen</td><td>&lt;+05>-5</td></tr>
<tr><td>Indian/Mahe</td><td>&lt;+04>-4</td></tr>
<tr><td>Indian/Maldives</td><td>&lt;+05>-5</td></tr>
<tr><td>Indian/Mauritius</td><td>&lt;+04>-4</td></tr>
<tr><td>Indian/Mayotte</td><td>EAT-3</td></tr>
<tr><td>Indian/Reunion</td><td>&lt;+04>-4</td></tr>
<tr><td>Pacific/Apia</td><td>&lt;+13>-13</td></tr>
<tr><td>Pacific/Auckland</td><td>NZST-12NZDT,M9.5.0,M4.1.0/3</td></tr>
<tr><td>Pacific/Bougainville</td><td>&lt;+11>-11</td></tr>
<tr><td>Pacific/Chatham</td><td>&lt;+1245>-12:45&lt;+1345>,M9.5.0/2:45,M4.1.0/3:45</td></tr>
<tr><td>Pacific/Chuuk</td><td>&lt;+10>-10</td></tr>
<tr><td>Pacific/Easter</td><td>&lt;-06>6&lt;-05>,M9.1.6/22,M4.1.6/22</td></tr>
<tr><td>Pacific/Efate</td><td>&lt;+11>-11</td></tr>
<tr><td>Pacific/Enderbury</td><td>&lt;+13>-13</td></tr>
<tr><td>Pacific/Fakaofo</td><td>&lt;+13>-13</td></tr>
<tr><td>Pacific/Fiji</td><td>&lt;+12>-12&lt;+13>,M11.2.0,M1.2.3/99</td></tr>
<tr><td>Pacific/Funafuti</td><td>&lt;+12>-12</td></tr>
<tr><td>Pacific/Galapagos</td><td>&lt;-06>6</td></tr>
<tr><td>Pacific/Gambier</td><td>&lt;-09>9</td></tr>
<tr><td>Pacific/Guadalcanal</td><td>&lt;+11>-11</td></tr>
<tr><td>Pacific/Guam</td><td>ChST-10</td></tr>
<tr><td>Pacific/Honolulu</td><td>HST10</td></tr>
<tr><td>Pacific/Kiritimati</td><td>&lt;+14>-14</td></tr>
<tr><td>Pacific/Kosrae</td><td>&lt;+11>-11</td></tr>
<tr><td>Pacific/Kwajalein</td><td>&lt;+12>-12</td></tr>
<tr><td>Pacific/Majuro</td><td>&lt;+12>-12</td></tr>
<tr><td>Pacific/Marquesas</td><td>&lt;-0930>9:30</td></tr>
<tr><td>Pacific/Midway</td><td>SST11</td></tr>
<tr><td>Pacific/Nauru</td><td>&lt;+12>-12</td></tr>
<tr><td>Pacific/Niue</td><td>&lt;-11>11</td></tr>
<tr><td>Pacific/Norfolk</td><td>&lt;+11>-11&lt;+12>,M10.1.0,M4.1.0/3</td></tr>
<tr><td>Pacific/Noumea</td><td>&lt;+11>-11</td></tr>
<tr><td>Pacific/Pago_Pago</td><td>SST11</td></tr>
<tr><td>Pacific/Palau</td><td>&lt;+09>-9</td></tr>
<tr><td>Pacific/Pitcairn</td><td>&lt;-08>8</td></tr>
<tr><td>Pacific/Pohnpei</td><td>&lt;+11>-11</td></tr>
<tr><td>Pacific/Port_Moresby</td><td>&lt;+10>-10</td></tr>
<tr><td>Pacific/Rarotonga</td><td>&lt;-10>10</td></tr>
<tr><td>Pacific/Saipan</td><td>ChST-10</td></tr>
<tr><td>Pacific/Tahiti</td><td>&lt;-10>10</td></tr>
<tr><td>Pacific/Tarawa</td><td>&lt;+12>-12</td></tr>
<tr><td>Pacific/Tongatapu</td><td>&lt;+13>-13</td></tr>
<tr><td>Pacific/Wake</td><td>&lt;+12>-12</td></tr>
<tr><td>Pacific/Wallis</td><td>&lt;+12>-12</td></tr>
</table>
<p>Source: <a href=https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv target=_blank>https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv</a></p>
<script>
function myFunction() {
var input, filter, table, tr, td, i, txtValue;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
table = document.getElementById("data");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[0];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>
</body>
</html>

View File

@@ -1,105 +0,0 @@
<table class="fixed" border="0" style="font-family: arial">
<col width="300px" /><col width="200px" />
<tr><td>
<h2>ESP32 File Server</h2>
</td><td>
<button id="dirup" type="button" onclick="dirup()">Directory up</button>
</td>
<td>
<table border="0">
<tr>
<td>
<label for="newfile">Upload a file</label>
</td>
<td colspan="2">
<input id="newfile" type="file" onchange="setpath()" style="width:100%;">
</td>
</tr>
<tr>
<td>
<label for="filepath">Set path on server</label>
</td>
<td>
<input id="filepath" type="text" style="width:100%;">
</td>
<td>
<button id="upload" type="button" onclick="upload()">Upload</button>
</td>
</tr>
</table>
</td></tr>
</table>
<script type="text/javascript" src="/fileserver/html/gethost.js">
</script>
<script language="JavaScript">
function setpath() {
var fileserverpraefix = "/fileserver";
var anz_zeichen_fileserver = fileserverpraefix.length;
var default_path = window.location.pathname.substring(anz_zeichen_fileserver) + document.getElementById("newfile").files[0].name;
document.getElementById("filepath").value = default_path;
}
function dirup() {
var str = window.location.href;
str = str.substring(0, str.length-1);
var zw = str.indexOf("/");
var found = zw;
while (zw >= 0)
{
zw = str.indexOf("/", found+1);
if (zw >= 0)
found = zw;
}
var res = str.substring(0, found+1);
window.location.href = res;
}
function upload() {
var filePath = document.getElementById("filepath").value;
var upload_path = "/upload/" + filePath;
var fileInput = document.getElementById("newfile").files;
/* Max size of an individual file. Make sure this
* value is same as that set in file_server.c */
var MAX_FILE_SIZE = 2000*1024;
var MAX_FILE_SIZE_STR = "2000KB";
if (fileInput.length == 0) {
alert("No file selected!");
} else if (filePath.length == 0) {
alert("File path on server is not set!");
} else if (filePath.indexOf(' ') >= 0) {
alert("File path on server cannot have spaces!");
} else if (filePath[filePath.length-1] == '/') {
alert("File name not specified after path!");
} else if (fileInput[0].size > 2000*1024) {
alert("File size must be less than 2000KB!");
} else {
document.getElementById("newfile").disabled = true;
document.getElementById("filepath").disabled = true;
document.getElementById("upload").disabled = true;
var file = fileInput[0];
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
if (xhttp.status == 200) {
document.open();
document.write(xhttp.responseText);
document.close();
} else if (xhttp.status == 0) {
alert("Server closed the connection abruptly!");
UpdatePage(false);
} else {
alert(xhttp.status + " Error!\n" + xhttp.responseText);
UpdatePage(false);
}
}
};
xhttp.open("POST", upload_path, true);
xhttp.send(file);
}
}
</script>

View File

@@ -0,0 +1,114 @@
<html>
<head>
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
</head>
<body>
<table>
<tr><td>WLAN-SSID</td><td><input type="text" name="ssid" id="ssid"></td><td>SSID of the WLAN</td></tr>
<tr><td>WLAN-Password</td><td><input type="text" name="password" id="password"></td><td>ATTENTION: the password will not be encrypted during the sending.</td>
</tr><tr><td> Hostname</td><td><input type="text" name="hostname" id="hostname"></td><td></td>
</tr><tr><td>Fixed IP</td><td><input type="text" name="ip" id="ip"></td><td>Leave emtpy if set by router</td></tr>
<tr><td>gateway</td><td><input type="text" name="gateway" id="gateway"></td><td>Leave emtpy if set by router</td></tr>
<tr><td>netmask</td><td><input type="text" name="netmask" id="netmask"></td><td>Leave emtpy if set by router</td>
</tr><tr><td>DNS</td><td><input type="text" name="dns" id="dns"></td><td>Leave emtpy if set by router</td></tr>
<tr><td>RSSI Threashold</td><td><input type="number" name="name" id="threashold" min="-100" max="0" step="1" value = "0"></td><td>WLAN Mesh Parameter: Threashold for RSSI value to check for start switching access point in a mesh system.Possible values: -100 to 0, 0 = disabled - Value will be transfered to wlan.ini at next startup)</td></tr>
</table>
<button class="button" type="button" onclick="wr()">Write wlan.ini</button>
<input id="newfile" type="file">
<button class="button" style="width:300px" id="doUpdate" type="button" onclick="upload()">Upload Files</button>
<script language="JavaScript">function wr(){
api = "/config?"+"ssid"+document.getElementById("ssid").value+"&pwd="+document.getElementById("password").value;+"&hn="+document.getElementById("hostname").value;+"&ip="+document.getElementById("ip").value;+"&gw="+document.getElementById("gateway").value;+"&nm="+document.getElementById("netmask").value;+"&dns="+document.getElementById("dns").value;+"&rssi="+document.getElementById("threashold").value;
fetch(api);}
// var xhttp = new XMLHttpRequest();
// xhttp.onreadystatechange = function() {if (xhttp.readyState == 4) {if (xhttp.status == 200) {document.reload();}}};
if (!file.name.includes("remote-setup")){
if (!confirm("The zip file name should contain \"...remote-setup...\". Are you sure that you have downloaded the correct file?"))
return;
}
function upload() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {stopProgressTimer();if (xhttp.status == 200) {extract();} }};
var filePath = document.getElementById("newfile").value.split(/[\\\/]/).pop();
var file = document.getElementById("newfile").files[0];
if (!file.name.includes("remote-setup"))
{
if (!confirm("The zip file name should contain \"...remote-setup...\". Are you sure that you have downloaded the correct file?"))
return;
}
var upload_path = "/upload/firmware/" + filePath; xhttp.open("POST", upload_path, true); xhttp.send(file);}
function extract() {
document.getElementById("status").innerText = "Status: Processing on device (takes up to 3 minutes)...";
var xhttp = new XMLHttpRequest();
/* first delete the old firmware */
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
stopProgressTimer();
if (xhttp.status == 200) {
document.getElementById("status").innerText = "Status: Update completed!";
document.getElementById("doUpdate").disabled = true;
document.getElementById("newfile").disabled = false;
document.cookie = "page=overview.html?v=$COMMIT_HASH" + "; path=/"; // Make sure after the reboot we go to the overview page
if (xhttp.responseText.startsWith("reboot"))
{
doRebootAfterUpdate();
}
else
{
firework.launch('Processing done! (' + xhttp.responseText + ')', 'success', 5000);
}
} else if (xhttp.status == 0) {
firework.launch('Server closed the connection abruptly!', 'danger', 30000);
UpdatePage();
} else {
firework.launch('An error occured: ' + xhttp.responseText, 'danger', 30000);
UpdatePage();
}
}
};
startProgressTimer("Extraction");
var nameneu = document.getElementById("newfile").value;
filePath = nameneu.split(/[\\\/]/).pop();
var _toDo = domainname + "/ota?task=update&file=" + filePath;
xhttp.open("GET", _toDo, true);
xhttp.send();
}
function startProgressTimer(step) {
console.log(step + "...");
document.getElementById('progress').innerHTML = "(0s)";
action_runtime = 0;
progressTimerHandle = setInterval(function() {
action_runtime += 1;
console.log("Progress: " + action_runtime + "s");
document.getElementById('progress').innerHTML = "(" + action_runtime + "s)";
}, 1000);
}
function stopProgressTimer() {
clearInterval(progressTimerHandle);
document.getElementById('progress').innerHTML = "";
}
</script>
</html>
</body>