From ecc80945e2dc823a3ec33b83c33ffe8032078630 Mon Sep 17 00:00:00 2001 From: elims <46279009+theelims@users.noreply.github.com> Date: Sun, 17 Sep 2023 21:37:45 +0200 Subject: [PATCH] updated docs --- CHANGELOG.md | 7 +++++++ docs/gettingstarted.md | 6 +++++- factory_settings.ini | 4 ++-- features.ini | 4 ++-- .../{WebSocketClient.h => WebSocketClient.h.bak} | 4 ++-- src/LightStateService.cpp | 10 +++++----- src/LightStateService.h | 4 ++-- 7 files changed, 25 insertions(+), 14 deletions(-) rename lib/framework/{WebSocketClient.h => WebSocketClient.h.bak} (98%) diff --git a/CHANGELOG.md b/CHANGELOG.md index f04c6b36..925310cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file. ### Changed - Changed JSON format end removed "payload" property. JSON is the same as for MQTT or HTTP now. +- Changed default wakeup pin in demo code to GPIO0 (Boot selection) ### Depreciated @@ -25,6 +26,12 @@ All notable changes to this project will be documented in this file. ### Security +## [0.2.1] - 2023-09-11 + +### Fixed + +- Fixed the boot loop issue for Arduino 6.4.0 + ## [0.2.0] - 2023-08-03 ### Added diff --git a/docs/gettingstarted.md b/docs/gettingstarted.md index 6d0253a3..b7d74c68 100644 --- a/docs/gettingstarted.md +++ b/docs/gettingstarted.md @@ -58,7 +58,7 @@ pip install mkdocs-material ```ini [platformio] ... -default_envs = adafruit_feather_esp32_v2 +default_envs = esp32-s3-devkitc-1 ... [env:adafruit_feather_esp32_v2] @@ -76,6 +76,10 @@ board_build.mcu = esp32s3 If your board is not listed in the platformio.ini you may look in the [official board list](https://docs.platformio.org/en/latest/boards/index.html#espressif-32) for supported boards and add their information accordingly. Either delete the obsolete `[env:...]` sections, or change your board as `default_envs = ...`. +!!! info "Default setup is for an ESP32-S3-DevKitC/M board" + + The projects platformio.ini defaults for an ESP32-S3-DevKitC/M board by Espressif connected to the UART USB port. If you use an other board and the projects shows undesired a behavior it is likely that some parts do not match with pin definitions. + ### Build & Upload Process After you've changed [platformio.ini](https://github.com/theelims/ESP32-sveltekit/blob/main/platformio.ini) to suit your board you can upload the sample code to your board. This will download all ESP32 libraries and execute `node install` to install all node packages as well. Select your board's environment under the PlatformIO tab and hit `Upload and Monitor`. diff --git a/factory_settings.ini b/factory_settings.ini index 1580865f..e60e16fb 100644 --- a/factory_settings.ini +++ b/factory_settings.ini @@ -57,7 +57,7 @@ build_flags = -D FACTORY_JWT_SECRET=\"#{random}-#{random}\" ; supports placeholders ; Deep Sleep Configuration - -D WAKEUP_PIN_NUMBER=38 ; pin number to wake up the ESP - -D WAKEUP_SIGNAL=0 ; 1 for wakeup on HIGH, 0 for wakeup on LOW + -D WAKEUP_PIN_NUMBER=1 ; pin number to wake up the ESP + -D WAKEUP_SIGNAL=1 ; 1 for wakeup on HIGH, 0 for wakeup on LOW diff --git a/features.ini b/features.ini index 363cf961..6b6e7f48 100644 --- a/features.ini +++ b/features.ini @@ -6,6 +6,6 @@ build_flags = -D FT_OTA=0 ; Not recommended, will be deprectiated in an upcomming release -D FT_UPLOAD_FIRMWARE=1 -D FT_DOWNLOAD_FIRMWARE=1 ; requires FT_NTP=1 - -D FT_SLEEP=1 - -D FT_BATTERY=1 + -D FT_SLEEP=0 + -D FT_BATTERY=0 -D FT_ANALYTICS=1 diff --git a/lib/framework/WebSocketClient.h b/lib/framework/WebSocketClient.h.bak similarity index 98% rename from lib/framework/WebSocketClient.h rename to lib/framework/WebSocketClient.h.bak index 6122b180..115d2cf0 100644 --- a/lib/framework/WebSocketClient.h +++ b/lib/framework/WebSocketClient.h.bak @@ -124,12 +124,12 @@ class WebSocketClient websocket_cfg.uri = "ws://192.168.1.91:1880/ws/request"; //.uri = "wss://webhook.xtoys.app/ypFXRRx9kzkn?token=91ffdf3434946903a6d34acba97e9b69", - websocket_cfg.buffer_size = _bufferSize, + websocket_cfg.buffer_size = _bufferSize; // websocket_cfg.cert_pem = (const char *)root_CA; // websocket_cfg.cert_len = sizeof(root_CA); - client = esp_websocket_client_init(&websocket_cfg); + client = esp_websocket_client_init(&websocket_cfg); // Register event handler esp_websocket_register_events(client, WEBSOCKET_EVENT_ANY, &onWSEventStatic, (void *)client); diff --git a/src/LightStateService.cpp b/src/LightStateService.cpp index cb44902c..a402c026 100644 --- a/src/LightStateService.cpp +++ b/src/LightStateService.cpp @@ -33,11 +33,11 @@ LightStateService::LightStateService(AsyncWebServer *server, securityManager, AuthenticationPredicates::IS_AUTHENTICATED), _mqttClient(mqttClient), - _lightMqttSettingsService(lightMqttSettingsService), - _webSocketClient(LightState::read, - LightState::update, - this, - LIGHT_SETTINGS_SOCKET_PATH) + _lightMqttSettingsService(lightMqttSettingsService) +/* _webSocketClient(LightState::read, + LightState::update, + this, + LIGHT_SETTINGS_SOCKET_PATH)*/ { // configure led to be output pinMode(LED_BUILTIN, OUTPUT); diff --git a/src/LightStateService.h b/src/LightStateService.h index 8774f6f4..12bce453 100644 --- a/src/LightStateService.h +++ b/src/LightStateService.h @@ -20,7 +20,7 @@ #include #include #include -#include +// #include #define DEFAULT_LED_STATE false #define OFF_STATE "OFF" @@ -91,7 +91,7 @@ class LightStateService : public StatefulService HttpEndpoint _httpEndpoint; MqttPubSub _mqttPubSub; WebSocketServer _webSocketServer; - WebSocketClient _webSocketClient; + // WebSocketClient _webSocketClient; AsyncMqttClient *_mqttClient; LightMqttSettingsService *_lightMqttSettingsService;