From 0afda87092ba998482fa5435638eab7314c7b6b3 Mon Sep 17 00:00:00 2001 From: Proddy Date: Thu, 13 Jul 2023 21:50:26 +0200 Subject: [PATCH 01/13] update packages --- interface/package.json | 10 +++---- interface/yarn.lock | 59 +++++++++++++++++++++++++----------------- 2 files changed, 40 insertions(+), 29 deletions(-) diff --git a/interface/package.json b/interface/package.json index a0d7ae4fa..4ffc6d712 100644 --- a/interface/package.json +++ b/interface/package.json @@ -26,10 +26,10 @@ "@mui/material": "^5.14.0", "@preact/compat": "^17.1.2", "@table-library/react-table-library": "4.1.4", - "@types/lodash-es": "^4.17.7", - "@types/node": "^20.4.1", - "@types/react": "^18.2.14", - "@types/react-dom": "^18.2.6", + "@types/lodash-es": "^4.17.8", + "@types/node": "^20.4.2", + "@types/react": "^18.2.15", + "@types/react-dom": "^18.2.7", "@types/react-router-dom": "^5.3.3", "alova": "^2.9.2", "async-validator": "^4.2.5", @@ -54,7 +54,7 @@ "@typescript-eslint/parser": "^6.0.0", "eslint": "^8.44.0", "eslint-config-airbnb": "^19.0.4", - "eslint-config-airbnb-typescript": "^17.0.0", + "eslint-config-airbnb-typescript": "^17.1.0", "eslint-config-prettier": "^8.8.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-autofix": "^1.1.0", diff --git a/interface/yarn.lock b/interface/yarn.lock index c5ee5ef6d..3c1cce40f 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -1277,12 +1277,12 @@ __metadata: languageName: node linkType: hard -"@types/lodash-es@npm:^4.17.7": - version: 4.17.7 - resolution: "@types/lodash-es@npm:4.17.7" +"@types/lodash-es@npm:^4.17.8": + version: 4.17.8 + resolution: "@types/lodash-es@npm:4.17.8" dependencies: "@types/lodash": "*" - checksum: c3ecfcff9f6864efa1a5f0d3ec457db17536f05a3a7a1a3f1fb1052042ed3e9747b12cd1eddab14fbbe98aef7aec131aaaf71c2f4611725cb15dd42b9651a64d + checksum: 950771d406c842814dd22217adba5e01bd06b3c21e97900d3c3816f38580e132894400b5d83a7962645fa284d8478614bdcc50755255ad15024311b7b8ed8520 languageName: node linkType: hard @@ -1293,10 +1293,10 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^20.4.1": - version: 20.4.1 - resolution: "@types/node@npm:20.4.1" - checksum: 000b001bc4a2bd96fde75c4e20358c6232b94228a6712989bd14cee652474f1084774a88552a82b3dac98fc49750313a76d5d3d773a6b616a041c2bad55590f3 +"@types/node@npm:^20.4.2": + version: 20.4.2 + resolution: "@types/node@npm:20.4.2" + checksum: ca506e089737d54effabda5d6534fdf9fdbe22adbcc4864a170feea390389f38cbae6abcf89c2b1ce5c3e4ffc450b35341509a7619f850babf43106009f01b2d languageName: node linkType: hard @@ -1314,12 +1314,12 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:^18.2.6": - version: 18.2.6 - resolution: "@types/react-dom@npm:18.2.6" +"@types/react-dom@npm:^18.2.7": + version: 18.2.7 + resolution: "@types/react-dom@npm:18.2.7" dependencies: "@types/react": "*" - checksum: bd734ca04c52b3c96891a7f9c1139486807dac7a2449fb72e8f8e23018bc6eeeb87a490a105cb39d05ccb7ddf80ed7a441e5bd3e5866c6f6ae8870cd723599e8 + checksum: bd090f5e1b13765fbc191d9eb720dd152d26c20558221963009189c4636ce11e4c1c976e4cde4a74335f997a2be651af27d3727474a8091424101a83a71eebfb languageName: node linkType: hard @@ -1362,7 +1362,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:*, @types/react@npm:^18.2.14": +"@types/react@npm:*": version: 18.2.14 resolution: "@types/react@npm:18.2.14" dependencies: @@ -1373,6 +1373,17 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:^18.2.15": + version: 18.2.15 + resolution: "@types/react@npm:18.2.15" + dependencies: + "@types/prop-types": "*" + "@types/scheduler": "*" + csstype: ^3.0.2 + checksum: d1999bd8a565704a9885e3b7a44d93d8d70beb0aae7b3c66139d98832b6dddf82da790519ac9c6502d57504af1cb729c6edb3bf506fe14386a364618884ed0a2 + languageName: node + linkType: hard + "@types/scheduler@npm:*": version: 0.16.3 resolution: "@types/scheduler@npm:0.16.3" @@ -1524,10 +1535,10 @@ __metadata: "@preact/compat": ^17.1.2 "@preact/preset-vite": ^2.5.0 "@table-library/react-table-library": 4.1.4 - "@types/lodash-es": ^4.17.7 - "@types/node": ^20.4.1 - "@types/react": ^18.2.14 - "@types/react-dom": ^18.2.6 + "@types/lodash-es": ^4.17.8 + "@types/node": ^20.4.2 + "@types/react": ^18.2.15 + "@types/react-dom": ^18.2.7 "@types/react-router-dom": ^5.3.3 "@typescript-eslint/eslint-plugin": ^6.0.0 "@typescript-eslint/parser": ^6.0.0 @@ -1535,7 +1546,7 @@ __metadata: async-validator: ^4.2.5 eslint: ^8.44.0 eslint-config-airbnb: ^19.0.4 - eslint-config-airbnb-typescript: ^17.0.0 + eslint-config-airbnb-typescript: ^17.1.0 eslint-config-prettier: ^8.8.0 eslint-import-resolver-typescript: ^3.5.5 eslint-plugin-autofix: ^1.1.0 @@ -2608,17 +2619,17 @@ __metadata: languageName: node linkType: hard -"eslint-config-airbnb-typescript@npm:^17.0.0": - version: 17.0.0 - resolution: "eslint-config-airbnb-typescript@npm:17.0.0" +"eslint-config-airbnb-typescript@npm:^17.1.0": + version: 17.1.0 + resolution: "eslint-config-airbnb-typescript@npm:17.1.0" dependencies: eslint-config-airbnb-base: ^15.0.0 peerDependencies: - "@typescript-eslint/eslint-plugin": ^5.13.0 - "@typescript-eslint/parser": ^5.0.0 + "@typescript-eslint/eslint-plugin": ^5.13.0 || ^6.0.0 + "@typescript-eslint/parser": ^5.0.0 || ^6.0.0 eslint: ^7.32.0 || ^8.2.0 eslint-plugin-import: ^2.25.3 - checksum: 9a8ce73c5a52ff1f82842ff95fca9313bb826ade8733d2dc25aa65781969282a5825fb5ac1b89c9d2e18da439aa3dc03486c2c405158559d0b1400e08593557e + checksum: 46d1753d660fe4225ccd89e91dd9f812db490326dfb835cfb786ab0b9a4ca25a39171a838661233b8f6f9a19294aaedaa962e19df915066beb80e7422749f7f1 languageName: node linkType: hard From 9ff8d01e93769cefe8d95da6729d47ab0b865009 Mon Sep 17 00:00:00 2001 From: Proddy Date: Thu, 13 Jul 2023 21:50:34 +0200 Subject: [PATCH 02/13] make standalone compile --- Makefile | 14 +- lib/espMqttClient/src/MqttClient.h | 294 +++++++++++++++-------------- lib_standalone/Arduino.cpp | 6 +- lib_standalone/Arduino.h | 10 +- lib_standalone/ESP8266React.h | 5 + lib_standalone/Network.h | 1 + lib_standalone/avr/pgmspace.h | 0 lib_standalone/espMqttClient.h | 130 ------------- platformio.ini | 56 ++---- 9 files changed, 189 insertions(+), 327 deletions(-) create mode 100644 lib_standalone/avr/pgmspace.h delete mode 100644 lib_standalone/espMqttClient.h diff --git a/Makefile b/Makefile index d4dd85b3e..e911b4558 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,9 @@ MAKEFLAGS+="j " #TARGET := $(notdir $(CURDIR)) TARGET := emsesp BUILD := build -SOURCES := src src/* lib_standalone lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src src/devices lib/ArduinoJson/src lib/PButton lib/semver -INCLUDES := src lib_standalone lib/ArduinoJson/src lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src lib/uuid-telnet/src lib/uuid-syslog/src lib/semver lib/* src/devices -LIBRARIES := +SOURCES := src src/* lib_standalone lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src src/devices lib/ArduinoJson/src lib/PButton lib/semver lib/espMqttClient/src lib/espMqttClient/src/* +INCLUDES := src lib_standalone lib/espMqttClient/src lib/espMqttClient/src/Transport lib/ArduinoJson/src lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src lib/uuid-telnet/src lib/uuid-syslog/src lib/semver lib/* src/devices +LIBRARIES := CPPCHECK = cppcheck # CHECKFLAGS = -q --force --std=c++17 @@ -36,8 +36,8 @@ CXX_STANDARD := -std=c++11 #---------------------------------------------------------------------- # Defined Symbols #---------------------------------------------------------------------- -DEFINES += -DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0 -DARDUINO -DEFINES += -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST +DEFINES += -DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0 +DEFINES += -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__ DEFINES += $(ARGS) DEFAULTS = -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\" @@ -52,7 +52,7 @@ CSOURCES := $(foreach dir,$(SOURCES),$(wildcard $(dir)/*.c)) CXXSOURCES := $(foreach dir,$(SOURCES),$(wildcard $(dir)/*.cpp)) OBJS := $(patsubst %,$(BUILD)/%.o,$(basename $(CSOURCES)) $(basename $(CXXSOURCES)) ) -DEPS := $(patsubst %,$(BUILD)/%.d,$(basename $(CSOURCES)) $(basename $(CXXSOURCES)) ) +DEPS := $(patsubst %,$(BUILD)/%.d,$(basename $(CSOURCES)) $(basename $(CXXSOURCES)) ) INCLUDE += $(addprefix -I,$(foreach dir,$(INCLUDES), $(wildcard $(dir)))) INCLUDE += $(addprefix -I,$(foreach dir,$(LIBRARIES),$(wildcard $(dir)/include))) @@ -79,7 +79,7 @@ CPPFLAGS += -g3 CPPFLAGS += -Os CFLAGS += $(CPPFLAGS) -CFLAGS += -Wall -Wextra -Werror -Wswitch-enum -Wno-unused-parameter -Wno-inconsistent-missing-override -Wno-unused-lambda-capture +CFLAGS += -Wall -Wextra -Werror -Wswitch-enum -Wno-unused-parameter CXXFLAGS += $(CFLAGS) -MMD diff --git a/lib/espMqttClient/src/MqttClient.h b/lib/espMqttClient/src/MqttClient.h index 6d36e0af5..dbcf7ec5b 100644 --- a/lib/espMqttClient/src/MqttClient.h +++ b/lib/espMqttClient/src/MqttClient.h @@ -24,167 +24,171 @@ the LICENSE file. #include "Transport/Transport.h" class MqttClient { - public: - virtual ~MqttClient(); - bool connected() const; - bool disconnected() const; - bool connect(); - bool disconnect(bool force = false); - template - uint16_t subscribe(const char* topic, uint8_t qos, Args&&... args) { - uint16_t packetId = _getNextPacketId(); - if (_state != State::connected) { - packetId = 0; - } else { - EMC_SEMAPHORE_TAKE(); - if (!_addPacket(packetId, topic, qos, std::forward(args) ...)) { - emc_log_e("Could not create SUBSCRIBE packet"); - packetId = 0; - } - EMC_SEMAPHORE_GIVE(); + public: + virtual ~MqttClient(); + bool connected() const; + bool disconnected() const; + bool connect(); + bool disconnect(bool force = false); + template + uint16_t subscribe(const char * topic, uint8_t qos, Args &&... args) { + uint16_t packetId = _getNextPacketId(); + if (_state != State::connected) { + packetId = 0; + } else { + EMC_SEMAPHORE_TAKE(); + if (!_addPacket(packetId, topic, qos, std::forward(args)...)) { + emc_log_e("Could not create SUBSCRIBE packet"); + packetId = 0; + } + EMC_SEMAPHORE_GIVE(); + } + return packetId; } - return packetId; - } - template - uint16_t unsubscribe(const char* topic, Args&&... args) { - uint16_t packetId = _getNextPacketId(); - if (_state != State::connected) { - packetId = 0; - } else { - EMC_SEMAPHORE_TAKE(); - if (!_addPacket(packetId, topic, std::forward(args) ...)) { - emc_log_e("Could not create UNSUBSCRIBE packet"); - packetId = 0; - } - EMC_SEMAPHORE_GIVE(); + template + uint16_t unsubscribe(const char * topic, Args &&... args) { + uint16_t packetId = _getNextPacketId(); + if (_state != State::connected) { + packetId = 0; + } else { + EMC_SEMAPHORE_TAKE(); + if (!_addPacket(packetId, topic, std::forward(args)...)) { + emc_log_e("Could not create UNSUBSCRIBE packet"); + packetId = 0; + } + EMC_SEMAPHORE_GIVE(); + } + return packetId; } - return packetId; - } - uint16_t publish(const char* topic, uint8_t qos, bool retain, const uint8_t* payload, size_t length); - uint16_t publish(const char* topic, uint8_t qos, bool retain, const char* payload); - uint16_t publish(const char* topic, uint8_t qos, bool retain, espMqttClientTypes::PayloadCallback callback, size_t length); - void clearQueue(bool deleteSessionData = false); // Not MQTT compliant and may cause unpredictable results when `deleteSessionData` = true! - const char* getClientId() const; - uint16_t getQueue() const; - void loop(); + uint16_t publish(const char * topic, uint8_t qos, bool retain, const uint8_t * payload, size_t length); + uint16_t publish(const char * topic, uint8_t qos, bool retain, const char * payload); + uint16_t publish(const char * topic, uint8_t qos, bool retain, espMqttClientTypes::PayloadCallback callback, size_t length); + void clearQueue(bool deleteSessionData = false); // Not MQTT compliant and may cause unpredictable results when `deleteSessionData` = true! + const char * getClientId() const; + uint16_t getQueue() const; + void loop(); - protected: - explicit MqttClient(espMqttClientTypes::UseInternalTask useInternalTask, uint8_t priority = 1, uint8_t core = 1); - espMqttClientTypes::UseInternalTask _useInternalTask; - espMqttClientInternals::Transport* _transport; + protected: + explicit MqttClient(espMqttClientTypes::UseInternalTask useInternalTask, uint8_t priority = 1, uint8_t core = 1); + espMqttClientTypes::UseInternalTask _useInternalTask; + espMqttClientInternals::Transport * _transport; - espMqttClientTypes::OnConnectCallback _onConnectCallback; - espMqttClientTypes::OnDisconnectCallback _onDisconnectCallback; - espMqttClientTypes::OnSubscribeCallback _onSubscribeCallback; - espMqttClientTypes::OnUnsubscribeCallback _onUnsubscribeCallback; - espMqttClientTypes::OnMessageCallback _onMessageCallback; - espMqttClientTypes::OnPublishCallback _onPublishCallback; - espMqttClientTypes::OnErrorCallback _onErrorCallback; - typedef void(*mqttClientHook)(void*); - const char* _clientId; - IPAddress _ip; - const char* _host; - uint16_t _port; - bool _useIp; - uint32_t _keepAlive; - bool _cleanSession; - const char* _username; - const char* _password; - const char* _willTopic; - const uint8_t* _willPayload; - uint16_t _willPayloadLength; - uint8_t _willQos; - bool _willRetain; - uint32_t _timeout; + espMqttClientTypes::OnConnectCallback _onConnectCallback; + espMqttClientTypes::OnDisconnectCallback _onDisconnectCallback; + espMqttClientTypes::OnSubscribeCallback _onSubscribeCallback; + espMqttClientTypes::OnUnsubscribeCallback _onUnsubscribeCallback; + espMqttClientTypes::OnMessageCallback _onMessageCallback; + espMqttClientTypes::OnPublishCallback _onPublishCallback; + espMqttClientTypes::OnErrorCallback _onErrorCallback; + typedef void (*mqttClientHook)(void *); + const char * _clientId; + IPAddress _ip; + const char * _host; + uint16_t _port; + bool _useIp; + uint32_t _keepAlive; + bool _cleanSession; + const char * _username; + const char * _password; + const char * _willTopic; + const uint8_t * _willPayload; + uint16_t _willPayloadLength; + uint8_t _willQos; + bool _willRetain; + uint32_t _timeout; - // state is protected to allow state changes by the transport system, defined in child classes - // eg. to allow AsyncTCP - enum class State { - disconnected = 0, - connectingTcp1 = 1, - connectingTcp2 = 2, - connectingMqtt = 3, - connected = 4, - disconnectingMqtt1 = 5, - disconnectingMqtt2 = 6, - disconnectingTcp1 = 7, - disconnectingTcp2 = 8 - }; - std::atomic _state; + // state is protected to allow state changes by the transport system, defined in child classes + // eg. to allow AsyncTCP + enum class State { + disconnected = 0, + connectingTcp1 = 1, + connectingTcp2 = 2, + connectingMqtt = 3, + connected = 4, + disconnectingMqtt1 = 5, + disconnectingMqtt2 = 6, + disconnectingTcp1 = 7, + disconnectingTcp2 = 8 + }; + std::atomic _state; - private: - char _generatedClientId[EMC_CLIENTID_LENGTH]; - uint16_t _packetId; + private: + char _generatedClientId[EMC_CLIENTID_LENGTH]; + uint16_t _packetId; #if defined(ARDUINO_ARCH_ESP32) - SemaphoreHandle_t _xSemaphore; - TaskHandle_t _taskHandle; - static void _loop(MqttClient* c); + SemaphoreHandle_t _xSemaphore; + TaskHandle_t _taskHandle; + static void _loop(MqttClient * c); #elif defined(ARDUINO_ARCH_ESP8266) && EMC_ESP8266_MULTITHREADING - std::atomic _xSemaphore = false; + std::atomic _xSemaphore = false; #elif defined(__linux__) - std::mutex mtx; + // added mutable to compile EMS-ESP standalone + mutable std::mutex mtx; #endif - uint8_t _rxBuffer[EMC_RX_BUFFER_SIZE]; - struct OutgoingPacket { - uint32_t timeSent; - espMqttClientInternals::Packet packet; + uint8_t _rxBuffer[EMC_RX_BUFFER_SIZE]; + struct OutgoingPacket { + uint32_t timeSent; + espMqttClientInternals::Packet packet; + template + OutgoingPacket(uint32_t t, espMqttClientTypes::Error error, Args &&... args) + : timeSent(t) + , packet(error, std::forward(args)...) { + } + }; + espMqttClientInternals::Outbox _outbox; + size_t _bytesSent; + espMqttClientInternals::Parser _parser; + uint32_t _lastClientActivity; + uint32_t _lastServerActivity; + bool _pingSent; + espMqttClientTypes::DisconnectReason _disconnectReason; + + uint16_t _getNextPacketId(); + template - OutgoingPacket(uint32_t t, espMqttClientTypes::Error error, Args&&... args) : - timeSent(t), - packet(error, std::forward(args) ...) {} - }; - espMqttClientInternals::Outbox _outbox; - size_t _bytesSent; - espMqttClientInternals::Parser _parser; - uint32_t _lastClientActivity; - uint32_t _lastServerActivity; - bool _pingSent; - espMqttClientTypes::DisconnectReason _disconnectReason; + bool _addPacket(Args &&... args) { + espMqttClientTypes::Error error(espMqttClientTypes::Error::SUCCESS); + espMqttClientInternals::Outbox::Iterator it = _outbox.emplace(0, error, std::forward(args)...); + if (it && error == espMqttClientTypes::Error::SUCCESS) + return true; + return false; + } - uint16_t _getNextPacketId(); + template + bool _addPacketFront(Args &&... args) { + espMqttClientTypes::Error error(espMqttClientTypes::Error::SUCCESS); + espMqttClientInternals::Outbox::Iterator it = _outbox.emplaceFront(0, error, std::forward(args)...); + if (it && error == espMqttClientTypes::Error::SUCCESS) + return true; + return false; + } - template - bool _addPacket(Args&&... args) { - espMqttClientTypes::Error error(espMqttClientTypes::Error::SUCCESS); - espMqttClientInternals::Outbox::Iterator it = _outbox.emplace(0, error, std::forward(args) ...); - if (it && error == espMqttClientTypes::Error::SUCCESS) return true; - return false; - } + void _checkOutbox(); + int _sendPacket(); + bool _advanceOutbox(); + void _checkIncoming(); + void _checkPing(); + void _checkTimeout(); - template - bool _addPacketFront(Args&&... args) { - espMqttClientTypes::Error error(espMqttClientTypes::Error::SUCCESS); - espMqttClientInternals::Outbox::Iterator it = _outbox.emplaceFront(0, error, std::forward(args) ...); - if (it && error == espMqttClientTypes::Error::SUCCESS) return true; - return false; - } + void _onConnack(); + void _onPublish(); + void _onPuback(); + void _onPubrec(); + void _onPubrel(); + void _onPubcomp(); + void _onSuback(); + void _onUnsuback(); - void _checkOutbox(); - int _sendPacket(); - bool _advanceOutbox(); - void _checkIncoming(); - void _checkPing(); - void _checkTimeout(); + void _clearQueue(int clearData); // 0: keep session, + // 1: keep only PUBLISH qos > 0 + // 2: delete all + void _onError(uint16_t packetId, espMqttClientTypes::Error error); - void _onConnack(); - void _onPublish(); - void _onPuback(); - void _onPubrec(); - void _onPubrel(); - void _onPubcomp(); - void _onSuback(); - void _onUnsuback(); - - void _clearQueue(int clearData); // 0: keep session, - // 1: keep only PUBLISH qos > 0 - // 2: delete all - void _onError(uint16_t packetId, espMqttClientTypes::Error error); - - #if defined(ARDUINO_ARCH_ESP32) - #if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO - size_t _highWaterMark; - #endif - #endif +#if defined(ARDUINO_ARCH_ESP32) +#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO + size_t _highWaterMark; +#endif +#endif }; diff --git a/lib_standalone/Arduino.cpp b/lib_standalone/Arduino.cpp index 56dd38695..34194b2d7 100644 --- a/lib_standalone/Arduino.cpp +++ b/lib_standalone/Arduino.cpp @@ -51,9 +51,9 @@ int main(int argc __attribute__((unused)), char * argv[] __attribute__((unused)) return 0; } -unsigned long millis() { - return __millis; -} +// unsigned long millis() { +// return __millis; +// } int64_t esp_timer_get_time() { return __millis; diff --git a/lib_standalone/Arduino.h b/lib_standalone/Arduino.h index afacf2578..0b83797e4 100644 --- a/lib_standalone/Arduino.h +++ b/lib_standalone/Arduino.h @@ -35,7 +35,7 @@ #include // #define IPAddress std::string -#define IPAddress String +// #define IPAddress String #define ICACHE_FLASH_ATTR #define ICACHE_RAM_ATTR @@ -171,7 +171,13 @@ extern NativeConsole Serial; extern ETHClass ETH; extern WiFiClass WiFi; -unsigned long millis(); +// unsigned long millis(); + +#if defined(__linux__) +#include // NOLINT [build/c++11] +#include // NOLINT [build/c++11] for yield() +#define millis() std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count() +#endif int64_t esp_timer_get_time(); diff --git a/lib_standalone/ESP8266React.h b/lib_standalone/ESP8266React.h index b673f41b8..e5d8e5b02 100644 --- a/lib_standalone/ESP8266React.h +++ b/lib_standalone/ESP8266React.h @@ -112,6 +112,11 @@ class ESP8266React { return _mqttClient; } + void setWill(const char * will_topic) { + } + void onMessage(espMqttClientTypes::OnMessageCallback callback) { + } + StatefulService * getNetworkSettingsService() { return &_settings; } diff --git a/lib_standalone/Network.h b/lib_standalone/Network.h index 836167df5..6fa63c151 100644 --- a/lib_standalone/Network.h +++ b/lib_standalone/Network.h @@ -3,6 +3,7 @@ #include #include +#include #define WiFiMode_t wifi_mode_t #define WIFI_OFF WIFI_MODE_NULL diff --git a/lib_standalone/avr/pgmspace.h b/lib_standalone/avr/pgmspace.h new file mode 100644 index 000000000..e69de29bb diff --git a/lib_standalone/espMqttClient.h b/lib_standalone/espMqttClient.h deleted file mode 100644 index 354850f49..000000000 --- a/lib_standalone/espMqttClient.h +++ /dev/null @@ -1,130 +0,0 @@ -#ifndef ESPMQTTCLIENT_H_ -#define ESPMQTTCLIENT_H_ - -#include "Arduino.h" -#include - -namespace espMqttClientTypes { - -enum class DisconnectReason : uint8_t { - USER_OK = 0, - MQTT_UNACCEPTABLE_PROTOCOL_VERSION = 1, - MQTT_IDENTIFIER_REJECTED = 2, - MQTT_SERVER_UNAVAILABLE = 3, - MQTT_MALFORMED_CREDENTIALS = 4, - MQTT_NOT_AUTHORIZED = 5, - TLS_BAD_FINGERPRINT = 6, - TCP_DISCONNECTED = 7 -}; -const char * disconnectReasonToString(DisconnectReason reason); - -enum class SubscribeReturncode : uint8_t { QOS0 = 0x00, QOS1 = 0x01, QOS2 = 0x02, FAIL = 0X80 }; -const char * subscribeReturncodeToString(SubscribeReturncode returnCode); - -enum class Error : uint8_t { SUCCESS = 0, OUT_OF_MEMORY = 1, MAX_RETRIES = 2, MALFORMED_PARAMETER = 3, MISC_ERROR = 4 }; -const char * errorToString(Error error); - -struct MessageProperties { - uint8_t qos; - bool dup; - bool retain; - uint16_t packetId; -}; - -typedef std::function OnConnectCallback; -typedef std::function OnDisconnectCallback; -typedef std::function OnSubscribeCallback; -typedef std::function OnUnsubscribeCallback; -typedef std::function OnMessageCallback; -typedef std::function OnPublishCallback; -typedef std::function PayloadCallback; -typedef std::function OnErrorCallback; - -} // namespace espMqttClientTypes - -class espMqttClient { - public: - espMqttClient(); - ~espMqttClient(); - - espMqttClient & setKeepAlive(uint16_t keepAlive); - espMqttClient & setClientId(const char * clientId); - espMqttClient & setCleanSession(bool cleanSession); - espMqttClient & setMaxTopicLength(uint16_t maxTopicLength); - espMqttClient & setCredentials(const char * username, const char * password = nullptr); - espMqttClient & setWill(const char * topic, uint8_t qos, bool retain, const char * payload = nullptr, size_t length = 0) { - return *this; - } - espMqttClient & setServer(IPAddress ip, uint16_t port); - espMqttClient & setServer(const char * host, uint16_t port); - - espMqttClient & onConnect(espMqttClientTypes::OnConnectCallback callback) { - return *this; - } - espMqttClient & onDisconnect(espMqttClientTypes::OnDisconnectCallback callback) { - return *this; - } - espMqttClient & onSubscribe(espMqttClientTypes::OnSubscribeCallback callback) { - return *this; - } - espMqttClient & onUnsubscribe(espMqttClientTypes::OnUnsubscribeCallback callback) { - return *this; - } - espMqttClient & onMessage(espMqttClientTypes::OnMessageCallback callback) { - return *this; - } - espMqttClient & onPublish(espMqttClientTypes::OnPublishCallback callback) { - return *this; - } - - bool connected() const { - return false; - } - void connect() { - } - void disconnect(bool force = false) { - } - uint16_t subscribe(const char * topic, uint8_t qos) { - return 1; - } - uint16_t unsubscribe(const char * topic) { - return 1; - } - uint16_t publish(const char * topic, uint8_t qos, bool retain, const char * payload = nullptr, size_t length = 0, bool dup = false, uint16_t message_id = 0) { - return 1; - } - - const char * getClientId() { - return "12"; - } - - uint16_t getQueue() const { - return 0; - } - - private: - bool _connected; - bool _connectPacketNotEnoughSpace; - bool _disconnectOnPoll; - bool _tlsBadFingerprint; - uint32_t _lastClientActivity; - uint32_t _lastServerActivity; - uint32_t _lastPingRequestTime; - char _generatedClientId[18 + 1]; // esp8266-abc123 and esp32-abcdef123456 - IPAddress _ip; - const char * _host; - bool _useIp; - uint16_t _port; - uint16_t _keepAlive; - bool _cleanSession; - const char * _clientId; - const char * _username; - const char * _password; - const char * _willTopic; - const char * _willPayload; - uint16_t _willPayloadLength; - uint8_t _willQos; - bool _willRetain; -}; - -#endif diff --git a/platformio.ini b/platformio.ini index dccd71b4c..e13e08f13 100644 --- a/platformio.ini +++ b/platformio.ini @@ -2,10 +2,10 @@ ; override any settings with your own local ones in pio_local.ini [platformio] -default_envs = esp32_4M +; default_envs = esp32_4M ; default_envs = lolin_s3 ; default_envs = esp32_16M -; default_envs = standalone +default_envs = standalone extra_configs = factory_settings.ini @@ -20,7 +20,6 @@ core_build_flags = ; -std=gnu++17 ; core_unbuild_flags = -std=gnu++11 -; core_unbuild_flags = -std=gnu++17 core_unbuild_flags = ; my_build_flags is set in pio_local.ini @@ -41,9 +40,12 @@ unbuild_flags = [espressi32_base] platform = espressif32 -; platform = espressif32@5.3.0 -; platform = espressif32@5.2.0 framework = arduino +build_flags = ${common.build_flags} +build_unflags = ${common.unbuild_flags} +extra_scripts = + pre:scripts/build_interface.py + scripts/rename_fw.py [env] monitor_speed = 115200 @@ -62,7 +64,7 @@ check_flags = ; build for GitHub Actions CI ; the Web interface is built seperately [env:ci] -platform = espressif32@5.2.0 +platform = espressif32 framework = arduino extra_scripts = scripts/rename_fw.py board = esp32dev @@ -84,99 +86,69 @@ build_flags = ${common.build_flags} -O2 build_unflags = ${common.unbuild_flags} [env:esp32_4M] -platform = espressif32@5.2.0 -framework = arduino -extra_scripts = - pre:scripts/build_interface.py - scripts/rename_fw.py +extends = espressi32_base board = esp32dev board_upload.flash_size = 4MB board_build.partitions = esp32_partition_4M.csv build_flags = ${common.build_flags} -Os -build_unflags = ${common.unbuild_flags} [env:esp32_4Mplus] extends = espressi32_base -extra_scripts = - pre:scripts/build_interface.py - scripts/rename_fw.py board = esp32dev board_upload.flash_size = 4MB board_build.partitions = esp32_asym_partition_4M.csv build_flags = ${common.build_flags} -build_unflags = ${common.unbuild_flags} [env:esp32_16M] extends = espressi32_base -extra_scripts = - pre:scripts/build_interface.py - scripts/rename_fw.py board = esp32dev board_upload.flash_size = 16MB board_build.partitions = esp32_partition_16M.csv build_flags = ${common.build_flags} -build_unflags = ${common.unbuild_flags} [env:lolin_c3_mini] extends = espressi32_base -extra_scripts = - pre:scripts/build_interface.py - scripts/rename_fw.py board = lolin_c3_mini board_upload.flash_size = 4MB board_build.partitions = esp32_asym_partition_4M.csv build_flags = ${common.build_flags} -build_unflags = ${common.unbuild_flags} ; lolin C3 mini v1 needs special wifi init. ; https://www.wemos.cc/en/latest/c3/c3_mini_1_0_0.html#about-wifi [env:lolin_c3_mini_v1] extends = espressi32_base -extra_scripts = - pre:scripts/build_interface.py - scripts/rename_fw.py board = lolin_c3_mini board_upload.flash_size = 4MB board_build.partitions = esp32_asym_partition_4M.csv build_flags = ${common.build_flags} -DBOARD_C3_MINI_V1 -build_unflags = ${common.unbuild_flags} [env:lolin_s2_mini] extends = espressi32_base -extra_scripts = - pre:scripts/build_interface.py - scripts/rename_fw.py board = lolin_s2_mini board_upload.flash_size = 4MB board_build.partitions = esp32_asym_partition_4M.csv build_flags = ${common.build_flags} -build_unflags = ${common.unbuild_flags} [env:lolin_s3] extends = espressi32_base -extra_scripts = - pre:scripts/build_interface.py - scripts/rename_fw.py board = lolin_s3 board_build.f_cpu = 240000000L board_upload.flash_size = 16MB board_build.partitions = esp32_partition_16M.csv -build_flags = ${common.build_flags} -O2 -build_unflags = ${common.unbuild_flags} board_upload.use_1200bps_touch = false board_upload.wait_for_upload_port = false +build_flags = ${common.build_flags} -O2 ; to build and run: pio run -e standalone -t exec [env:standalone] platform = native build_flags = - -DARDUINO - -DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0 + -DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0 -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\" -lpthread -std=gnu++11 -Og -ggdb -build_src_flags = +build_src_flags = -Wall -Wextra -Werror -Wswitch-enum -Wno-unused-parameter -Wno-inconsistent-missing-override -Wno-unused-lambda-capture -I./lib_standalone -I./lib/ArduinoJson/src @@ -185,6 +157,8 @@ build_src_flags = -I./lib/uuid-log/src -I./lib/semver -I./lib/PButton + -I./lib/espMqttClient/src + -I./lib/espMqttClient/src/Transport build_src_filter = +<*> -<.git/> @@ -194,5 +168,7 @@ build_src_filter = +<../lib/uuid-log> +<../lib/semver> +<../lib/PButton> + +<../lib/espMqttClient/src> + +<../lib/espMqttClient/src/Transport> lib_compat_mode = off lib_ldf_mode = off From 2a9be94f6e1d3a8c26845122343a7e0c9261d0fc Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 12:10:19 +0200 Subject: [PATCH 03/13] package cleanup --- interface/package.json | 2 +- interface/yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/package.json b/interface/package.json index 4ffc6d712..3984bd888 100644 --- a/interface/package.json +++ b/interface/package.json @@ -68,7 +68,7 @@ "prettier": "^3.0.0", "rollup-plugin-visualizer": "^5.9.2", "terser": "^5.19.0", - "vite": "^4.4.3", + "vite": "^4.4.4", "vite-plugin-svgr": "^3.2.0", "vite-tsconfig-paths": "^4.2.0" }, diff --git a/interface/yarn.lock b/interface/yarn.lock index 3c1cce40f..8d97732a9 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -1574,7 +1574,7 @@ __metadata: terser: ^5.19.0 typesafe-i18n: ^5.24.4 typescript: ^5.1.6 - vite: ^4.4.3 + vite: ^4.4.4 vite-plugin-svgr: ^3.2.0 vite-tsconfig-paths: ^4.2.0 languageName: unknown @@ -5980,9 +5980,9 @@ __metadata: languageName: node linkType: hard -"vite@npm:^4.4.3": - version: 4.4.3 - resolution: "vite@npm:4.4.3" +"vite@npm:^4.4.4": + version: 4.4.4 + resolution: "vite@npm:4.4.4" dependencies: esbuild: ^0.18.10 fsevents: ~2.3.2 @@ -6016,7 +6016,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: b92624b8a15629fa89778bb1841ece06cd78a704170d05fa49e1766f90a1ce75ece6d0b479f638047b4d2203057ec07ded935754d609bb90ab79870ab3485c14 + checksum: 7030c008595eecaf03800292ca6ac626941b7d90b9c18e3ca0de62f8127cb6f7624c2c5e4e5528260fff807996e56e099a6d3bd069a7644eedc13c7df081d818 languageName: node linkType: hard From af3ed871af9eb6d2dab0d89ff010a2714df2da31 Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 12:10:29 +0200 Subject: [PATCH 04/13] text change --- src/web/WebEntityService.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/WebEntityService.cpp b/src/web/WebEntityService.cpp index 12f4e7446..73569c8ce 100644 --- a/src/web/WebEntityService.cpp +++ b/src/web/WebEntityService.cpp @@ -30,7 +30,7 @@ WebEntityService::WebEntityService(AsyncWebServer * server, FS * fs, SecurityMan // load the settings when the service starts void WebEntityService::begin() { _fsPersistence.readFromFS(); - EMSESP::logger().info("Starting custom entity service"); + EMSESP::logger().info("Starting Custom entity service"); } // this creates the entity file, saving it to the FS From 1b623014c1dbd1171a309124f16a9708ebef4ec8 Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 12:11:22 +0200 Subject: [PATCH 05/13] added log message --- lib/framework/MqttSettingsService.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/framework/MqttSettingsService.cpp b/lib/framework/MqttSettingsService.cpp index 1135525b7..707c1e865 100644 --- a/lib/framework/MqttSettingsService.cpp +++ b/lib/framework/MqttSettingsService.cpp @@ -172,14 +172,14 @@ void MqttSettingsService::WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info) { } bool MqttSettingsService::configureMqtt() { - // disconnect if connected + // disconnect if already connected if (_mqttClient->connected()) { - emsesp::EMSESP::logger().info("Disconneting to configure"); + emsesp::EMSESP::logger().info("Disconnecting to configure"); _mqttClient->disconnect(true); } + // only connect if WiFi is connected and MQTT is enabled if (_state.enabled && emsesp::EMSESP::system_.network_connected() && !_state.host.isEmpty()) { - // if (_state.enabled && !_state.host.isEmpty()) { _reconfigureMqtt = false; #if CONFIG_IDF_TARGET_ESP32S3 if (_state.rootCA.length() > 0) { @@ -212,6 +212,8 @@ bool MqttSettingsService::configureMqtt() { static_cast(_mqttClient)->setCleanSession(_state.cleanSession); return _mqttClient->connect(); } + emsesp::EMSESP::logger().info("Connecting to MQTT broker..."); + return false; } From f3d3a386ee97bcf898a24b3357dfeb29a02e5110 Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 12:11:48 +0200 Subject: [PATCH 06/13] get standadlone working with espMqttClient --- Makefile | 4 ++-- lib_standalone/Arduino.cpp | 27 ++++++++++++++++++++++++--- lib_standalone/ESP8266React.h | 5 ++++- src/mqtt.cpp | 11 +++-------- src/mqtt.h | 4 ---- 5 files changed, 33 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index e911b4558..e2ff47a4a 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ LIBRARIES := CPPCHECK = cppcheck # CHECKFLAGS = -q --force --std=c++17 -CHECKFLAGS = -q --force --std=c++11 +CHECKFLAGS = -q --force --std=c++11 -pthread #---------------------------------------------------------------------- # Languages Standard @@ -37,7 +37,7 @@ CXX_STANDARD := -std=c++11 # Defined Symbols #---------------------------------------------------------------------- DEFINES += -DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0 -DEFINES += -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__ +DEFINES += -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__ -DEMC_RX_BUFFER_SIZE=1500 DEFINES += $(ARGS) DEFAULTS = -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\" diff --git a/lib_standalone/Arduino.cpp b/lib_standalone/Arduino.cpp index 34194b2d7..2afc4e78f 100644 --- a/lib_standalone/Arduino.cpp +++ b/lib_standalone/Arduino.cpp @@ -21,6 +21,10 @@ #include #include +#include +#include +#include + #include #include @@ -43,12 +47,28 @@ static unsigned long __millis = 0; static bool __output_pins[256]; static int __output_level[256]; +std::atomic_bool exitProgram(false); + +void ClientLoop(void * arg) { + (void)arg; + for (;;) { + loop(); + if (exitProgram) + break; + } +} + int main(int argc __attribute__((unused)), char * argv[] __attribute__((unused))) { setup(); - while (millis() <= 10 * 1000) { - loop(); + std::thread t = std::thread(ClientLoop, nullptr); + // while (millis() <= 10 * 1000) { + while (1) { + if (exitProgram) + break; + std::this_thread::yield(); } - return 0; + t.join(); + return EXIT_SUCCESS; } // unsigned long millis() { @@ -64,6 +84,7 @@ void delay(unsigned long millis) { } void yield(void) { + std::this_thread::yield(); } int snprintf_P(char * str, size_t size, const char * format, ...) { diff --git a/lib_standalone/ESP8266React.h b/lib_standalone/ESP8266React.h index e5d8e5b02..34552fa01 100644 --- a/lib_standalone/ESP8266React.h +++ b/lib_standalone/ESP8266React.h @@ -101,7 +101,10 @@ class ESP8266React { : _settings(server, fs, nullptr) , _securitySettingsService(server, fs){}; - void begin(){}; + void begin() { + // initialize mqtt + _mqttClient = new espMqttClient(); + }; void loop(){}; SecurityManager * getSecurityManager() { diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 99f7c1886..e3eec030b 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -393,12 +393,6 @@ void Mqtt::start() { [this](const espMqttClientTypes::MessageProperties & properties, const char * topic, const uint8_t * payload, size_t len, size_t index, size_t total) { on_message(topic, (const char *)payload, len); // receiving mqtt }); - - /* - mqttClient_->onPublish([this](uint16_t packetId) { - on_publish(packetId); // publish - }); - */ } void Mqtt::set_publish_time_boiler(uint16_t publish_time) { @@ -588,9 +582,10 @@ void Mqtt::ha_status() { // add sub or pub task to the queue. // the base is not included in the topic bool Mqtt::queue_message(const uint8_t operation, const std::string & topic, const std::string & payload, const bool retain) { - if (topic.empty()) { - return false; + if (!mqtt_enabled_ || topic.empty()) { + return false; // quit, not using MQTT } + uint16_t packet_id = 0; char fulltopic[MQTT_TOPIC_MAX_SIZE]; diff --git a/src/mqtt.h b/src/mqtt.h index ac3c1effe..15e87f8ca 100644 --- a/src/mqtt.h +++ b/src/mqtt.h @@ -104,11 +104,7 @@ class Mqtt { #endif static bool connected() { -#if defined(EMSESP_STANDALONE) - return true; -#else return mqttClient_->connected(); -#endif } static MqttClient * client() { From 7881abaca2206f117728bfb872166bf8e9f8d1df Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 12:12:53 +0200 Subject: [PATCH 07/13] run make from vsc --- .vscode/tasks.json | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 1e14f946b..edcb3abc1 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,20 +4,15 @@ "version": "2.0.0", "tasks": [ { - "label": "PlatformIO: Execute EMS-ESP (standalone)", "type": "shell", - "command": "./.pio/build/standalone/program", - "linux": { - "options": { - "env": { - // Workaround for sdl2 `-m32` crash - // https://bugs.launchpad.net/ubuntu/+source/libsdl2/+bug/1775067/comments/7 - "DBUS_FATAL_WARNINGS": "0" - } - } - }, - "dependsOn": ["PlatformIO: Build EMS-ESP (standalone)"], - "problemMatcher": [] + "label": "build standalone emsesp", + "command": "make", + "args": [], + "problemMatcher": ["$gcc"], + "group": { + "kind": "build", + "isDefault": true + } } ] } From 47303896682af0c8496a5fe3ba66bbc8a6eda44f Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 16:45:01 +0200 Subject: [PATCH 08/13] remove log line --- lib/framework/MqttSettingsService.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/framework/MqttSettingsService.cpp b/lib/framework/MqttSettingsService.cpp index 707c1e865..aef0d014d 100644 --- a/lib/framework/MqttSettingsService.cpp +++ b/lib/framework/MqttSettingsService.cpp @@ -212,7 +212,6 @@ bool MqttSettingsService::configureMqtt() { static_cast(_mqttClient)->setCleanSession(_state.cleanSession); return _mqttClient->connect(); } - emsesp::EMSESP::logger().info("Connecting to MQTT broker..."); return false; } From d1ebf378dc21cc20ba6847ecf5a6ec627c6fdd71 Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 16:45:14 +0200 Subject: [PATCH 09/13] update example --- pio_local.ini_example | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pio_local.ini_example b/pio_local.ini_example index 123610389..1e70e81db 100644 --- a/pio_local.ini_example +++ b/pio_local.ini_example @@ -13,10 +13,16 @@ ; -DEMSESP_EN_ONLY ; only EN translated entity names ; my_build_flags = -DEMSESP_DEBUG +[platformio] +default_envs = esp32_4M +; default_envs = esp32_16M +; default_envs = lolin_s3 +; default_envs = standalone + [env:esp32_4M] ; if using OTA enter your details below ; upload_protocol = espota -; upload_flags = +; upload_flags = ; --port=8266 ; --auth=ems-esp-neo ; upload_port = ems-esp.local @@ -25,19 +31,20 @@ upload_port = /dev/ttyUSB* ; upload_port = COM5 ; override arduino espressif core -; platform = espressif32 ; take latest -; platform = espressif32@5.2.0 +platform = espressif32 ; take latest +; platform = espressif32@5.3.0 extra_scripts = pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time scripts/rename_fw.py + ; post:scripts/app-tls-size.py [env:esp32_16M] -upload_port = /dev/ttyUSB* -; upload_port = COM3 +[env:lolin_s3] +upload_port = /dev/ttyACM0 extra_scripts = - ; pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time + pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time scripts/rename_fw.py ; pio run -e debug From 9ad9bc55364047a238206f158acc0ba6d0948052 Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 16:45:27 +0200 Subject: [PATCH 10/13] default esp32_4M --- platformio.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index e13e08f13..4b9a078cb 100644 --- a/platformio.ini +++ b/platformio.ini @@ -2,10 +2,10 @@ ; override any settings with your own local ones in pio_local.ini [platformio] -; default_envs = esp32_4M +default_envs = esp32_4M ; default_envs = lolin_s3 ; default_envs = esp32_16M -default_envs = standalone +; default_envs = standalone extra_configs = factory_settings.ini From 66799d0c6c16c96112ece7f1b1f3dfc72719be08 Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 16:45:38 +0200 Subject: [PATCH 11/13] update packages --- interface/package.json | 1 + interface/yarn.lock | 862 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 855 insertions(+), 8 deletions(-) diff --git a/interface/package.json b/interface/package.json index 3984bd888..70b5d9796 100644 --- a/interface/package.json +++ b/interface/package.json @@ -52,6 +52,7 @@ "@preact/preset-vite": "^2.5.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", + "cspell": "^6.31.1", "eslint": "^8.44.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", diff --git a/interface/yarn.lock b/interface/yarn.lock index 8d97732a9..8deea2580 100644 --- a/interface/yarn.lock +++ b/interface/yarn.lock @@ -318,6 +318,428 @@ __metadata: languageName: node linkType: hard +"@cspell/cspell-bundled-dicts@npm:6.31.1": + version: 6.31.1 + resolution: "@cspell/cspell-bundled-dicts@npm:6.31.1" + dependencies: + "@cspell/dict-ada": ^4.0.1 + "@cspell/dict-aws": ^3.0.0 + "@cspell/dict-bash": ^4.1.1 + "@cspell/dict-companies": ^3.0.9 + "@cspell/dict-cpp": ^5.0.2 + "@cspell/dict-cryptocurrencies": ^3.0.1 + "@cspell/dict-csharp": ^4.0.2 + "@cspell/dict-css": ^4.0.5 + "@cspell/dict-dart": ^2.0.2 + "@cspell/dict-django": ^4.0.2 + "@cspell/dict-docker": ^1.1.6 + "@cspell/dict-dotnet": ^5.0.0 + "@cspell/dict-elixir": ^4.0.2 + "@cspell/dict-en-common-misspellings": ^1.0.2 + "@cspell/dict-en-gb": 1.1.33 + "@cspell/dict-en_us": ^4.3.2 + "@cspell/dict-filetypes": ^3.0.0 + "@cspell/dict-fonts": ^3.0.1 + "@cspell/dict-fullstack": ^3.1.5 + "@cspell/dict-gaming-terms": ^1.0.4 + "@cspell/dict-git": ^2.0.0 + "@cspell/dict-golang": ^6.0.1 + "@cspell/dict-haskell": ^4.0.1 + "@cspell/dict-html": ^4.0.3 + "@cspell/dict-html-symbol-entities": ^4.0.0 + "@cspell/dict-java": ^5.0.5 + "@cspell/dict-k8s": ^1.0.1 + "@cspell/dict-latex": ^4.0.0 + "@cspell/dict-lorem-ipsum": ^3.0.0 + "@cspell/dict-lua": ^4.0.1 + "@cspell/dict-node": ^4.0.2 + "@cspell/dict-npm": ^5.0.5 + "@cspell/dict-php": ^4.0.1 + "@cspell/dict-powershell": ^5.0.1 + "@cspell/dict-public-licenses": ^2.0.2 + "@cspell/dict-python": ^4.0.2 + "@cspell/dict-r": ^2.0.1 + "@cspell/dict-ruby": ^5.0.0 + "@cspell/dict-rust": ^4.0.1 + "@cspell/dict-scala": ^5.0.0 + "@cspell/dict-software-terms": ^3.1.6 + "@cspell/dict-sql": ^2.1.0 + "@cspell/dict-svelte": ^1.0.2 + "@cspell/dict-swift": ^2.0.1 + "@cspell/dict-typescript": ^3.1.1 + "@cspell/dict-vue": ^3.0.0 + checksum: 410028900a67cf84e0c3c4bfc8f4cd1b71a331d2b9541d3018e9919d5645beb8553a118cfbf2a30ef2b5668331464fcbf5791d6bcc41fcf7e1601e5289a1df8a + languageName: node + linkType: hard + +"@cspell/cspell-pipe@npm:6.31.1": + version: 6.31.1 + resolution: "@cspell/cspell-pipe@npm:6.31.1" + checksum: 8f7fb655b5ec5a2677ba15db09409a02af512331d4b21845d4996029ed618aaf1a445d27f5666b403bb1b2ce0073c2ed695f65a5d68ad9c5b22b246eb670d5e8 + languageName: node + linkType: hard + +"@cspell/cspell-service-bus@npm:6.31.1": + version: 6.31.1 + resolution: "@cspell/cspell-service-bus@npm:6.31.1" + checksum: d162d71c6bc18b6153d4ba24c665a52365a143a84f6b9648fdeda19390c980c428e075f48727c649cc01816e9debe34230a0cb74ed30e952f175724ff797428c + languageName: node + linkType: hard + +"@cspell/cspell-types@npm:6.31.1": + version: 6.31.1 + resolution: "@cspell/cspell-types@npm:6.31.1" + checksum: c9da2b95fdb27571cdf720b8d768264b64888cdac575e80dc5882201594c9a07910478610a38fee1685e702e9705b757996fb771ca2d3a775a8fff42cb3e4aa3 + languageName: node + linkType: hard + +"@cspell/dict-ada@npm:^4.0.1": + version: 4.0.1 + resolution: "@cspell/dict-ada@npm:4.0.1" + checksum: 82a02bc475e929a7ecd7987d0288b6b7e736389279b9d6d00bc85b17e89212da484fb218e15c0d9053c2d08bf3ec90748feec60fc6acdd3000e3b8bfff4f6947 + languageName: node + linkType: hard + +"@cspell/dict-aws@npm:^3.0.0": + version: 3.0.0 + resolution: "@cspell/dict-aws@npm:3.0.0" + checksum: 8812e2bc7519d6b781042898afc0f4207a66301ad42043a9022d6ac658a6e47f54368bf2b62b42f7053af8045243730c49f817137b588020bba5afdb8ddf9b90 + languageName: node + linkType: hard + +"@cspell/dict-bash@npm:^4.1.1": + version: 4.1.1 + resolution: "@cspell/dict-bash@npm:4.1.1" + checksum: 5c541857694b5904951af0a94bcd81ed3acc7695b0943db9c4da2338be4d328dd09be7fd7f354fa29f8a7a1f32c8d111d5735cb0f9cbadd9c77a4c421dfa2a4f + languageName: node + linkType: hard + +"@cspell/dict-companies@npm:^3.0.9": + version: 3.0.17 + resolution: "@cspell/dict-companies@npm:3.0.17" + checksum: a3ec1a91896566c873eac934f3867f92e6ede7e721f9daa87691430e5333f320063384a746e67bd01c04775c5a16fc0c2f5907a01ad5315e23d6c29d9cf6e7f6 + languageName: node + linkType: hard + +"@cspell/dict-cpp@npm:^5.0.2": + version: 5.0.3 + resolution: "@cspell/dict-cpp@npm:5.0.3" + checksum: 16f72cc1de6c2874fe3c85c51d17782f0a04f3a8f4a51934b9cde072fec9d83b93495f7e9423f84fae0c1306f118b13a5fba7cf9a8b3727bd51d0fac1f65ff43 + languageName: node + linkType: hard + +"@cspell/dict-cryptocurrencies@npm:^3.0.1": + version: 3.0.1 + resolution: "@cspell/dict-cryptocurrencies@npm:3.0.1" + checksum: 698413437600666c25e8821730390bbd082253f615318bb2fdd7665810ddc9d97e6ca85fbf3c34c317dc3357de9f8dfedea61c95dca78a6759f897d85369fa65 + languageName: node + linkType: hard + +"@cspell/dict-csharp@npm:^4.0.2": + version: 4.0.2 + resolution: "@cspell/dict-csharp@npm:4.0.2" + checksum: 146b7edeb8aa1acf6b0ccb283a2a5e0e8f2612e6fc67cca9b26e0fabe954a92042d314860bb5418522d6db265bd5933b6c68004d2b8225ad89498bf795b51f89 + languageName: node + linkType: hard + +"@cspell/dict-css@npm:^4.0.5": + version: 4.0.6 + resolution: "@cspell/dict-css@npm:4.0.6" + checksum: 3cdbb8b102ec6cff63b85c970dca2c62027089e80a0cbe92bacd40ca55e987727a404ed67bb8042fdc852748c350ab79e1cc03749cf4042e4ed8b3855b9c4dc6 + languageName: node + linkType: hard + +"@cspell/dict-dart@npm:^2.0.2": + version: 2.0.2 + resolution: "@cspell/dict-dart@npm:2.0.2" + checksum: be0a571ce8f662a1a2599e348b0f699fec6e7f111ce20c4705837d35fdbefc14409cff4d6104fb8c2a2fc09e44141d7487059cdc315b1447c5248c9a1124d469 + languageName: node + linkType: hard + +"@cspell/dict-data-science@npm:^1.0.0": + version: 1.0.7 + resolution: "@cspell/dict-data-science@npm:1.0.7" + checksum: e1f13c9a812f2a96c18fe936be8f68ecc09122ee2479df23c9088d4b4352123d03336ac7a8797575fc418438cefb995f947792dec0bf46a005035a600ac5d256 + languageName: node + linkType: hard + +"@cspell/dict-django@npm:^4.0.2": + version: 4.1.0 + resolution: "@cspell/dict-django@npm:4.1.0" + checksum: 85b7f58d772f169f7471f2c1bcb8a0207cdff7c32677bf470bcbcc74ce6498269623cfcc7910730eeac7f052633f8d4c63574367c1afe5f46a2917748ed397ca + languageName: node + linkType: hard + +"@cspell/dict-docker@npm:^1.1.6": + version: 1.1.6 + resolution: "@cspell/dict-docker@npm:1.1.6" + checksum: ee81e2a6a8bf6d7a44269089ef704acd98253db7fe078419da8b2e956249c9ba9574f934e7d4880ac49fb9401a8a12e8f8752ad5972b3292f52b1c757c9eadd9 + languageName: node + linkType: hard + +"@cspell/dict-dotnet@npm:^5.0.0": + version: 5.0.0 + resolution: "@cspell/dict-dotnet@npm:5.0.0" + checksum: b55e2457f134aa99f9037c58a4441bb1e6b50a8ac399833b775517e14c84b84cf01e2ca8b75a93bccdc75ff9f656a4b0433c4bd82bfe830227848fc5a30ce1b4 + languageName: node + linkType: hard + +"@cspell/dict-elixir@npm:^4.0.2": + version: 4.0.3 + resolution: "@cspell/dict-elixir@npm:4.0.3" + checksum: c24b742b0615f310c89a05ded6648a63ee8e0a9d63326fd155846ce4acba2337a1cef3f58d653b9d8f4b6636d466dfeac2bf7122f374ae39a4d539894ebc5523 + languageName: node + linkType: hard + +"@cspell/dict-en-common-misspellings@npm:^1.0.2": + version: 1.0.2 + resolution: "@cspell/dict-en-common-misspellings@npm:1.0.2" + checksum: f7f0207fc93150b63a0ce3df6127ec56360832262bdd93ea9618b6bb9b254917a2e5d58868837cfbc411811ce48d7b7e22bd580cc312221cab04f72066e51e9e + languageName: node + linkType: hard + +"@cspell/dict-en-gb@npm:1.1.33": + version: 1.1.33 + resolution: "@cspell/dict-en-gb@npm:1.1.33" + checksum: 09563d1016f652dc8164a5f692be49beb78a847a54d5e470d406ae4db125bf8021db75d3db63f7a0c1d1b7a5dfbec4b709fb2ff3520447dcad690adb98d74130 + languageName: node + linkType: hard + +"@cspell/dict-en_us@npm:^4.3.2": + version: 4.3.4 + resolution: "@cspell/dict-en_us@npm:4.3.4" + checksum: 623b1751e0bee2792236c4785d5d37162354df1b0ca4d03e028ce8cd564e903e2faffdfab3b595526f957a88235574a55f6c5349dc3d4955c905137197775dbb + languageName: node + linkType: hard + +"@cspell/dict-filetypes@npm:^3.0.0": + version: 3.0.1 + resolution: "@cspell/dict-filetypes@npm:3.0.1" + checksum: 0cb4141360af43202460c573a12e900d79f285c58e9a3744e1339499ef47acc94984019681bc384ce135333cdce9ec10aa89600b7e2e6f3dbc741f69e4c2dd0e + languageName: node + linkType: hard + +"@cspell/dict-fonts@npm:^3.0.1": + version: 3.0.2 + resolution: "@cspell/dict-fonts@npm:3.0.2" + checksum: 69efaa7455242d0a5b62a6e8d0347429a73d3035a205d53025951207768e6950e76166c45f3dd130879ed2ee2c76d9902995cb603cae8a9ad6d2019015666c25 + languageName: node + linkType: hard + +"@cspell/dict-fullstack@npm:^3.1.5": + version: 3.1.5 + resolution: "@cspell/dict-fullstack@npm:3.1.5" + checksum: c6e02b9ac3cafee8e2fe913b725cb0fa9cb7ac35b5ec331160e1d4ec9c47237f12638a2b5637fd6b2933662ee9b6b1d1c524a9035df109e25fbacc6032ded6c4 + languageName: node + linkType: hard + +"@cspell/dict-gaming-terms@npm:^1.0.4": + version: 1.0.4 + resolution: "@cspell/dict-gaming-terms@npm:1.0.4" + checksum: 8ea51cb6a0b3c1f54ac4da9c97cfe007ddc2343382f8bc0c719df1dd9efe14d1d8178f4507884e7c780397775f6df5685d86544a069b6aff00e07e45889aa966 + languageName: node + linkType: hard + +"@cspell/dict-git@npm:^2.0.0": + version: 2.0.0 + resolution: "@cspell/dict-git@npm:2.0.0" + checksum: 3a14c96aaae224af32f1262cff81e30835727c633e3398ba54f3cfbf84719a1ff2a89a3833b842fc8aad0d9ae08c94cc186f4ac7684ad12a1f6500e595c1da6b + languageName: node + linkType: hard + +"@cspell/dict-golang@npm:^6.0.1": + version: 6.0.2 + resolution: "@cspell/dict-golang@npm:6.0.2" + checksum: d9b8dceb4376fb1411a8a6fd9e342934291afed68745e986b2a01116fb0951a460e1077e6826987c2752dc97dbfe169725efc7d43c8ca11d53f98a9bcc9f7fc2 + languageName: node + linkType: hard + +"@cspell/dict-haskell@npm:^4.0.1": + version: 4.0.1 + resolution: "@cspell/dict-haskell@npm:4.0.1" + checksum: 7693a06b74a393aec35b67304ae56dad1ce3509951bec64053d992011e0309e9c420edd13a073ab3e500c0ac53e15dd92472097d689f7602c6d9ad10a2ee0dab + languageName: node + linkType: hard + +"@cspell/dict-html-symbol-entities@npm:^4.0.0": + version: 4.0.0 + resolution: "@cspell/dict-html-symbol-entities@npm:4.0.0" + checksum: 35d3223f02f0d091ac6a93424d4c31a075ece530bee00853ee1f5827e5ed25d08407a522a3c747cbfbaa891333df3aa9cf6107a21f2a030667f74228655c9081 + languageName: node + linkType: hard + +"@cspell/dict-html@npm:^4.0.3": + version: 4.0.3 + resolution: "@cspell/dict-html@npm:4.0.3" + checksum: 12c457c8aaebe05fa226fc4abfa800b95ccfd95b6f10009907be399a1dd5a80648948a8795fa56f9ca42dc86ed90788f097bd02521bb85147926233b22231646 + languageName: node + linkType: hard + +"@cspell/dict-java@npm:^5.0.5": + version: 5.0.5 + resolution: "@cspell/dict-java@npm:5.0.5" + checksum: 5d71a08a5353986c16cabe454f6b704da8db76dd79ac36b5ac702f3ab406340bd8f7e63bb643ea0a8d2310a1a228e2956a848eb39ab4ef5e210e4e651da0e24f + languageName: node + linkType: hard + +"@cspell/dict-k8s@npm:^1.0.1": + version: 1.0.1 + resolution: "@cspell/dict-k8s@npm:1.0.1" + checksum: b8f86905c6bf130bac1587d027bfc83d490c16be9a7f89d2fc0ee96c7f5915011a23f8bd4ff9d22ed7a2568662880875a2c70fe1554af3f662d7f08f2d2bc8a7 + languageName: node + linkType: hard + +"@cspell/dict-latex@npm:^4.0.0": + version: 4.0.0 + resolution: "@cspell/dict-latex@npm:4.0.0" + checksum: d96392866378e680d2fe29770bb8f38b1abad8c2b5b29e003bdbfe7aee79de1841fe699b6e357629e7b94dbaf882fd33e5e316d066be7fc02f0cea6caa8dcde4 + languageName: node + linkType: hard + +"@cspell/dict-lorem-ipsum@npm:^3.0.0": + version: 3.0.0 + resolution: "@cspell/dict-lorem-ipsum@npm:3.0.0" + checksum: 0eb2f6c199d74123d3c29c0c7352ce2ab4cbba85c6ff45882bede108a69d8bd156f591a191a822ed2a5b7e7067355f7358456f7c39e27e81b3bedf2932997279 + languageName: node + linkType: hard + +"@cspell/dict-lua@npm:^4.0.1": + version: 4.0.1 + resolution: "@cspell/dict-lua@npm:4.0.1" + checksum: e959948d5f4414aa617725bd756899a7f9fb07dce0c1dcfb7932747af759807f548d7bb1d54a207e349f08905e4aaf2ed9965c2194db486a599be18144ac7cdd + languageName: node + linkType: hard + +"@cspell/dict-node@npm:^4.0.2": + version: 4.0.2 + resolution: "@cspell/dict-node@npm:4.0.2" + checksum: 3ecb62cfbba4711cfbed570b9d3c7526f4639231878f9962aa3e0c91284f3e02319cda872e8f31fe06c818247143f328bf414ace4922df49c0f70bd73301a229 + languageName: node + linkType: hard + +"@cspell/dict-npm@npm:^5.0.5": + version: 5.0.7 + resolution: "@cspell/dict-npm@npm:5.0.7" + checksum: 8091ee94d531ee39c01f416fe5df68a661afe31b23be0ec8ec23b0c46fa05f7f86e343771dde026e43d5a07d129e2ab5942ab3119fa6c8450fc04fe66474d921 + languageName: node + linkType: hard + +"@cspell/dict-php@npm:^4.0.1": + version: 4.0.1 + resolution: "@cspell/dict-php@npm:4.0.1" + checksum: 41c31347f2f6c2692317dad65d402a215a718f73313a0ec1da8c2bcf13c829fa2db90b9ce702d30af9412020bf5a70c945a27e44af6e4ddf4e697a666deb742d + languageName: node + linkType: hard + +"@cspell/dict-powershell@npm:^5.0.1": + version: 5.0.2 + resolution: "@cspell/dict-powershell@npm:5.0.2" + checksum: 4068e8a1b3b2c4a3d0a1f8a4a87277ac9ae04cd539149b715c7ac75f2a63757670c6b527ec70d0361a2f2d85c1d4713acf8d154536121a9ac18f3ff81d899589 + languageName: node + linkType: hard + +"@cspell/dict-public-licenses@npm:^2.0.2": + version: 2.0.2 + resolution: "@cspell/dict-public-licenses@npm:2.0.2" + checksum: 5bcb6e2b0699326551995db0e7636adadedf609b40ad4f284fe1a4c076b41e67509120d974eaf244210116bcc8bd5d7f50014b4cef3c8bd207449b5337c2abf3 + languageName: node + linkType: hard + +"@cspell/dict-python@npm:^4.0.2": + version: 4.1.2 + resolution: "@cspell/dict-python@npm:4.1.2" + dependencies: + "@cspell/dict-data-science": ^1.0.0 + checksum: fdde2c495a26e926af1fcc888139c9699c555dd00bcbc09292be4b1932c2fdff6e3626afce18eddaaf3a91a9b1fc98c9bafc06ebe83a15a9712c0f017f7e6f33 + languageName: node + linkType: hard + +"@cspell/dict-r@npm:^2.0.1": + version: 2.0.1 + resolution: "@cspell/dict-r@npm:2.0.1" + checksum: c8eead19fed04ff748c8ac75c55c4cf32b0383b0b9d05a23299e7e5d2d6f0c33fe94ff4c73080fdbd5b7e2fcdeaf726373a993122ec35e3a8f2b61f202c4a837 + languageName: node + linkType: hard + +"@cspell/dict-ruby@npm:^5.0.0": + version: 5.0.0 + resolution: "@cspell/dict-ruby@npm:5.0.0" + checksum: d591ff318733421c958b80a8e8c7dc791ac0232b8b9e628c857aec45fa8ebaffc6242679f75b411b109753613d2bf2ff468e7e0ee1207bdc1f24d3669bcb82e3 + languageName: node + linkType: hard + +"@cspell/dict-rust@npm:^4.0.1": + version: 4.0.1 + resolution: "@cspell/dict-rust@npm:4.0.1" + checksum: 724441dbc769d67ab3eac9a7d7b5c2734158619d2fea65069a955f036894551f8d074f223a8dbad7e5f326b42a9b5e4341f976210708ef16c27e428c024dae35 + languageName: node + linkType: hard + +"@cspell/dict-scala@npm:^5.0.0": + version: 5.0.0 + resolution: "@cspell/dict-scala@npm:5.0.0" + checksum: 6ca476b07610b0602b8e0d4e8147418c4d6046bee2d0d7d9468fa57e84c305e93ab4a4a8eded7cbd660792bf22869c435a4f9dcfab41584ffa03f1884d27ae94 + languageName: node + linkType: hard + +"@cspell/dict-software-terms@npm:^3.1.6": + version: 3.2.0 + resolution: "@cspell/dict-software-terms@npm:3.2.0" + checksum: f90977a6d6476b580c52d42b09f18c7d82dba2a247d23128dc533264c63d8f9157986aca8e2b25628c1700676858d7d8f9c62138495e92588555175ab9f0ad60 + languageName: node + linkType: hard + +"@cspell/dict-sql@npm:^2.1.0": + version: 2.1.0 + resolution: "@cspell/dict-sql@npm:2.1.0" + checksum: 284a0d876ca52e208649955a7cab1553cde3a86066bc36b1a1e44b64cda97eeb925a55bd8c8b8a2a724fe9ba8b281b5580c0350fc632023a9eece32e10aafc69 + languageName: node + linkType: hard + +"@cspell/dict-svelte@npm:^1.0.2": + version: 1.0.2 + resolution: "@cspell/dict-svelte@npm:1.0.2" + checksum: bd650fd25d2ea83808a69eb2a6cb7a5b82295c3dde1c334fc54ff439287c5bf13e3293397e2c45e8b2d1b69fd133e17f4eb920b64df2571c5a399ac1e206f551 + languageName: node + linkType: hard + +"@cspell/dict-swift@npm:^2.0.1": + version: 2.0.1 + resolution: "@cspell/dict-swift@npm:2.0.1" + checksum: e29ffc8379d50ef9397018c25b1be05177d4ecb1e18d3b97834f9edf0306af349b5593d7d93a7f2624616c1beeb35eb1e56560d351f459b776c3dd6b2c0ac601 + languageName: node + linkType: hard + +"@cspell/dict-typescript@npm:^3.1.1": + version: 3.1.1 + resolution: "@cspell/dict-typescript@npm:3.1.1" + checksum: c80ffb5fc16ac0fe5d9f58ca120df8e34a1d2d7afad8293df7fa5f9f6236e8340c47745ffb1559cba24122cb429aa7af63c5b8efeb4d59edd49d556afe4994fe + languageName: node + linkType: hard + +"@cspell/dict-vue@npm:^3.0.0": + version: 3.0.0 + resolution: "@cspell/dict-vue@npm:3.0.0" + checksum: 2995b912e26cf88cb6ec9728a9adc5b24a0243c001887d425b14a61ef2be22aca38fa99a84d7698d8982aef65c8db4abf583c3d916c2166b9e8d99cec80800cd + languageName: node + linkType: hard + +"@cspell/dynamic-import@npm:6.31.1": + version: 6.31.1 + resolution: "@cspell/dynamic-import@npm:6.31.1" + dependencies: + import-meta-resolve: ^2.2.2 + checksum: ba020bc5477e50649a4978f58eb830b3e4d8b3b003aa2cea2dc13c0b28032f64cb7b116ffe5157d905ab55c7a8b7641719995cda9152225688a49482309d5469 + languageName: node + linkType: hard + +"@cspell/strong-weak-map@npm:6.31.1": + version: 6.31.1 + resolution: "@cspell/strong-weak-map@npm:6.31.1" + checksum: f53acf74a065d33344b35fb81fde54a9cc2a899683f7062384e0050d219047fd41714f1bac2b892623cc64acacfa1fcf3ad4efdc93b99db85bac8999cc310cd7 + languageName: node + linkType: hard + "@emotion/babel-plugin@npm:^11.11.0": version: 11.11.0 resolution: "@emotion/babel-plugin@npm:11.11.0" @@ -1544,6 +1966,7 @@ __metadata: "@typescript-eslint/parser": ^6.0.0 alova: ^2.9.2 async-validator: ^4.2.5 + cspell: ^6.31.1 eslint: ^8.44.0 eslint-config-airbnb: ^19.0.4 eslint-config-airbnb-typescript: ^17.1.0 @@ -1759,6 +2182,13 @@ __metadata: languageName: node linkType: hard +"array-timsort@npm:^1.0.3": + version: 1.0.3 + resolution: "array-timsort@npm:1.0.3" + checksum: bd3a1707b621947265c89867e67c9102b9b9f4c50f5b3974220112290d8b60d26ce60595edec5deed3325207b759d70b758bed3cd310b5ddadb835657ffb6d12 + languageName: node + linkType: hard + "array-union@npm:^2.1.0": version: 2.1.0 resolution: "array-union@npm:2.1.0" @@ -1985,7 +2415,7 @@ __metadata: languageName: node linkType: hard -"callsites@npm:^3.0.0": +"callsites@npm:^3.0.0, callsites@npm:^3.1.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" checksum: fff92277400eb06c3079f9e74f3af120db9f8ea03bad0e84d9aede54bbe2d44a56cccb5f6cf12211f93f52306df87077ecec5b712794c5a9b5dac6d615a3f301 @@ -2017,7 +2447,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0": +"chalk@npm:^4.0.0, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -2060,6 +2490,16 @@ __metadata: languageName: node linkType: hard +"clear-module@npm:^4.1.2": + version: 4.1.2 + resolution: "clear-module@npm:4.1.2" + dependencies: + parent-module: ^2.0.0 + resolve-from: ^5.0.0 + checksum: 73207f06af256e3c8901ceaa74f7e4468a777aa68dedc7f745db4116861a7f8e69c558e16dbdf7b3d2295675d5896f916ba55b5dc737dda81792dbeee1488127 + languageName: node + linkType: hard + "cliui@npm:^8.0.1": version: 8.0.1 resolution: "cliui@npm:8.0.1" @@ -2126,6 +2566,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^10.0.0": + version: 10.0.1 + resolution: "commander@npm:10.0.1" + checksum: 53f33d8927758a911094adadda4b2cbac111a5b377d8706700587650fd8f45b0bbe336de4b5c3fe47fd61f420a3d9bd452b6e0e6e5600a7e74d7bf0174f6efe3 + languageName: node + linkType: hard + "commander@npm:^2.20.0": version: 2.20.3 resolution: "commander@npm:2.20.3" @@ -2133,6 +2580,19 @@ __metadata: languageName: node linkType: hard +"comment-json@npm:^4.2.3": + version: 4.2.3 + resolution: "comment-json@npm:4.2.3" + dependencies: + array-timsort: ^1.0.3 + core-util-is: ^1.0.3 + esprima: ^4.0.1 + has-own-prop: ^2.0.0 + repeat-string: ^1.6.1 + checksum: e8a0d3a6d75d92551f9a7e6fefa31f3d831dc33117b0b9432f061f45a571c85c16143e4110693d450f6eca20841db43f5429ac0d801673bcf03e9973ab1c31af + languageName: node + linkType: hard + "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -2140,6 +2600,20 @@ __metadata: languageName: node linkType: hard +"configstore@npm:^5.0.1": + version: 5.0.1 + resolution: "configstore@npm:5.0.1" + dependencies: + dot-prop: ^5.2.0 + graceful-fs: ^4.1.2 + make-dir: ^3.0.0 + unique-string: ^2.0.0 + write-file-atomic: ^3.0.0 + xdg-basedir: ^4.0.0 + checksum: 5af23830e78bdc56cbe92a2f81e87f1d3a39e96e51a0ab2a8bc79bbbc5d4440a48d92833b3fd9c6d34b4a9c4c5853c8487b8e6e68593e7ecbc7434822f7aced3 + languageName: node + linkType: hard + "confusing-browser-globals@npm:^1.0.10": version: 1.0.11 resolution: "confusing-browser-globals@npm:1.0.11" @@ -2161,6 +2635,25 @@ __metadata: languageName: node linkType: hard +"core-util-is@npm:^1.0.3": + version: 1.0.3 + resolution: "core-util-is@npm:1.0.3" + checksum: 90a0e40abbddfd7618f8ccd63a74d88deea94e77d0e8dbbea059fa7ebebb8fbb4e2909667fe26f3a467073de1a542ebe6ae4c73a73745ac5833786759cd906c9 + languageName: node + linkType: hard + +"cosmiconfig@npm:8.0.0": + version: 8.0.0 + resolution: "cosmiconfig@npm:8.0.0" + dependencies: + import-fresh: ^3.2.1 + js-yaml: ^4.1.0 + parse-json: ^5.0.0 + path-type: ^4.0.0 + checksum: cea301202bb68373f9c8ccc77a6002aab1032f327dd1458e5932ee1a2f48919c881074d702cece91f18275673817872a0d3d00eb46f30a33c8f2009dbbac0e5c + languageName: node + linkType: hard + "cosmiconfig@npm:^7.0.0": version: 7.1.0 resolution: "cosmiconfig@npm:7.1.0" @@ -2210,6 +2703,136 @@ __metadata: languageName: node linkType: hard +"crypto-random-string@npm:^2.0.0": + version: 2.0.0 + resolution: "crypto-random-string@npm:2.0.0" + checksum: 288589b2484fe787f9e146f56c4be90b940018f17af1b152e4dde12309042ff5a2bf69e949aab8b8ac253948381529cc6f3e5a2427b73643a71ff177fa122b37 + languageName: node + linkType: hard + +"cspell-dictionary@npm:6.31.1": + version: 6.31.1 + resolution: "cspell-dictionary@npm:6.31.1" + dependencies: + "@cspell/cspell-pipe": 6.31.1 + "@cspell/cspell-types": 6.31.1 + cspell-trie-lib: 6.31.1 + fast-equals: ^4.0.3 + gensequence: ^5.0.2 + checksum: 9d5807004125453ce6e740277c6493caebf54a92bcf06dcaa7b410812bcc62f97439c85b694a020eb2758492a31793d53a737b041c8188b20d1442753613c8a6 + languageName: node + linkType: hard + +"cspell-gitignore@npm:6.31.1": + version: 6.31.1 + resolution: "cspell-gitignore@npm:6.31.1" + dependencies: + cspell-glob: 6.31.1 + find-up: ^5.0.0 + bin: + cspell-gitignore: bin.mjs + checksum: f8eaaee8762bfb70ab442179b45ac4e80b740c8aaebfae2427595a0965c5b4e020d13de57bb0db706d63938c6bc08ff132eecd0f50545d8621c71e78fe1deebb + languageName: node + linkType: hard + +"cspell-glob@npm:6.31.1": + version: 6.31.1 + resolution: "cspell-glob@npm:6.31.1" + dependencies: + micromatch: ^4.0.5 + checksum: 02648a20fca9ee79ea197d849e9a64f5f96753fd3823339928916b68e89c004edba0d2112a8b2b6984e29086892d3d48d911aae5bdaff1c5e54548309ab522e4 + languageName: node + linkType: hard + +"cspell-grammar@npm:6.31.1": + version: 6.31.1 + resolution: "cspell-grammar@npm:6.31.1" + dependencies: + "@cspell/cspell-pipe": 6.31.1 + "@cspell/cspell-types": 6.31.1 + bin: + cspell-grammar: bin.mjs + checksum: ede1aa24c313a27c25d134da80f0da1bd4bc3e9ed93ac0e8379344aa5ab7876c249ab72b197753e3bdc7e7ab0d34b16dbe8fa3a44d306001931948db89b2f06a + languageName: node + linkType: hard + +"cspell-io@npm:6.31.1": + version: 6.31.1 + resolution: "cspell-io@npm:6.31.1" + dependencies: + "@cspell/cspell-service-bus": 6.31.1 + node-fetch: ^2.6.9 + checksum: 00d2322d85d49fdf5d9d6a9ab9353b2366ff2834593b8920029376d31f198df5c73f7e15c683f24e95532fef50230819d78a6c7b00cd84a8f5d808550db83514 + languageName: node + linkType: hard + +"cspell-lib@npm:6.31.1": + version: 6.31.1 + resolution: "cspell-lib@npm:6.31.1" + dependencies: + "@cspell/cspell-bundled-dicts": 6.31.1 + "@cspell/cspell-pipe": 6.31.1 + "@cspell/cspell-types": 6.31.1 + "@cspell/strong-weak-map": 6.31.1 + clear-module: ^4.1.2 + comment-json: ^4.2.3 + configstore: ^5.0.1 + cosmiconfig: 8.0.0 + cspell-dictionary: 6.31.1 + cspell-glob: 6.31.1 + cspell-grammar: 6.31.1 + cspell-io: 6.31.1 + cspell-trie-lib: 6.31.1 + fast-equals: ^4.0.3 + find-up: ^5.0.0 + gensequence: ^5.0.2 + import-fresh: ^3.3.0 + resolve-from: ^5.0.0 + resolve-global: ^1.0.0 + vscode-languageserver-textdocument: ^1.0.8 + vscode-uri: ^3.0.7 + checksum: 46b1d9411fa7ba98accbfb18a3a327446dfd206645309f9bc53178bc133d5fd9a4a107edb36fd2913c270faaf5847d3a48b4f7bcdbcb971de21a4fa90aea6aa8 + languageName: node + linkType: hard + +"cspell-trie-lib@npm:6.31.1": + version: 6.31.1 + resolution: "cspell-trie-lib@npm:6.31.1" + dependencies: + "@cspell/cspell-pipe": 6.31.1 + "@cspell/cspell-types": 6.31.1 + gensequence: ^5.0.2 + checksum: 0b958b82a554bc3ef84d225c69f8cc06c2428754aee9726170b8d8ab286795f45524e2ec2ecc5b6f64535712371eb0d095550602285d7571ddddecf58d883a8e + languageName: node + linkType: hard + +"cspell@npm:^6.31.1": + version: 6.31.1 + resolution: "cspell@npm:6.31.1" + dependencies: + "@cspell/cspell-pipe": 6.31.1 + "@cspell/dynamic-import": 6.31.1 + chalk: ^4.1.2 + commander: ^10.0.0 + cspell-gitignore: 6.31.1 + cspell-glob: 6.31.1 + cspell-io: 6.31.1 + cspell-lib: 6.31.1 + fast-glob: ^3.2.12 + fast-json-stable-stringify: ^2.1.0 + file-entry-cache: ^6.0.1 + get-stdin: ^8.0.0 + imurmurhash: ^0.1.4 + semver: ^7.3.8 + strip-ansi: ^6.0.1 + vscode-uri: ^3.0.7 + bin: + cspell: bin.js + cspell-esm: bin.mjs + checksum: 81807ecfa28fa961d710b8a4d3336efd53d9162bd765ab1742bfb945c7969b2552e84741251036aa594175ca34a1555aec6d5a9a245ad073cb68b7aeabc1daea + languageName: node + linkType: hard + "csstype@npm:^3.0.2, csstype@npm:^3.1.2": version: 3.1.2 resolution: "csstype@npm:3.1.2" @@ -2356,6 +2979,15 @@ __metadata: languageName: node linkType: hard +"dot-prop@npm:^5.2.0": + version: 5.3.0 + resolution: "dot-prop@npm:5.3.0" + dependencies: + is-obj: ^2.0.0 + checksum: 93f0d343ef87fe8869320e62f2459f7e70f49c6098d948cc47e060f4a3f827d0ad61e83cb82f2bd90cd5b9571b8d334289978a43c0f98fea4f0e99ee8faa0599 + languageName: node + linkType: hard + "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -2916,6 +3548,16 @@ __metadata: languageName: node linkType: hard +"esprima@npm:^4.0.1": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3 + languageName: node + linkType: hard + "esquery@npm:^1.4.2": version: 1.5.0 resolution: "esquery@npm:1.5.0" @@ -3017,7 +3659,14 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0": +"fast-equals@npm:^4.0.3": + version: 4.0.3 + resolution: "fast-equals@npm:4.0.3" + checksum: 87fd2609c945ee61e9ed4d041eb2a8f92723fc02884115f67e429dd858d880279e962334894f116b3e9b223f387d246e3db5424ae779287849015ddadbf5ff27 + languageName: node + linkType: hard + +"fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0": version: 3.3.0 resolution: "fast-glob@npm:3.3.0" dependencies: @@ -3030,7 +3679,7 @@ __metadata: languageName: node linkType: hard -"fast-json-stable-stringify@npm:^2.0.0": +"fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" checksum: 7f081eb0b8a64e0057b3bb03f974b3ef00135fbf36c1c710895cd9300f13c94ba809bb3a81cf4e1b03f6e5285610a61abbd7602d0652de423144dfee5a389c9b @@ -3219,6 +3868,13 @@ __metadata: languageName: node linkType: hard +"gensequence@npm:^5.0.2": + version: 5.0.2 + resolution: "gensequence@npm:5.0.2" + checksum: 6aa471f2676073edab397a1e48f49a377e292adb671d1961f1159b97499ed4c5d466a23cb6340f9d4e953269fba8230a4c43c3f1e01e124d949b9b65aceb3827 + languageName: node + linkType: hard + "gensync@npm:^1.0.0-beta.2": version: 1.0.0-beta.2 resolution: "gensync@npm:1.0.0-beta.2" @@ -3245,6 +3901,13 @@ __metadata: languageName: node linkType: hard +"get-stdin@npm:^8.0.0": + version: 8.0.0 + resolution: "get-stdin@npm:8.0.0" + checksum: b71b72b83928221052f713b3b6247ebf1ceaeb4ef76937778557537fd51ad3f586c9e6a7476865022d9394b39b74eed1dc7514052fa74d80625276253571b76f + languageName: node + linkType: hard + "get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": version: 6.0.1 resolution: "get-stream@npm:6.0.1" @@ -3318,6 +3981,15 @@ __metadata: languageName: node linkType: hard +"global-dirs@npm:^0.1.1": + version: 0.1.1 + resolution: "global-dirs@npm:0.1.1" + dependencies: + ini: ^1.3.4 + checksum: 3608072e58962396c124ad5a1cfb3f99ee76c998654a3432d82977b3c3eeb09dc8a5a2a9849b2b8113906c8d0aad89ce362c22e97cec5fe34405bbf4f3cdbe7a + languageName: node + linkType: hard + "globals@npm:^11.1.0": version: 11.12.0 resolution: "globals@npm:11.12.0" @@ -3428,6 +4100,13 @@ __metadata: languageName: node linkType: hard +"has-own-prop@npm:^2.0.0": + version: 2.0.0 + resolution: "has-own-prop@npm:2.0.0" + checksum: 2745497283d80228b5c5fbb8c63ab1029e604bce7db8d4b36255e427b3695b2153dc978b176674d0dd2a23f132809e04d7ef41fefc0ab85870a5caa918c5c0d9 + languageName: node + linkType: hard + "has-property-descriptors@npm:^1.0.0": version: 1.0.0 resolution: "has-property-descriptors@npm:1.0.0" @@ -3575,7 +4254,7 @@ __metadata: languageName: node linkType: hard -"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1": +"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" dependencies: @@ -3585,6 +4264,13 @@ __metadata: languageName: node linkType: hard +"import-meta-resolve@npm:^2.2.2": + version: 2.2.2 + resolution: "import-meta-resolve@npm:2.2.2" + checksum: 80873aebf0d2a66e824e278fb6cbb16a6660f86df49b367404e5de80928720ecb44f643243b46dc5c5fae506abb666ef54d6f281b45ee0f1034951acb2261eb5 + languageName: node + linkType: hard + "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -3616,6 +4302,13 @@ __metadata: languageName: node linkType: hard +"ini@npm:^1.3.4": + version: 1.3.8 + resolution: "ini@npm:1.3.8" + checksum: ec93838d2328b619532e4f1ff05df7909760b6f66d9c9e2ded11e5c1897d6f2f9980c54dd638f88654b00919ce31e827040631eab0a3969e4d1abefa0719516a + languageName: node + linkType: hard + "internal-slot@npm:^1.0.3, internal-slot@npm:^1.0.5": version: 1.0.5 resolution: "internal-slot@npm:1.0.5" @@ -3787,6 +4480,13 @@ __metadata: languageName: node linkType: hard +"is-obj@npm:^2.0.0": + version: 2.0.0 + resolution: "is-obj@npm:2.0.0" + checksum: 85044ed7ba8bd169e2c2af3a178cacb92a97aa75de9569d02efef7f443a824b5e153eba72b9ae3aca6f8ce81955271aa2dc7da67a8b720575d3e38104208cb4e + languageName: node + linkType: hard + "is-path-inside@npm:^3.0.3": version: 3.0.3 resolution: "is-path-inside@npm:3.0.3" @@ -3858,6 +4558,13 @@ __metadata: languageName: node linkType: hard +"is-typedarray@npm:^1.0.0": + version: 1.0.0 + resolution: "is-typedarray@npm:1.0.0" + checksum: 4c096275ba041a17a13cca33ac21c16bc4fd2d7d7eb94525e7cd2c2f2c1a3ab956e37622290642501ff4310601e413b675cf399ad6db49855527d2163b3eeeec + languageName: node + linkType: hard + "is-weakref@npm:^1.0.2": version: 1.0.2 resolution: "is-weakref@npm:1.0.2" @@ -4115,6 +4822,15 @@ __metadata: languageName: node linkType: hard +"make-dir@npm:^3.0.0": + version: 3.1.0 + resolution: "make-dir@npm:3.1.0" + dependencies: + semver: ^6.0.0 + checksum: 56aaafefc49c2dfef02c5c95f9b196c4eb6988040cf2c712185c7fe5c99b4091591a7fc4d4eafaaefa70ff763a26f6ab8c3ff60b9e75ea19876f49b18667ecaa + languageName: node + linkType: hard + "make-fetch-happen@npm:^11.0.3": version: 11.1.1 resolution: "make-fetch-happen@npm:11.1.1" @@ -4166,7 +4882,7 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.4": +"micromatch@npm:^4.0.4, micromatch@npm:^4.0.5": version: 4.0.5 resolution: "micromatch@npm:4.0.5" dependencies: @@ -4375,6 +5091,20 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:^2.6.9": + version: 2.6.12 + resolution: "node-fetch@npm:2.6.12" + dependencies: + whatwg-url: ^5.0.0 + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: 10372e4b5ee07acadc15e6b2bc6fd8940582eea7b9b2a331f4e3665fdcd968498c1656f79f2fa572080ebb37ea80e1474a6478b3b36057ef901b63f4be8fd899 + languageName: node + linkType: hard + "node-gyp@npm:latest": version: 9.4.0 resolution: "node-gyp@npm:9.4.0" @@ -4691,6 +5421,15 @@ __metadata: languageName: node linkType: hard +"parent-module@npm:^2.0.0": + version: 2.0.0 + resolution: "parent-module@npm:2.0.0" + dependencies: + callsites: ^3.1.0 + checksum: e4c5e34102c709df1932e1065dee53764fbd869f5a673beb8c3b4bcbbd4a7be16e3595f8846b24f52a77b9e96d8d499e68736ec690b108e55d95a5315f41e073 + languageName: node + linkType: hard + "parse-json@npm:^4.0.0": version: 4.0.0 resolution: "parse-json@npm:4.0.0" @@ -5076,6 +5815,13 @@ __metadata: languageName: node linkType: hard +"repeat-string@npm:^1.6.1": + version: 1.6.1 + resolution: "repeat-string@npm:1.6.1" + checksum: 87fa21bfdb2fbdedc44b9a5b118b7c1239bdd2c2c1e42742ef9119b7d412a5137a1d23f1a83dc6bb686f4f27429ac6f542e3d923090b44181bafa41e8ac0174d + languageName: node + linkType: hard + "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -5090,6 +5836,22 @@ __metadata: languageName: node linkType: hard +"resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: b21cb7f1fb746de8107b9febab60095187781137fd803e6a59a76d421444b1531b641bba5857f5dc011974d8a5c635d61cec49e6bd3b7fc20e01f0fafc4efbf2 + languageName: node + linkType: hard + +"resolve-global@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-global@npm:1.0.0" + dependencies: + global-dirs: ^0.1.1 + checksum: fda6ba81a07a0124756ce956dd871ca83763973326d8617143dab38d9c9afc666926604bfe8f0bfd046a9a285347568f32ceb3d4c55a1cb9de5614cca001a21c + languageName: node + linkType: hard + "resolve-pkg-maps@npm:^1.0.0": version: 1.0.0 resolution: "resolve-pkg-maps@npm:1.0.0" @@ -5268,6 +6030,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^6.0.0": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d + languageName: node + linkType: hard + "semver@npm:^6.3.0": version: 6.3.0 resolution: "semver@npm:6.3.0" @@ -5277,7 +6048,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.5, semver@npm:^7.5.0, semver@npm:^7.5.3": +"semver@npm:^7.3.5, semver@npm:^7.3.8, semver@npm:^7.5.0, semver@npm:^7.5.3": version: 7.5.4 resolution: "semver@npm:7.5.4" dependencies: @@ -5345,7 +6116,7 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": +"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: 25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 @@ -5767,6 +6538,13 @@ __metadata: languageName: node linkType: hard +"tr46@npm:~0.0.3": + version: 0.0.3 + resolution: "tr46@npm:0.0.3" + checksum: 047cb209a6b60c742f05c9d3ace8fa510bff609995c129a37ace03476a9b12db4dbf975e74600830ef0796e18882b2381fb5fb1f6b4f96b832c374de3ab91a11 + languageName: node + linkType: hard + "ts-api-utils@npm:^1.0.1": version: 1.0.1 resolution: "ts-api-utils@npm:1.0.1" @@ -5836,6 +6614,15 @@ __metadata: languageName: node linkType: hard +"typedarray-to-buffer@npm:^3.1.5": + version: 3.1.5 + resolution: "typedarray-to-buffer@npm:3.1.5" + dependencies: + is-typedarray: ^1.0.0 + checksum: 4ac5b7a93d604edabf3ac58d3a2f7e07487e9f6e98195a080e81dbffdc4127817f470f219d794a843b87052cedef102b53ac9b539855380b8c2172054b7d5027 + languageName: node + linkType: hard + "typesafe-i18n@npm:^5.24.4": version: 5.24.4 resolution: "typesafe-i18n@npm:5.24.4" @@ -5904,6 +6691,15 @@ __metadata: languageName: node linkType: hard +"unique-string@npm:^2.0.0": + version: 2.0.0 + resolution: "unique-string@npm:2.0.0" + dependencies: + crypto-random-string: ^2.0.0 + checksum: 11820db0a4ba069d174bedfa96c588fc2c96b083066fafa186851e563951d0de78181ac79c744c1ed28b51f9d82ac5b8196ff3e4560d0178046ef455d8c2244b + languageName: node + linkType: hard + "untildify@npm:^4.0.0": version: 4.0.0 resolution: "untildify@npm:4.0.0" @@ -6020,6 +6816,37 @@ __metadata: languageName: node linkType: hard +"vscode-languageserver-textdocument@npm:^1.0.8": + version: 1.0.10 + resolution: "vscode-languageserver-textdocument@npm:1.0.10" + checksum: 0f4e82c262eaea2ed84e004c751453ac900a669763287dee92f9b631804a6ef1dabd62880185fa4d9a063f27d46e65c5251f7f0c8329aee5e3b3db6b6dfa2109 + languageName: node + linkType: hard + +"vscode-uri@npm:^3.0.7": + version: 3.0.7 + resolution: "vscode-uri@npm:3.0.7" + checksum: 67bc15bc9c9bd2d70dae8b27f2a3164281c6ee8f6484e6c5945a44d89871da93d52f2ba339ebc12ab0c10991d4576171b5d85e49a542454329c16faf977e4c59 + languageName: node + linkType: hard + +"webidl-conversions@npm:^3.0.0": + version: 3.0.1 + resolution: "webidl-conversions@npm:3.0.1" + checksum: 5612d5f3e54760a797052eb4927f0ddc01383550f542ccd33d5238cfd65aeed392a45ad38364970d0a0f4fea32e1f4d231b3d8dac4a3bdd385e5cf802ae097db + languageName: node + linkType: hard + +"whatwg-url@npm:^5.0.0": + version: 5.0.0 + resolution: "whatwg-url@npm:5.0.0" + dependencies: + tr46: ~0.0.3 + webidl-conversions: ^3.0.0 + checksum: 1588bed84d10b72d5eec1d0faa0722ba1962f1821e7539c535558fb5398d223b0c50d8acab950b8c488b4ba69043fd833cc2697056b167d8ad46fac3995a55d5 + languageName: node + linkType: hard + "which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" @@ -6107,6 +6934,25 @@ __metadata: languageName: node linkType: hard +"write-file-atomic@npm:^3.0.0": + version: 3.0.3 + resolution: "write-file-atomic@npm:3.0.3" + dependencies: + imurmurhash: ^0.1.4 + is-typedarray: ^1.0.0 + signal-exit: ^3.0.2 + typedarray-to-buffer: ^3.1.5 + checksum: 7fb67affd811c7a1221bed0c905c26e28f0041e138fb19ccf02db57a0ef93ea69220959af3906b920f9b0411d1914474cdd90b93a96e5cd9e8368d9777caac0e + languageName: node + linkType: hard + +"xdg-basedir@npm:^4.0.0": + version: 4.0.0 + resolution: "xdg-basedir@npm:4.0.0" + checksum: 1b5d70d58355af90363a4e0a51c992e77fc5a1d8de5822699c7d6e96a6afea9a1e048cb93312be6870f338ca45ebe97f000425028fa149c1e87d1b5b8b212a06 + languageName: node + linkType: hard + "y18n@npm:^5.0.5": version: 5.0.8 resolution: "y18n@npm:5.0.8" From 116c51443e01ce0f841879fbe93ef63fc7df9e67 Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 16:45:52 +0200 Subject: [PATCH 12/13] dev.13d --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index 1ccfbd4e1..f4480660c 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.6.0-dev.13c" +#define EMSESP_APP_VERSION "3.6.0-dev.13d" From 18e4c3aa881085e83aad16bd41ef870bac6b8459 Mon Sep 17 00:00:00 2001 From: Proddy Date: Fri, 14 Jul 2023 16:45:58 +0200 Subject: [PATCH 13/13] fix odd spelling mistakes --- interface/public/css/roboto.css | 2 +- interface/src/api/system.ts | 16 ++++++++-------- src/analogsensor.cpp | 2 +- src/devices/thermostat.cpp | 6 +++--- src/emsesp_stub.hpp | 2 +- src/mqtt.cpp | 10 +++++----- src/mqtt.h | 2 +- src/shower.cpp | 2 +- src/system.cpp | 4 ++-- src/temperaturesensor.cpp | 2 +- src/test/test.cpp | 10 +++++----- src/web/WebSchedulerService.cpp | 2 +- src/web/WebStatusService.cpp | 6 +++--- 13 files changed, 33 insertions(+), 33 deletions(-) diff --git a/interface/public/css/roboto.css b/interface/public/css/roboto.css index c22e70868..36f599b8a 100644 --- a/interface/public/css/roboto.css +++ b/interface/public/css/roboto.css @@ -1,5 +1,5 @@ /* -* Uses font-size 400 (normal) only and Latin (plus extra unicode chars) to keep flash memory to a minimun +* Uses font-size 400 (normal) only and Latin (plus extra unicode chars) to keep flash memory to a minimum * View fonts on https://fonts.google.com/ * Download woff2 using e.g. https://fonts.googleapis.com/css2?family=Lato or https://fonts.googleapis.com/css2?family=Roboto */ diff --git a/interface/src/api/system.ts b/interface/src/api/system.ts index 29629a5d7..91b35e239 100644 --- a/interface/src/api/system.ts +++ b/interface/src/api/system.ts @@ -21,22 +21,22 @@ export const fetchLog = () => alovaInstance.Post('/rest/fetchLog'); // Get versions from github export const getStableVersion = () => alovaInstanceGH.Get('releases/latest', { - transformData(reponse: any) { + transformData(response: any) { return { - version: reponse.data.name, - url: reponse.data.assets[1].browser_download_url, - changelog: reponse.data.assets[0].browser_download_url + version: response.data.name, + url: response.data.assets[1].browser_download_url, + changelog: response.data.assets[0].browser_download_url }; } }); export const getDevVersion = () => alovaInstanceGH.Get('releases/tags/latest', { - transformData(reponse: any) { + transformData(response: any) { return { - version: reponse.data.name.split(/\s+/).splice(-1), - url: reponse.data.assets[1].browser_download_url, - changelog: reponse.data.assets[0].browser_download_url + version: response.data.name.split(/\s+/).splice(-1), + url: response.data.assets[1].browser_download_url, + changelog: response.data.assets[0].browser_download_url }; } }); diff --git a/src/analogsensor.cpp b/src/analogsensor.cpp index f37c0947a..2ba285abc 100644 --- a/src/analogsensor.cpp +++ b/src/analogsensor.cpp @@ -498,7 +498,7 @@ void AnalogSensor::publish_values(const bool force) { config["val_tpl"] = (std::string) "{{" + val_obj + " if " + val_cond + " else " + sample_val + "}}"; char uniq_s[70]; - if (Mqtt::entity_format() == Mqtt::entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == Mqtt::entityFormat::MULTI_SHORT) { snprintf(uniq_s, sizeof(uniq_s), "%s_analogsensor_%02d", Mqtt::basename().c_str(), sensor.gpio()); } else { snprintf(uniq_s, sizeof(uniq_s), "analogsensor_%02d", sensor.gpio()); diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 5f6bae89b..a7233fc36 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1139,8 +1139,8 @@ void Thermostat::process_RC300Settings(std::shared_ptr telegram) // 0x2CC - e.g. wwprio for RC310 hcx parameter void Thermostat::process_RC300Set2(std::shared_ptr telegram) { // typeids are not in a raw. hc:0x2CC, hc2: 0x2CE for RC310 - // telegram is either offset 3 with data lenght of 1 and values 0/1 (radiators) - 10 0B FF 03 01 CC 01 F6 - // or offset 0 with data lenght of 6 bytes - offset 3 values are 0x00 or 0xFF - 10 0B FF 00 01 CE FF 13 0A FF 1E 00 20 + // telegram is either offset 3 with data length of 1 and values 0/1 (radiators) - 10 0B FF 03 01 CC 01 F6 + // or offset 0 with data length of 6 bytes - offset 3 values are 0x00 or 0xFF - 10 0B FF 00 01 CE FF 13 0A FF 1E 00 20 std::shared_ptr hc = heating_circuit(telegram); if (hc == nullptr) { @@ -2727,7 +2727,7 @@ bool Thermostat::set_controlmode(const char * value, const int8_t id) { return false; } -// sets the thermostat time for nightmode for RC10, telegrm 0xB0 +// sets the thermostat time for nightmode for RC10, telegram 0xB0 bool Thermostat::set_reducehours(const char * value, const int8_t id) { uint8_t hc_num = (id == -1) ? AUTO_HEATING_CIRCUIT : id; std::shared_ptr hc = heating_circuit(hc_num); diff --git a/src/emsesp_stub.hpp b/src/emsesp_stub.hpp index b00cad107..69ece6f7e 100644 --- a/src/emsesp_stub.hpp +++ b/src/emsesp_stub.hpp @@ -28,7 +28,7 @@ #include -// forward declarators +// forward declarator // used to bind EMS-ESP functions to external frameworks namespace emsesp { class EMSESP { diff --git a/src/mqtt.cpp b/src/mqtt.cpp index e3eec030b..ef2f4d061 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -315,7 +315,7 @@ void Mqtt::show_topic_handlers(uuid::console::Shell & shell, const uint8_t devic // called when an MQTT Publish ACK is received void Mqtt::on_publish(uint16_t packetId) const { - LOG_DEBUG("Packet %d sent successfull", packetId); + LOG_DEBUG("Packet %d sent successful", packetId); } // called when MQTT settings have changed via the Web forms @@ -521,7 +521,7 @@ void Mqtt::ha_status() { StaticJsonDocument doc; char uniq[70]; - if (Mqtt::entity_format() == entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == entityFormat::MULTI_SHORT) { snprintf(uniq, sizeof(uniq), "%s_system_status", mqtt_basename_.c_str()); } else { strcpy(uniq, "system_status"); @@ -799,10 +799,10 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev // build unique identifier also used as object_id which also becomes the Entity ID in HA char uniq_id[80]; - if (Mqtt::entity_format() == entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == entityFormat::MULTI_SHORT) { // prefix base name to each uniq_id and use the shortname snprintf(uniq_id, sizeof(uniq_id), "%s_%s_%s", mqtt_basename_.c_str(), device_name, entity_with_tag); - } else if (Mqtt::entity_format() == entitiyFormat::SINGLE_SHORT) { + } else if (Mqtt::entity_format() == entityFormat::SINGLE_SHORT) { // shortname, no mqtt base. This is the default version. snprintf(uniq_id, sizeof(uniq_id), "%s_%s", device_name, entity_with_tag); } else { @@ -1166,7 +1166,7 @@ bool Mqtt::publish_ha_climate_config(const uint8_t tag, const bool has_roomtemp, snprintf(name_s, sizeof(name_s), "Hc%d", hc_num); - if (Mqtt::entity_format() == entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == entityFormat::MULTI_SHORT) { snprintf(uniq_id_s, sizeof(uniq_id_s), "%s_thermostat_hc%d", mqtt_basename_.c_str(), hc_num); // add basename } else { snprintf(uniq_id_s, sizeof(uniq_id_s), "thermostat_hc%d", hc_num); // backward compatible with v3.4 diff --git a/src/mqtt.h b/src/mqtt.h index 15e87f8ca..dc530c25c 100644 --- a/src/mqtt.h +++ b/src/mqtt.h @@ -36,7 +36,7 @@ using mqtt_sub_function_p = std::function; class Mqtt { public: enum discoveryType : uint8_t { HOMEASSISTANT, DOMOTICZ }; - enum entitiyFormat : uint8_t { SINGLE_LONG, SINGLE_SHORT, MULTI_SHORT }; + enum entityFormat : uint8_t { SINGLE_LONG, SINGLE_SHORT, MULTI_SHORT }; void loop(); void start(); diff --git a/src/shower.cpp b/src/shower.cpp index 477230671..f09e1b7a5 100644 --- a/src/shower.cpp +++ b/src/shower.cpp @@ -155,7 +155,7 @@ void Shower::set_shower_state(bool state, bool force) { doc["name"] = "Shower Active"; char str[70]; - if (Mqtt::entity_format() == Mqtt::entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == Mqtt::entityFormat::MULTI_SHORT) { snprintf(str, sizeof(str), "%s_shower_active", Mqtt::basename().c_str()); } else { snprintf(str, sizeof(str), "shower_active"); // v3.4 compatible diff --git a/src/system.cpp b/src/system.cpp index 392861e6b..ca5ba032a 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -536,7 +536,7 @@ void System::loop() { // send MQTT info topic appended with the version information as JSON, as a retained flag void System::send_info_mqtt(const char * event_str, bool send_ntp) { - // use dynamic json becaues it is called from NTP-callback from lwip task with small stack + // use dynamic json because it is called from NTP-callback from lwip task with small stack DynamicJsonDocument doc = DynamicJsonDocument(EMSESP_JSON_SIZE_MEDIUM); doc["event"] = event_str; doc["version"] = EMSESP_APP_VERSION; @@ -1503,7 +1503,7 @@ std::string System::reset_reason(uint8_t cpu) const { break; } #endif - return ("Unkonwn"); + return ("Unknown"); } #pragma GCC diagnostic pop diff --git a/src/temperaturesensor.cpp b/src/temperaturesensor.cpp index a13b848db..ee64c67af 100644 --- a/src/temperaturesensor.cpp +++ b/src/temperaturesensor.cpp @@ -528,7 +528,7 @@ void TemperatureSensor::publish_values(const bool force) { config["val_tpl"] = (std::string) "{{" + val_obj + " if " + val_cond + " else -55}}"; char uniq_s[70]; - if (Mqtt::entity_format() == Mqtt::entitiyFormat::MULTI_SHORT) { + if (Mqtt::entity_format() == Mqtt::entityFormat::MULTI_SHORT) { snprintf(uniq_s, sizeof(uniq_s), "%s_temperaturesensor_%s", Mqtt::basename().c_str(), sensor.id().c_str()); } else { snprintf(uniq_s, sizeof(uniq_s), "temperaturesensor_%s", sensor.id().c_str()); diff --git a/src/test/test.cpp b/src/test/test.cpp index 7792a1efd..4ee9df204 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -1001,14 +1001,14 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const EMSESP::mqtt_.incoming("ems-esp/thermostat/hc2/mode", "auto"); EMSESP::mqtt_.incoming("ems-esp/thermostat/wwc3/mode", "auto"); EMSESP::mqtt_.incoming("ems-esp/boiler/wwcircpump", "off"); - EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload, sends reponse + EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload EMSESP::mqtt_.incoming("ems-esp/thermostat_hc1", "22"); // HA only EMSESP::mqtt_.incoming("ems-esp/thermostat_hc1", "off"); // HA only EMSESP::mqtt_.incoming("ems-esp/system/send", "11 12 13"); - EMSESP::mqtt_.incoming("ems-esp/boiler/syspress"); // empty payload, sends reponse - EMSESP::mqtt_.incoming("ems-esp/thermostat/mode"); // empty payload, sends reponse + EMSESP::mqtt_.incoming("ems-esp/boiler/syspress"); // empty payload + EMSESP::mqtt_.incoming("ems-esp/thermostat/mode"); // empty payload EMSESP::mqtt_.incoming("ems-esp/system/publish"); - EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload, sends reponse + EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload EMSESP::mqtt_.incoming("ems-esp/boiler/wwseltemp", "59"); EMSESP::mqtt_.incoming("ems-esp/boiler/wwseltemp"); @@ -1022,7 +1022,7 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const // check extended MQTT base Mqtt::base("home/cellar/heating"); - EMSESP::mqtt_.incoming("home/cellar/heating/thermostat/mode"); // empty payload, sends reponse + EMSESP::mqtt_.incoming("home/cellar/heating/thermostat/mode"); // empty payload // Web API TESTS AsyncWebServerRequest request; diff --git a/src/web/WebSchedulerService.cpp b/src/web/WebSchedulerService.cpp index 753cd9a82..f04a12bfc 100644 --- a/src/web/WebSchedulerService.cpp +++ b/src/web/WebSchedulerService.cpp @@ -50,7 +50,7 @@ void WebScheduler::read(WebScheduler & webScheduler, JsonObject & root) { } } -// call on initialization and also when the Scheduile web page is saved +// call on initialization and also when the Schedule web page is saved // this loads the data into the internal class StateUpdateResult WebScheduler::update(JsonObject & root, WebScheduler & webScheduler) { #ifdef EMSESP_STANDALONE diff --git a/src/web/WebStatusService.cpp b/src/web/WebStatusService.cpp index 231a7ef41..86ec82683 100644 --- a/src/web/WebStatusService.cpp +++ b/src/web/WebStatusService.cpp @@ -229,7 +229,7 @@ const char * WebStatusService::disconnectReason(uint8_t code) { #ifndef EMSESP_STANDALONE switch (code) { case WIFI_REASON_UNSPECIFIED: // = 1, - return "unspecifiied"; + return "unspecified"; case WIFI_REASON_AUTH_EXPIRE: // = 2, return "auth expire"; case WIFI_REASON_AUTH_LEAVE: // = 3, @@ -239,9 +239,9 @@ const char * WebStatusService::disconnectReason(uint8_t code) { case WIFI_REASON_ASSOC_TOOMANY: // = 5, return "assoc too many"; case WIFI_REASON_NOT_AUTHED: // = 6, - return "not authed"; + return "not authenticated"; case WIFI_REASON_NOT_ASSOCED: // = 7, - return "not assoced"; + return "not assoc"; case WIFI_REASON_ASSOC_LEAVE: // = 8, return "assoc leave"; case WIFI_REASON_ASSOC_NOT_AUTHED: // = 9,