Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
theelims committed Sep 17, 2023
1 parent 7b3b700 commit ecc8094
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion docs/gettingstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions factory_settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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


4 changes: 2 additions & 2 deletions features.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions src/LightStateService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/LightStateService.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <HttpEndpoint.h>
#include <MqttPubSub.h>
#include <WebSocketServer.h>
#include <WebSocketClient.h>
// #include <WebSocketClient.h>

#define DEFAULT_LED_STATE false
#define OFF_STATE "OFF"
Expand Down Expand Up @@ -91,7 +91,7 @@ class LightStateService : public StatefulService<LightState>
HttpEndpoint<LightState> _httpEndpoint;
MqttPubSub<LightState> _mqttPubSub;
WebSocketServer<LightState> _webSocketServer;
WebSocketClient<LightState> _webSocketClient;
// WebSocketClient<LightState> _webSocketClient;
AsyncMqttClient *_mqttClient;
LightMqttSettingsService *_lightMqttSettingsService;

Expand Down

0 comments on commit ecc8094

Please sign in to comment.