From 834b938185a2b56c11810fd9ac6e35d4d0831873 Mon Sep 17 00:00:00 2001 From: Martin Dummer Date: Wed, 26 Apr 2023 16:56:51 +0200 Subject: [PATCH 1/4] Fix: README.md: change binary download instructions new download instructions since github releases are on the project homepage Signed-off-by: Martin Dummer --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e1bc14ec..a41012cb 100644 --- a/README.md +++ b/README.md @@ -210,8 +210,7 @@ It is recommended to make all changes only in the 'platformio_override.ini', th ### using the pre-compiled .bin files -The pre-compiled files can be found on the [github page](https://github.com/tbnobody/OpenDTU) in the tab "Actions" and the sub menu "OpenDTU Build". Just choose the latest build from the master branch (search for "master" in the blue font text but click on the white header text!). You need to be logged in with your github account to download the files. -Use a ESP32 flash tool of your choice (see next chapter) and flash the `.bin` files to the right addresses: +The pre-compiled binary files can be found here on the [github page behind "Releases"](https://github.com/tbnobody/OpenDTU/releases) (look at the right column). For a first installation on an ESP32, download `opendtu-generic.zip`, unpack and use a ESP32 flash tool of your choice (see next chapter) to flash the `.bin` files to the right addresses: | Address | File | | ---------| ---------------------- | @@ -220,7 +219,7 @@ Use a ESP32 flash tool of your choice (see next chapter) and flash the `.bin` fi | 0xe000 | boot_app0.bin | | 0x10000 | opendtu-*.bin | -For further updates you can just use the web interface and upload the `opendtu-*.bin` file. +For further updates download `opendtu-generic.bin` and use the over-the-air firmware update in OpenDTU's web interface. #### Flash with esptool.py (Linux) From 09f8a633d7ffe6e6bfcddd29009795ffc5551fc1 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Tue, 2 May 2023 20:49:11 +0200 Subject: [PATCH 2/4] Fix: Source does not build with platform >= 6.2.0 Stick at 6.1.0 at the moment... There is already a issue opened on arduino-esp32 (https://github.com/espressif/arduino-esp32/issues/8108) --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 2a6cb167..511c7925 100644 --- a/platformio.ini +++ b/platformio.ini @@ -15,7 +15,7 @@ extra_configs = [env] framework = arduino -platform = espressif32@>=6.1.0 +platform = espressif32@6.1.0 build_flags = -DCOMPONENT_EMBED_FILES=webapp_dist/index.html.gz:webapp_dist/zones.json.gz:webapp_dist/favicon.ico:webapp_dist/js/app.js.gz From 7c80fe2bf900844a972dc732086958b5a7957a8a Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Tue, 2 May 2023 21:03:24 +0200 Subject: [PATCH 3/4] webapp: Update dependencies --- webapp/package.json | 6 +- webapp/yarn.lock | 132 +++++++++++++++++++++++++++++++++----------- 2 files changed, 104 insertions(+), 34 deletions(-) diff --git a/webapp/package.json b/webapp/package.json index 671c86e8..5b52459c 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -25,7 +25,7 @@ "@rushstack/eslint-patch": "^1.2.0", "@tsconfig/node18": "^2.0.0", "@types/bootstrap": "^5.2.6", - "@types/node": "^18.16.2", + "@types/node": "^18.16.3", "@types/spark-md5": "^3.0.2", "@vitejs/plugin-vue": "^4.2.1", "@vue/eslint-config-typescript": "^11.0.3", @@ -36,9 +36,9 @@ "sass": "^1.62.1", "terser": "^5.17.1", "typescript": "^5.0.4", - "vite": "^4.3.3", + "vite": "^4.3.4", "vite-plugin-compression": "^0.5.1", "vite-plugin-css-injected-by-js": "^3.1.0", - "vue-tsc": "^1.6.1" + "vue-tsc": "^1.6.3" } } diff --git a/webapp/yarn.lock b/webapp/yarn.lock index 45ddb053..710b478e 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -7,6 +7,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.11.tgz#68bb07ab3d380affa9a3f96728df07969645d2d9" integrity sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ== +"@babel/parser@^7.20.15", "@babel/parser@^7.21.3": + version "7.21.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.8.tgz#642af7d0333eab9c0ad70b14ac5e76dbde7bfdf8" + integrity sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA== + "@esbuild/android-arm64@0.17.12": version "0.17.12" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.12.tgz#15a8e2b407d03989b899e325151dc2e96d19c620" @@ -366,10 +371,10 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== -"@types/node@^18.16.2": - version "18.16.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.2.tgz#2f610ea71034b3971c312192377f8a7178eb57f1" - integrity sha512-GQW/JL/5Fz/0I8RpeBG9lKp0+aNcXEaVL71c0D2Q0QHDTFvlYKT7an0onCUXj85anv7b4/WesqdfchLc0jtsCg== +"@types/node@^18.16.3": + version "18.16.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.3.tgz#6bda7819aae6ea0b386ebc5b24bdf602f1b42b01" + integrity sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q== "@types/semver@^7.3.12": version "7.3.13" @@ -491,28 +496,28 @@ dependencies: "@volar/language-core" "1.4.1" -"@volar/vue-language-core@1.6.1": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@volar/vue-language-core/-/vue-language-core-1.6.1.tgz#41bcce44d543e461a4e1aa912af677ef862933a2" - integrity sha512-lIuxzvIx5U8MfoF+vrXNG1aZgmk8T0uyPEwI8g3EUJdESuU0qIKM84o+L4TUw77IQCYXiSefaJmsSSY87/VWnA== +"@volar/vue-language-core@1.6.3": + version "1.6.3" + resolved "https://registry.yarnpkg.com/@volar/vue-language-core/-/vue-language-core-1.6.3.tgz#20113de55c21f210dd5dc740891b5f3d8f9c0bac" + integrity sha512-e9OTDCPa8Wuh0ORhD4z++qTIcrsrqcI9waspr93YcQCq6j+Q+JTFuy7HBSQgyezSAsP6x1WWokKVk4fWWDJQOw== dependencies: "@volar/language-core" "1.4.1" "@volar/source-map" "1.4.1" - "@vue/compiler-dom" "^3.2.0" - "@vue/compiler-sfc" "^3.2.0" - "@vue/reactivity" "^3.2.0" - "@vue/shared" "^3.2.0" + "@vue/compiler-dom" "^3.3.0-beta.3" + "@vue/compiler-sfc" "^3.3.0-beta.3" + "@vue/reactivity" "^3.3.0-beta.3" + "@vue/shared" "^3.3.0-beta.3" minimatch "^9.0.0" muggle-string "^0.2.2" vue-template-compiler "^2.7.14" -"@volar/vue-typescript@1.6.1": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@volar/vue-typescript/-/vue-typescript-1.6.1.tgz#788b7d454e9ba66ff83695ecc2e17939e5ac9222" - integrity sha512-5mhG6Lv2niq/AGNvHy4RSAGlJhkR+EcH7zRQ19JlffzhWDVXEdDp8luSSabCkrJzejXIMh0rsTGlKy2EFYy7vQ== +"@volar/vue-typescript@1.6.3": + version "1.6.3" + resolved "https://registry.yarnpkg.com/@volar/vue-typescript/-/vue-typescript-1.6.3.tgz#09ab00e86573a6552219bcdec8efe03ba454730d" + integrity sha512-Dz29Qym33P1MSZDTZJ6PPLN1TLQfkX+g2pRnHqLCsFdSUu4yWYnElBURCn5WJkekxV/v+k2T43aur2RCSY3Ovg== dependencies: "@volar/typescript" "1.4.1" - "@volar/vue-language-core" "1.6.1" + "@volar/vue-language-core" "1.6.3" "@vue/compiler-core@3.2.47": version "3.2.47" @@ -524,7 +529,17 @@ estree-walker "^2.0.2" source-map "^0.6.1" -"@vue/compiler-dom@3.2.47", "@vue/compiler-dom@^3.2.0": +"@vue/compiler-core@3.3.0-beta.3": + version "3.3.0-beta.3" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.3.0-beta.3.tgz#3cc98d9ef25d2f890717f8a15fe65870910e984f" + integrity sha512-mv2rPo4JHou6ebm7+U/wO1HpA6W1zDfTqbt4fqjoXrMwU4DWNgRcLKTXG6G3cXV4mOe+2YgWspfxEzo7fPTMKg== + dependencies: + "@babel/parser" "^7.21.3" + "@vue/shared" "3.3.0-beta.3" + estree-walker "^2.0.2" + source-map-js "^1.0.2" + +"@vue/compiler-dom@3.2.47": version "3.2.47" resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.47.tgz#a0b06caf7ef7056939e563dcaa9cbde30794f305" integrity sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ== @@ -532,7 +547,15 @@ "@vue/compiler-core" "3.2.47" "@vue/shared" "3.2.47" -"@vue/compiler-sfc@3.2.47", "@vue/compiler-sfc@^3.2.0", "@vue/compiler-sfc@^3.2.47": +"@vue/compiler-dom@3.3.0-beta.3", "@vue/compiler-dom@^3.3.0-beta.3": + version "3.3.0-beta.3" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.3.0-beta.3.tgz#8b1d76428413d51d76a7b3f567ccea47428d5ebe" + integrity sha512-e7VpjN9wYiuJdJos6Uoe501CzdMkfaEr/27Ks4Ss7Irtcj5YA/S1OROZ35Xl2Pc3ctx6beq5RpcOvnMqh0hcaA== + dependencies: + "@vue/compiler-core" "3.3.0-beta.3" + "@vue/shared" "3.3.0-beta.3" + +"@vue/compiler-sfc@3.2.47", "@vue/compiler-sfc@^3.2.47": version "3.2.47" resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.47.tgz#1bdc36f6cdc1643f72e2c397eb1a398f5004ad3d" integrity sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ== @@ -548,6 +571,22 @@ postcss "^8.1.10" source-map "^0.6.1" +"@vue/compiler-sfc@^3.3.0-beta.3": + version "3.3.0-beta.3" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.3.0-beta.3.tgz#8d60a57eaf6a8675463c4640124dafecf78c8961" + integrity sha512-6shZNooetShjSMHJvgVoE0EM8pOMV5vnrzsHoCU06stzV+kqRJQpbN7xf2s9wK2fgHMIBSMINrM9AuZiQnNCJg== + dependencies: + "@babel/parser" "^7.20.15" + "@vue/compiler-core" "3.3.0-beta.3" + "@vue/compiler-dom" "3.3.0-beta.3" + "@vue/compiler-ssr" "3.3.0-beta.3" + "@vue/reactivity-transform" "3.3.0-beta.3" + "@vue/shared" "3.3.0-beta.3" + estree-walker "^2.0.2" + magic-string "^0.30.0" + postcss "^8.1.10" + source-map-js "^1.0.2" + "@vue/compiler-ssr@3.2.47": version "3.2.47" resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.47.tgz#35872c01a273aac4d6070ab9d8da918ab13057ee" @@ -556,6 +595,14 @@ "@vue/compiler-dom" "3.2.47" "@vue/shared" "3.2.47" +"@vue/compiler-ssr@3.3.0-beta.3": + version "3.3.0-beta.3" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.3.0-beta.3.tgz#179e2c0a4de617addfb6ebc0776225265f5c7829" + integrity sha512-egJ0lEVAod3Hpnw96cJ/0a9qv5f5h5/VCBpKYT8scqkzoMsikh8AJant2omokBCL/Ut5UAMLVQlA5b66+2Ys/g== + dependencies: + "@vue/compiler-dom" "3.3.0-beta.3" + "@vue/shared" "3.3.0-beta.3" + "@vue/devtools-api@^6.2.1", "@vue/devtools-api@^6.4.5": version "6.4.5" resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.4.5.tgz#d54e844c1adbb1e677c81c665ecef1a2b4bb8380" @@ -581,13 +628,31 @@ estree-walker "^2.0.2" magic-string "^0.25.7" -"@vue/reactivity@3.2.47", "@vue/reactivity@^3.2.0": +"@vue/reactivity-transform@3.3.0-beta.3": + version "3.3.0-beta.3" + resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.3.0-beta.3.tgz#424a70d43fb4893131b2c1fba9a9e6806ebeabe0" + integrity sha512-aM3TgBca9QMMu/9B9ASRVvckeZpAdJO9nmQh5UCznhoDYjVxQPS+sCQvH6TLOjPB1MDQMVQYg4ZiPqfVVo7NbA== + dependencies: + "@babel/parser" "^7.20.15" + "@vue/compiler-core" "3.3.0-beta.3" + "@vue/shared" "3.3.0-beta.3" + estree-walker "^2.0.2" + magic-string "^0.30.0" + +"@vue/reactivity@3.2.47": version "3.2.47" resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.47.tgz#1d6399074eadfc3ed35c727e2fd707d6881140b6" integrity sha512-7khqQ/75oyyg+N/e+iwV6lpy1f5wq759NdlS1fpAhFXa8VeAIKGgk2E/C4VF59lx5b+Ezs5fpp/5WsRYXQiKxQ== dependencies: "@vue/shared" "3.2.47" +"@vue/reactivity@^3.3.0-beta.3": + version "3.3.0-beta.3" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.3.0-beta.3.tgz#8f4929df4195f9d1b5a083d4c66d22932dfcc89d" + integrity sha512-9VjWfWgZJ18YXEkfnDfZr33RyLBa6zc0RARLkMqMApWvM26eusZAZ4hhyxlgODBU/mEFk4XOGIAtwwSQedA0MQ== + dependencies: + "@vue/shared" "3.3.0-beta.3" + "@vue/runtime-core@3.2.47": version "3.2.47" resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.47.tgz#406ebade3d5551c00fc6409bbc1eeb10f32e121d" @@ -613,11 +678,16 @@ "@vue/compiler-ssr" "3.2.47" "@vue/shared" "3.2.47" -"@vue/shared@3.2.47", "@vue/shared@^3.2.0": +"@vue/shared@3.2.47": version "3.2.47" resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.47.tgz#e597ef75086c6e896ff5478a6bfc0a7aa4bbd14c" integrity sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ== +"@vue/shared@3.3.0-beta.3", "@vue/shared@^3.3.0-beta.3": + version "3.3.0-beta.3" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.3.0-beta.3.tgz#dc19df6124e157030b3e7c8f471f497f9528a7be" + integrity sha512-st1SnB/Bkbb9TsieeI4TRX9TqHYIR5wvIma3ZtEben55EYSWa1q5u2BhTNgABSdH+rv3Xwfrvpwh5PmCw6Y53g== + "@vue/tsconfig@^0.3.2": version "0.3.2" resolved "https://registry.yarnpkg.com/@vue/tsconfig/-/tsconfig-0.3.2.tgz#612ba0b6aefde5ac1a513545eee7d4ed01c407f5" @@ -2368,10 +2438,10 @@ vite-plugin-css-injected-by-js@^3.1.0: resolved "https://registry.yarnpkg.com/vite-plugin-css-injected-by-js/-/vite-plugin-css-injected-by-js-3.1.0.tgz#d1160c975d40f256692e2465832e6ff18c22b3a3" integrity sha512-qogCmpocZfcbSAYZQjS88ieIY0PzLUm7RkLFWFgAxkXdz3N6roZbSTNTxeIOj5IxFbZWACUPuVBBoo6qCuXDcw== -vite@^4.3.3: - version "4.3.3" - resolved "https://registry.yarnpkg.com/vite/-/vite-4.3.3.tgz#26adb4aa01439fc4546c480ea547674d87289396" - integrity sha512-MwFlLBO4udZXd+VBcezo3u8mC77YQk+ik+fbc0GZWGgzfbPP+8Kf0fldhARqvSYmtIWoAJ5BXPClUbMTlqFxrA== +vite@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.3.4.tgz#1c518d763d5a700d890c3a19ab59220f06e7a7d5" + integrity sha512-f90aqGBoxSFxWph2b39ae2uHAxm5jFBBdnfueNxZAT1FTpM13ccFQExCaKbR2xFW5atowjleRniQ7onjJ22QEg== dependencies: esbuild "^0.17.5" postcss "^8.4.23" @@ -2430,13 +2500,13 @@ vue-template-compiler@^2.7.14: de-indent "^1.0.2" he "^1.2.0" -vue-tsc@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/vue-tsc/-/vue-tsc-1.6.1.tgz#9fbc3ee8ba643c41e051c4f04b3af847b7b6ef59" - integrity sha512-cKKKrv98MdU9kgd434fkjcIpU7a5bUflhklF9usf/GzebjmZpaht7tYGm/MNdBz7V9icySceCzCr3RiG02mOJg== +vue-tsc@^1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/vue-tsc/-/vue-tsc-1.6.3.tgz#db49f0060c595ec3123d66086274b891d7e6282f" + integrity sha512-q7l27j0eSJgyGat0khetrvoeaAHieRZFnf8WAJyKvB3eF0AxmLqfs4ahwZhaojBJjZ/lAXZa+Xt8EX54KzQ34w== dependencies: - "@volar/vue-language-core" "1.6.1" - "@volar/vue-typescript" "1.6.1" + "@volar/vue-language-core" "1.6.3" + "@volar/vue-typescript" "1.6.3" semver "^7.3.8" vue@^3.2.47: From 65b728eebb313126b1e2a4b34e46aeb275dc68d4 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Wed, 3 May 2023 21:16:27 +0200 Subject: [PATCH 4/4] Fix: No OpenDTU startup of CDC (like Pico or ESP32-S3) devices if no usb host is connected Should also fix #826 --- platformio.ini | 3 ++- src/main.cpp | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 511c7925..f3fc2a50 100644 --- a/platformio.ini +++ b/platformio.ini @@ -213,4 +213,5 @@ build_flags = ${env.build_flags} -DCMT_GPIO2=3 -DCMT_GPIO3=8 -DCMT_SDIO=5 - -DARDUINO_USB_MODE=1 \ No newline at end of file + -DARDUINO_USB_MODE=1 + -DARDUINO_USB_CDC_ON_BOOT=1 \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 172b3a43..aec7d0f3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,8 +26,13 @@ void setup() { // Initialize serial output Serial.begin(SERIAL_BAUDRATE); +#if ARDUINO_USB_CDC_ON_BOOT + Serial.setTxTimeoutMs(0); + delay(100); +#else while (!Serial) yield(); +#endif MessageOutput.println(); MessageOutput.println("Starting OpenDTU");