From 462870fe6b7e1c6e9f1c2c20f97ddd687639454c Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 6 Jan 2024 10:47:02 +0100 Subject: [PATCH 01/10] uppercase Value --- interface/src/i18n/en/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/i18n/en/index.ts b/interface/src/i18n/en/index.ts index c8cd47f91..a0df59837 100644 --- a/interface/src/i18n/en/index.ts +++ b/interface/src/i18n/en/index.ts @@ -63,7 +63,7 @@ const en: Translation = { FREQ: 'Frequency', DUTY_CYCLE: 'Duty Cycle', UNIT: 'UoM', - STARTVALUE: 'Start value', + STARTVALUE: 'Start Value', WARN_GPIO: 'Warning: be careful when assigning a GPIO!', EDIT: 'Edit', SENSOR: 'Sensor', From 75574f663b60616ef128b20df2351c179b5a3556 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 6 Jan 2024 10:47:15 +0100 Subject: [PATCH 02/10] uppercase Digital In/Out --- interface/src/project/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/project/types.ts b/interface/src/project/types.ts index 9fe1bde37..c28043b09 100644 --- a/interface/src/project/types.ts +++ b/interface/src/project/types.ts @@ -223,12 +223,12 @@ export enum AnalogType { export const AnalogTypeNames = [ '(disabled)', - 'Digital in', + 'Digital In', 'Counter', 'ADC', 'Timer', 'Rate', - 'Digital out', + 'Digital Out', 'PWM 0', 'PWM 1', 'PWM 2' From 273dc4b83c53d5cfdf2cb8efb5d0c0cd2011f02f Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 6 Jan 2024 10:47:43 +0100 Subject: [PATCH 03/10] fix case of Value (introduced by Polish translations) --- interface/src/project/DashboardDevicesDialog.tsx | 2 +- interface/src/project/DashboardSensorsAnalogDialog.tsx | 4 ++-- interface/src/project/SettingsSchedulerDialog.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/src/project/DashboardDevicesDialog.tsx b/interface/src/project/DashboardDevicesDialog.tsx index 7fe962371..aab6fa30d 100644 --- a/interface/src/project/DashboardDevicesDialog.tsx +++ b/interface/src/project/DashboardDevicesDialog.tsx @@ -103,7 +103,7 @@ const DashboardDevicesDialog = ({ return ( - {selectedItem.v === '' && selectedItem.c ? LL.RUN_COMMAND() : writeable ? LL.CHANGE_VALUE() : LL.VALUE(0)} + {selectedItem.v === '' && selectedItem.c ? LL.RUN_COMMAND() : writeable ? LL.CHANGE_VALUE() : LL.VALUE(1)} diff --git a/interface/src/project/DashboardSensorsAnalogDialog.tsx b/interface/src/project/DashboardSensorsAnalogDialog.tsx index f66f700a3..7e6d82463 100644 --- a/interface/src/project/DashboardSensorsAnalogDialog.tsx +++ b/interface/src/project/DashboardSensorsAnalogDialog.tsx @@ -182,7 +182,7 @@ const DashboardSensorsAnalogDialog = ({ Date: Sat, 6 Jan 2024 10:47:51 +0100 Subject: [PATCH 04/10] unused --- interface/src/utils/useWs.ts | 91 ------------------------------------ 1 file changed, 91 deletions(-) delete mode 100644 interface/src/utils/useWs.ts diff --git a/interface/src/utils/useWs.ts b/interface/src/utils/useWs.ts deleted file mode 100644 index 3471c691e..000000000 --- a/interface/src/utils/useWs.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { debounce } from 'lodash-es'; -import { useCallback, useEffect, useRef, useState } from 'react'; -import Sockette from 'sockette'; - -import { addAccessTokenParameter } from 'api/authentication'; - -interface WebSocketIdMessage { - type: 'id'; - id: string; -} - -interface WebSocketPayloadMessage { - type: 'payload'; - origin_id: string; - payload: D; -} - -export type WebSocketMessage = WebSocketIdMessage | WebSocketPayloadMessage; - -export const useWs = (wsUrl: string, wsThrottle = 100) => { - const ws = useRef(); - const clientId = useRef(); - - const [connected, setConnected] = useState(false); - const [data, setData] = useState(); - const [transmit, setTransmit] = useState(); - const [clear, setClear] = useState(); - - const onMessage = useCallback((event: MessageEvent) => { - const rawData = event.data; - if (typeof rawData === 'string' || rawData instanceof String) { - const message = JSON.parse(rawData as string) as WebSocketMessage; - switch (message.type) { - case 'id': - clientId.current = message.id; - break; - case 'payload': - if (clientId.current) { - setData((existingData) => (clientId.current === message.origin_id && existingData) || message.payload); - } - break; - } - } - }, []); - - const doSaveData = useCallback((newData: D, clearData = false) => { - if (!ws.current) { - return; - } - if (clearData) { - setData(undefined); - } - ws.current.json(newData); - }, []); - - const saveData = useRef(debounce(doSaveData, wsThrottle)); - - const updateData = (newData: React.SetStateAction, transmitData: true, clearData: false) => { - setData(newData); - setTransmit(transmitData); - setClear(clearData); - }; - - useEffect(() => { - if (!transmit) { - return; - } - data && saveData.current(data, clear); - setTransmit(false); - setClear(false); - }, [doSaveData, data, transmit, clear]); - - useEffect(() => { - const instance = new Sockette(addAccessTokenParameter(wsUrl), { - onmessage: onMessage, - onopen: () => { - setConnected(true); - }, - onclose: () => { - clientId.current = undefined; - setConnected(false); - setData(undefined); - } - }); - ws.current = instance; - // eslint-disable-next-line @typescript-eslint/unbound-method - return instance.close; - }, [wsUrl, onMessage]); - - return { connected, data, updateData } as const; -}; From cb2746b7419191133dbb7eb4b4a6a311cbeb8d21 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 6 Jan 2024 10:48:03 +0100 Subject: [PATCH 05/10] show total size in a comment in file --- interface/progmem-generator.js | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/progmem-generator.js b/interface/progmem-generator.js index 98d74f5f4..e68e047b6 100644 --- a/interface/progmem-generator.js +++ b/interface/progmem-generator.js @@ -12,6 +12,7 @@ var totalSize = 0; const generateWWWClass = () => `typedef std::function RouteRegistrationHandler; +// Total size is ${totalSize} bytes class WWWData { ${indent}public: From 8540e71145225b1e7819bc58e73c30a6f828d352 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 6 Jan 2024 10:48:15 +0100 Subject: [PATCH 06/10] add additional cache header --- lib/framework/ESP8266React.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/framework/ESP8266React.cpp b/lib/framework/ESP8266React.cpp index ad2331428..158e5640d 100644 --- a/lib/framework/ESP8266React.cpp +++ b/lib/framework/ESP8266React.cpp @@ -25,6 +25,7 @@ ESP8266React::ESP8266React(AsyncWebServer * server, FS * fs) ArRequestHandlerFunction requestHandler = [contentType, content, len](AsyncWebServerRequest * request) { AsyncWebServerResponse * response = request->beginResponse_P(200, contentType, content, len); response->addHeader("Content-Encoding", "gzip"); + response->addHeader("Cache-Control", "public, immutable, max-age=31536000"); // response->addHeader("Content-Encoding", "br"); // only works over HTTPS request->send(response); }; @@ -53,6 +54,7 @@ void ESP8266React::begin() { DefaultHeaders::Instance().addHeader("Access-Control-Allow-Headers", "Accept, Content-Type, Authorization"); DefaultHeaders::Instance().addHeader("Access-Control-Allow-Credentials", "true"); } + DefaultHeaders::Instance().addHeader("Server", networkSettings.hostname); // TODO use hostname }); _apSettingsService.begin(); _ntpSettingsService.begin(); From 5e0c6a527aaf062a16acb50d73d27fd085917ad6 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 6 Jan 2024 10:48:27 +0100 Subject: [PATCH 07/10] fix test for device list --- mock-api/Handler.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mock-api/Handler.ts b/mock-api/Handler.ts index 4539c72c6..caf7b73e1 100644 --- a/mock-api/Handler.ts +++ b/mock-api/Handler.ts @@ -651,9 +651,10 @@ const emsesp_devices = { }; const emsesp_coredata = { - connected: false, - devices: [], - devices2: [ + connected: true, + // connected: false, + // devices: [], + devices: [ { id: 7, t: 4, From cb1130541606ff67d54667d4654aa9c39759c795 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 6 Jan 2024 10:48:49 +0100 Subject: [PATCH 08/10] upper case Digital In --- src/emsesp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emsesp.cpp b/src/emsesp.cpp index c998770d6..8251820e4 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -464,7 +464,7 @@ void EMSESP::show_sensor_values(uuid::console::Shell & shell) { COLOR_BRIGHT_GREEN, (uint16_t)sensor.value(), // as int COLOR_RESET, - sensor.type() == AnalogSensor::AnalogType::COUNTER ? "Counter" : "Digital in"); + sensor.type() == AnalogSensor::AnalogType::COUNTER ? "Counter" : "Digital In"); break; } } From 10d6728c821005f6963a5e0817e90a710e6ab62f Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 6 Jan 2024 17:42:42 +0100 Subject: [PATCH 09/10] remove obsolete reference to JsonObject --- lib/framework/APSettingsService.h | 4 +-- lib/framework/ArduinoJsonJWT.cpp | 2 +- lib/framework/ArduinoJsonJWT.h | 2 +- lib/framework/JsonUtils.h | 6 ++-- lib/framework/MqttSettingsService.cpp | 4 +-- lib/framework/MqttSettingsService.h | 4 +-- lib/framework/NTPSettingsService.h | 4 +-- lib/framework/NetworkSettingsService.h | 4 +-- lib/framework/OTASettingsService.h | 4 +-- lib/framework/SecuritySettingsService.cpp | 4 +-- lib/framework/SecuritySettingsService.h | 6 ++-- lib/framework/StatefulService.h | 10 +++--- lib_standalone/ESP8266React.h | 6 ++-- lib_standalone/SecuritySettingsService.cpp | 4 +-- lib_standalone/SecuritySettingsService.h | 6 ++-- lib_standalone/StatefulService.h | 10 +++--- src/analogsensor.cpp | 12 +++---- src/analogsensor.h | 6 ++-- src/command.cpp | 6 ++-- src/command.h | 10 +++--- src/emsdevice.cpp | 10 +++--- src/emsdevice.h | 12 +++---- src/emsesp.cpp | 14 ++++---- src/emsesp.h | 6 ++-- src/mqtt.cpp | 40 +++++++++++----------- src/mqtt.h | 40 +++++++++++----------- src/shower.cpp | 2 +- src/system.cpp | 14 ++++---- src/system.h | 14 ++++---- src/temperaturesensor.cpp | 12 +++---- src/temperaturesensor.h | 6 ++-- src/web/WebAPIService.cpp | 2 +- src/web/WebAPIService.h | 2 +- src/web/WebCustomEntityService.cpp | 12 +++---- src/web/WebCustomEntityService.h | 12 +++---- src/web/WebCustomizationService.cpp | 4 +-- src/web/WebCustomizationService.h | 4 +-- src/web/WebSchedulerService.cpp | 6 ++-- src/web/WebSchedulerService.h | 6 ++-- src/web/WebSettingsService.cpp | 4 +-- src/web/WebSettingsService.h | 4 +-- 41 files changed, 170 insertions(+), 170 deletions(-) diff --git a/lib/framework/APSettingsService.h b/lib/framework/APSettingsService.h index 68bca2135..c2eacd084 100644 --- a/lib/framework/APSettingsService.h +++ b/lib/framework/APSettingsService.h @@ -75,7 +75,7 @@ class APSettings { && subnetMask == settings.subnetMask; } - static void read(APSettings & settings, JsonObject & root) { + static void read(APSettings & settings, JsonObject root) { root["provision_mode"] = settings.provisionMode; root["ssid"] = settings.ssid; root["password"] = settings.password; @@ -87,7 +87,7 @@ class APSettings { root["subnet_mask"] = settings.subnetMask.toString(); } - static StateUpdateResult update(JsonObject & root, APSettings & settings) { + static StateUpdateResult update(JsonObject root, APSettings & settings) { APSettings newSettings = {}; newSettings.provisionMode = root["provision_mode"] | FACTORY_AP_PROVISION_MODE; switch (settings.provisionMode) { diff --git a/lib/framework/ArduinoJsonJWT.cpp b/lib/framework/ArduinoJsonJWT.cpp index adca88f3e..595166ec5 100644 --- a/lib/framework/ArduinoJsonJWT.cpp +++ b/lib/framework/ArduinoJsonJWT.cpp @@ -34,7 +34,7 @@ String ArduinoJsonJWT::sign(String & payload) { return encode((char *)hmacResult, 32); } -String ArduinoJsonJWT::buildJWT(JsonObject & payload) { +String ArduinoJsonJWT::buildJWT(JsonObject payload) { // serialize, then encode payload String jwt; serializeJson(payload, jwt); diff --git a/lib/framework/ArduinoJsonJWT.h b/lib/framework/ArduinoJsonJWT.h index 3a76f71f6..cd13d5fa4 100644 --- a/lib/framework/ArduinoJsonJWT.h +++ b/lib/framework/ArduinoJsonJWT.h @@ -25,7 +25,7 @@ class ArduinoJsonJWT { void setSecret(String secret); String getSecret(); - String buildJWT(JsonObject & payload); + String buildJWT(JsonObject payload); void parseJWT(String jwt, JsonDocument & jsonDocument); }; diff --git a/lib/framework/JsonUtils.h b/lib/framework/JsonUtils.h index 3fa38cb12..29a72bd6a 100644 --- a/lib/framework/JsonUtils.h +++ b/lib/framework/JsonUtils.h @@ -8,19 +8,19 @@ class JsonUtils { public: - static void readIP(JsonObject & root, const String & key, IPAddress & ip, const String & def) { + static void readIP(JsonObject root, const String & key, IPAddress & ip, const String & def) { IPAddress defaultIp = {}; if (!defaultIp.fromString(def)) { defaultIp = INADDR_NONE; } readIP(root, key, ip, defaultIp); } - static void readIP(JsonObject & root, const String & key, IPAddress & ip, const IPAddress & defaultIp = INADDR_NONE) { + static void readIP(JsonObject root, const String & key, IPAddress & ip, const IPAddress & defaultIp = INADDR_NONE) { if (!root[key].is() || !ip.fromString(root[key].as())) { ip = defaultIp; } } - static void writeIP(JsonObject & root, const String & key, const IPAddress & ip) { + static void writeIP(JsonObject root, const String & key, const IPAddress & ip) { if (IPUtils::isSet(ip)) { root[key] = ip.toString(); } diff --git a/lib/framework/MqttSettingsService.cpp b/lib/framework/MqttSettingsService.cpp index 4465963a4..5c28d88a3 100644 --- a/lib/framework/MqttSettingsService.cpp +++ b/lib/framework/MqttSettingsService.cpp @@ -216,7 +216,7 @@ bool MqttSettingsService::configureMqtt() { return false; } -void MqttSettings::read(MqttSettings & settings, JsonObject & root) { +void MqttSettings::read(MqttSettings & settings, JsonObject root) { #if CONFIG_IDF_TARGET_ESP32S3 #ifndef TASMOTA_SDK root["enableTLS"] = settings.enableTLS; @@ -252,7 +252,7 @@ void MqttSettings::read(MqttSettings & settings, JsonObject & root) { root["send_response"] = settings.send_response; } -StateUpdateResult MqttSettings::update(JsonObject & root, MqttSettings & settings) { +StateUpdateResult MqttSettings::update(JsonObject root, MqttSettings & settings) { MqttSettings newSettings = {}; bool changed = false; diff --git a/lib/framework/MqttSettingsService.h b/lib/framework/MqttSettingsService.h index e2541dcda..93bd0d163 100644 --- a/lib/framework/MqttSettingsService.h +++ b/lib/framework/MqttSettingsService.h @@ -97,8 +97,8 @@ class MqttSettings { bool send_response; uint8_t entity_format; - static void read(MqttSettings & settings, JsonObject & root); - static StateUpdateResult update(JsonObject & root, MqttSettings & settings); + static void read(MqttSettings & settings, JsonObject root); + static StateUpdateResult update(JsonObject root, MqttSettings & settings); }; class MqttSettingsService : public StatefulService { diff --git a/lib/framework/NTPSettingsService.h b/lib/framework/NTPSettingsService.h index f26273ecf..ab00b36d7 100644 --- a/lib/framework/NTPSettingsService.h +++ b/lib/framework/NTPSettingsService.h @@ -36,14 +36,14 @@ class NTPSettings { String tzFormat; String server; - static void read(NTPSettings & settings, JsonObject & root) { + static void read(NTPSettings & settings, JsonObject root) { root["enabled"] = settings.enabled; root["server"] = settings.server; root["tz_label"] = settings.tzLabel; root["tz_format"] = settings.tzFormat; } - static StateUpdateResult update(JsonObject & root, NTPSettings & settings) { + static StateUpdateResult update(JsonObject root, NTPSettings & settings) { settings.enabled = root["enabled"] | FACTORY_NTP_ENABLED; settings.server = root["server"] | FACTORY_NTP_SERVER; settings.tzLabel = root["tz_label"] | FACTORY_NTP_TIME_ZONE_LABEL; diff --git a/lib/framework/NetworkSettingsService.h b/lib/framework/NetworkSettingsService.h index 901345ea9..96a9b116c 100644 --- a/lib/framework/NetworkSettingsService.h +++ b/lib/framework/NetworkSettingsService.h @@ -50,7 +50,7 @@ class NetworkSettings { IPAddress dnsIP1; IPAddress dnsIP2; - static void read(NetworkSettings & settings, JsonObject & root) { + static void read(NetworkSettings & settings, JsonObject root) { // connection settings root["ssid"] = settings.ssid; root["bssid"] = settings.bssid; @@ -73,7 +73,7 @@ class NetworkSettings { JsonUtils::writeIP(root, "dns_ip_2", settings.dnsIP2); } - static StateUpdateResult update(JsonObject & root, NetworkSettings & settings) { + static StateUpdateResult update(JsonObject root, NetworkSettings & settings) { auto enableCORS = settings.enableCORS; auto CORSOrigin = settings.CORSOrigin; auto ssid = settings.ssid; diff --git a/lib/framework/OTASettingsService.h b/lib/framework/OTASettingsService.h index 2594f98db..12818c07e 100644 --- a/lib/framework/OTASettingsService.h +++ b/lib/framework/OTASettingsService.h @@ -28,13 +28,13 @@ class OTASettings { int port; String password; - static void read(OTASettings & settings, JsonObject & root) { + static void read(OTASettings & settings, JsonObject root) { root["enabled"] = settings.enabled; root["port"] = settings.port; root["password"] = settings.password; } - static StateUpdateResult update(JsonObject & root, OTASettings & settings) { + static StateUpdateResult update(JsonObject root, OTASettings & settings) { settings.enabled = root["enabled"] | FACTORY_OTA_ENABLED; settings.port = root["port"] | FACTORY_OTA_PORT; settings.password = root["password"] | FACTORY_OTA_PASSWORD; diff --git a/lib/framework/SecuritySettingsService.cpp b/lib/framework/SecuritySettingsService.cpp index caab87419..f17f5f4f1 100644 --- a/lib/framework/SecuritySettingsService.cpp +++ b/lib/framework/SecuritySettingsService.cpp @@ -63,12 +63,12 @@ Authentication SecuritySettingsService::authenticate(const String & username, co return Authentication(); } -inline void populateJWTPayload(JsonObject & payload, User * user) { +inline void populateJWTPayload(JsonObject payload, User * user) { payload["username"] = user->username; payload["admin"] = user->admin; } -boolean SecuritySettingsService::validatePayload(JsonObject & parsedPayload, User * user) { +boolean SecuritySettingsService::validatePayload(JsonObject parsedPayload, User * user) { JsonDocument jsonDocument; JsonObject payload = jsonDocument.to(); populateJWTPayload(payload, user); diff --git a/lib/framework/SecuritySettingsService.h b/lib/framework/SecuritySettingsService.h index e429e049b..7010ae99c 100644 --- a/lib/framework/SecuritySettingsService.h +++ b/lib/framework/SecuritySettingsService.h @@ -35,7 +35,7 @@ class SecuritySettings { String jwtSecret; std::list users; - static void read(SecuritySettings & settings, JsonObject & root) { + static void read(SecuritySettings & settings, JsonObject root) { // secret root["jwt_secret"] = settings.jwtSecret; @@ -49,7 +49,7 @@ class SecuritySettings { } } - static StateUpdateResult update(JsonObject & root, SecuritySettings & settings) { + static StateUpdateResult update(JsonObject root, SecuritySettings & settings) { // secret settings.jwtSecret = root["jwt_secret"] | FACTORY_JWT_SECRET; @@ -98,7 +98,7 @@ class SecuritySettingsService : public StatefulService, public /* * Verify the payload is correct */ - boolean validatePayload(JsonObject & parsedPayload, User * user); + boolean validatePayload(JsonObject parsedPayload, User * user); }; #else diff --git a/lib/framework/StatefulService.h b/lib/framework/StatefulService.h index f464cad29..f6510cf25 100644 --- a/lib/framework/StatefulService.h +++ b/lib/framework/StatefulService.h @@ -17,10 +17,10 @@ enum class StateUpdateResult { }; template -using JsonStateUpdater = std::function; +using JsonStateUpdater = std::function; template -using JsonStateReader = std::function; +using JsonStateReader = std::function; typedef size_t update_handler_id_t; typedef std::function StateUpdateCallback; @@ -81,7 +81,7 @@ class StatefulService { return result; } - StateUpdateResult update(JsonObject & jsonObject, JsonStateUpdater stateUpdater, const String & originId) { + StateUpdateResult update(JsonObject jsonObject, JsonStateUpdater stateUpdater, const String & originId) { beginTransaction(); StateUpdateResult result = stateUpdater(jsonObject, _state); endTransaction(); @@ -91,7 +91,7 @@ class StatefulService { return result; } - StateUpdateResult updateWithoutPropagation(JsonObject & jsonObject, JsonStateUpdater stateUpdater) { + StateUpdateResult updateWithoutPropagation(JsonObject jsonObject, JsonStateUpdater stateUpdater) { beginTransaction(); StateUpdateResult result = stateUpdater(jsonObject, _state); endTransaction(); @@ -104,7 +104,7 @@ class StatefulService { endTransaction(); } - void read(JsonObject & jsonObject, JsonStateReader stateReader) { + void read(JsonObject jsonObject, JsonStateReader stateReader) { beginTransaction(); stateReader(_state, jsonObject); endTransaction(); diff --git a/lib_standalone/ESP8266React.h b/lib_standalone/ESP8266React.h index b19417273..68174ea61 100644 --- a/lib_standalone/ESP8266React.h +++ b/lib_standalone/ESP8266React.h @@ -75,10 +75,10 @@ class DummySettings { bool enableCORS = false; String CORSOrigin = "*"; - static void read(DummySettings & settings, JsonObject & root){}; + static void read(DummySettings & settings, JsonObject root){}; static void read(DummySettings & settings){}; - static StateUpdateResult update(JsonObject & root, DummySettings & settings) { + static StateUpdateResult update(JsonObject root, DummySettings & settings) { return StateUpdateResult::CHANGED; } }; @@ -152,7 +152,7 @@ class EMSESPSettingsService { class JsonUtils { public: - static void writeIP(JsonObject & root, const String & key, const String & ip) { + static void writeIP(JsonObject root, const String & key, const String & ip) { root[key] = ip; } }; diff --git a/lib_standalone/SecuritySettingsService.cpp b/lib_standalone/SecuritySettingsService.cpp index d90e73a34..dc5f3860c 100644 --- a/lib_standalone/SecuritySettingsService.cpp +++ b/lib_standalone/SecuritySettingsService.cpp @@ -62,12 +62,12 @@ Authentication SecuritySettingsService::authenticate(const String & username, co return Authentication(); } -inline void populateJWTPayload(JsonObject & payload, User * user) { +inline void populateJWTPayload(JsonObject payload, User * user) { payload["username"] = user->username; payload["admin"] = user->admin; } -boolean SecuritySettingsService::validatePayload(JsonObject & parsedPayload, User * user) { +boolean SecuritySettingsService::validatePayload(JsonObject parsedPayload, User * user) { JsonDocument jsonDocument; JsonObject payload = jsonDocument.to(); populateJWTPayload(payload, user); diff --git a/lib_standalone/SecuritySettingsService.h b/lib_standalone/SecuritySettingsService.h index 25e27667e..a283854e0 100644 --- a/lib_standalone/SecuritySettingsService.h +++ b/lib_standalone/SecuritySettingsService.h @@ -32,7 +32,7 @@ class SecuritySettings { String jwtSecret; std::list users; - static void read(SecuritySettings & settings, JsonObject & root) { + static void read(SecuritySettings & settings, JsonObject root) { // secret root["jwt_secret"] = settings.jwtSecret; @@ -46,7 +46,7 @@ class SecuritySettings { } } - static StateUpdateResult update(JsonObject & root, SecuritySettings & settings) { + static StateUpdateResult update(JsonObject root, SecuritySettings & settings) { // secret settings.jwtSecret = root["jwt_secret"] | FACTORY_JWT_SECRET; @@ -85,7 +85,7 @@ class SecuritySettingsService : public StatefulService, public void configureJWTHandler(); Authentication authenticateJWT(String & jwt); - boolean validatePayload(JsonObject & parsedPayload, User * user); + boolean validatePayload(JsonObject parsedPayload, User * user); }; #else diff --git a/lib_standalone/StatefulService.h b/lib_standalone/StatefulService.h index fa29e26c0..577b51fbb 100644 --- a/lib_standalone/StatefulService.h +++ b/lib_standalone/StatefulService.h @@ -15,10 +15,10 @@ enum class StateUpdateResult { }; template -using JsonStateUpdater = std::function; +using JsonStateUpdater = std::function; template -using JsonStateReader = std::function; +using JsonStateReader = std::function; typedef size_t update_handler_id_t; typedef std::function StateUpdateCallback; @@ -85,7 +85,7 @@ class StatefulService { return result; } - StateUpdateResult update(JsonObject & jsonObject, JsonStateUpdater stateUpdater, const String & originId) { + StateUpdateResult update(JsonObject jsonObject, JsonStateUpdater stateUpdater, const String & originId) { beginTransaction(); StateUpdateResult result = stateUpdater(jsonObject, _state); endTransaction(); @@ -95,7 +95,7 @@ class StatefulService { return result; } - StateUpdateResult updateWithoutPropagation(JsonObject & jsonObject, JsonStateUpdater stateUpdater) { + StateUpdateResult updateWithoutPropagation(JsonObject jsonObject, JsonStateUpdater stateUpdater) { beginTransaction(); StateUpdateResult result = stateUpdater(jsonObject, _state); endTransaction(); @@ -108,7 +108,7 @@ class StatefulService { endTransaction(); } - void read(JsonObject & jsonObject, JsonStateReader stateReader) { + void read(JsonObject jsonObject, JsonStateReader stateReader) { beginTransaction(); stateReader(_state, jsonObject); endTransaction(); diff --git a/src/analogsensor.cpp b/src/analogsensor.cpp index 1396776f9..fcb051839 100644 --- a/src/analogsensor.cpp +++ b/src/analogsensor.cpp @@ -37,12 +37,12 @@ void AnalogSensor::start() { Command::add( EMSdevice::DeviceType::ANALOGSENSOR, F_(info), - [&](const char * value, const int8_t id, JsonObject & output) { return command_info(value, id, output); }, + [&](const char * value, const int8_t id, JsonObject output) { return command_info(value, id, output); }, FL_(info_cmd)); Command::add( EMSdevice::DeviceType::ANALOGSENSOR, F_(values), - [&](const char * value, const int8_t id, JsonObject & output) { return command_info(value, 0, output); }, + [&](const char * value, const int8_t id, JsonObject output) { return command_info(value, 0, output); }, nullptr, CommandFlag::HIDDEN); // this command is hidden Command::add( @@ -54,7 +54,7 @@ void AnalogSensor::start() { Command::add( EMSdevice::DeviceType::ANALOGSENSOR, F_(commands), - [&](const char * value, const int8_t id, JsonObject & output) { return command_commands(value, id, output); }, + [&](const char * value, const int8_t id, JsonObject output) { return command_commands(value, id, output); }, FL_(commands_cmd)); char topic[Mqtt::MQTT_TOPIC_MAX_SIZE]; @@ -638,7 +638,7 @@ void AnalogSensor::publish_values(const bool force) { // called from emsesp.cpp, similar to the emsdevice->get_value_info // searches by name -bool AnalogSensor::get_value_info(JsonObject & output, const char * cmd, const int8_t id) const { +bool AnalogSensor::get_value_info(JsonObject output, const char * cmd, const int8_t id) const { if (sensors_.empty()) { return true; } @@ -699,7 +699,7 @@ bool AnalogSensor::get_value_info(JsonObject & output, const char * cmd, const i // creates JSON doc from values // returns true if there are no sensors -bool AnalogSensor::command_info(const char * value, const int8_t id, JsonObject & output) const { +bool AnalogSensor::command_info(const char * value, const int8_t id, JsonObject output) const { if (sensors_.empty()) { return true; } @@ -851,7 +851,7 @@ bool AnalogSensor::command_setvalue(const char * value, const int8_t gpio) { } // list commands -bool AnalogSensor::command_commands(const char * value, const int8_t id, JsonObject & output) { +bool AnalogSensor::command_commands(const char * value, const int8_t id, JsonObject output) { return Command::list(EMSdevice::DeviceType::ANALOGSENSOR, output); } diff --git a/src/analogsensor.h b/src/analogsensor.h index b33fb1137..01e353572 100644 --- a/src/analogsensor.h +++ b/src/analogsensor.h @@ -153,10 +153,10 @@ class AnalogSensor { } bool update(uint8_t gpio, const std::string & name, double offset, double factor, uint8_t uom, int8_t type, bool deleted = false); - bool get_value_info(JsonObject & output, const char * cmd, const int8_t id) const; + bool get_value_info(JsonObject output, const char * cmd, const int8_t id) const; void store_counters(); - bool command_info(const char * value, const int8_t id, JsonObject & output) const; + bool command_info(const char * value, const int8_t id, JsonObject output) const; #if defined(EMSESP_TEST) @@ -172,7 +172,7 @@ class AnalogSensor { void remove_ha_topic(const int8_t type, const uint8_t id) const; bool command_setvalue(const char * value, const int8_t gpio); void measure(); - bool command_commands(const char * value, const int8_t id, JsonObject & output); + bool command_commands(const char * value, const int8_t id, JsonObject output); std::vector sensors_; // our list of sensors diff --git a/src/command.cpp b/src/command.cpp index 284c6ae90..e59d239b8 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -30,7 +30,7 @@ std::vector Command::cmdfunctions_; // the path is leading so if duplicate keys are in the input JSON it will be ignored // the entry point will be either via the Web API (api/) or MQTT (/) // returns a return code and json output -uint8_t Command::process(const char * path, const bool is_admin, const JsonObject & input, JsonObject & output) { +uint8_t Command::process(const char * path, const bool is_admin, const JsonObject input, JsonObject output) { SUrlParser p; // parse URL for the path names p.parse(path); @@ -288,7 +288,7 @@ uint8_t Command::call(const uint8_t device_type, const char * cmd, const char * // calls a command. Takes a json object for output. // id may be used to represent a heating circuit for example // returns 0 if the command errored, 1 (TRUE) if ok, 2 if not found, 3 if error or 4 if not allowed -uint8_t Command::call(const uint8_t device_type, const char * cmd, const char * value, const bool is_admin, const int8_t id, JsonObject & output) { +uint8_t Command::call(const uint8_t device_type, const char * cmd, const char * value, const bool is_admin, const int8_t id, JsonObject output) { if (cmd == nullptr) { return CommandRet::NOT_FOUND; } @@ -435,7 +435,7 @@ void Command::erase_command(const uint8_t device_type, const char * cmd) { } // list all commands for a specific device, output as json -bool Command::list(const uint8_t device_type, JsonObject & output) { +bool Command::list(const uint8_t device_type, JsonObject output) { if (cmdfunctions_.empty()) { output["message"] = "no commands available"; return false; diff --git a/src/command.h b/src/command.h index f0b54bbf2..db00fa01a 100644 --- a/src/command.h +++ b/src/command.h @@ -49,7 +49,7 @@ enum CommandRet : uint8_t { }; using cmd_function_p = std::function; -using cmd_json_function_p = std::function; +using cmd_json_function_p = std::function; class Command { public: @@ -96,7 +96,7 @@ class Command { return cmdfunctions_; } - static uint8_t call(const uint8_t device_type, const char * cmd, const char * value, const bool is_admin, const int8_t id, JsonObject & output); + static uint8_t call(const uint8_t device_type, const char * cmd, const char * value, const bool is_admin, const int8_t id, JsonObject output); static uint8_t call(const uint8_t device_type, const char * cmd, const char * value); // with normal call back function taking a value and id @@ -129,9 +129,9 @@ class Command { static void show_devices(uuid::console::Shell & shell); static bool device_has_commands(const uint8_t device_type); - static bool list(const uint8_t device_type, JsonObject & output); + static bool list(const uint8_t device_type, JsonObject output); - static uint8_t process(const char * path, const bool is_admin, const JsonObject & input, JsonObject & output); + static uint8_t process(const char * path, const bool is_admin, const JsonObject input, JsonObject output); static const char * parse_command_string(const char * command, int8_t & id); @@ -142,7 +142,7 @@ class Command { static std::vector cmdfunctions_; // the list of commands - inline static uint8_t message(uint8_t error_code, const char * message, const JsonObject & output) { + inline static uint8_t message(uint8_t error_code, const char * message, const JsonObject output) { output.clear(); output["message"] = message; return error_code; diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index 1cbb4a66c..bdad16477 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -366,7 +366,7 @@ bool EMSdevice::has_cmd(const char * cmd, const int8_t id) const { // list of registered device entries // called from the command 'entities' -void EMSdevice::list_device_entries(JsonObject & output) const { +void EMSdevice::list_device_entries(JsonObject output) const { for (const auto & dv : devicevalues_) { auto fullname = dv.get_fullname(); if (!dv.has_state(DeviceValueState::DV_WEB_EXCLUDE) && dv.type != DeviceValueType::CMD && !fullname.empty()) { @@ -827,7 +827,7 @@ std::string EMSdevice::get_value_uom(const std::string & shortname) const { return std::string{}; // not found } -bool EMSdevice::export_values(uint8_t device_type, JsonObject & output, const int8_t id, const uint8_t output_target) { +bool EMSdevice::export_values(uint8_t device_type, JsonObject output, const int8_t id, const uint8_t output_target) { bool has_value = false; uint8_t tag; if (id >= 1 && id <= (1 + DeviceValueTAG::TAG_HS16 - DeviceValueTAG::TAG_HC1)) { @@ -868,7 +868,7 @@ bool EMSdevice::export_values(uint8_t device_type, JsonObject & output, const in // this is loosely based of the function generate_values used for the MQTT and Console // except additional data is stored in the JSON document needed for the Web UI like the UOM and command // v=value, u=uom, n=name, c=cmd, h=help string, s=step, m=min, x=max -void EMSdevice::generate_values_web(JsonObject & output) { +void EMSdevice::generate_values_web(JsonObject output) { // output["label"] = to_string_short(); // output["label"] = name_; JsonArray data = output["data"].to(); @@ -1362,7 +1362,7 @@ void EMSdevice::dump_value_info() { // builds json for a specific device value / entity // cmd is the endpoint or name of the device entity // returns false if failed, otherwise true -bool EMSdevice::get_value_info(JsonObject & output, const char * cmd, const int8_t id) { +bool EMSdevice::get_value_info(JsonObject output, const char * cmd, const int8_t id) { JsonObject json = output; int8_t tag = id; @@ -1568,7 +1568,7 @@ void EMSdevice::publish_all_values() { // For each value in the device create the json object pair and add it to given json // return false if empty // this is used to create the MQTT payloads, Console messages and Web API calls -bool EMSdevice::generate_values(JsonObject & output, const uint8_t tag_filter, const bool nested, const uint8_t output_target) { +bool EMSdevice::generate_values(JsonObject output, const uint8_t tag_filter, const bool nested, const uint8_t output_target) { bool has_values = false; // to see if we've added a value. it's faster than doing a json.size() at the end uint8_t old_tag = 255; // NAN JsonObject json = output; diff --git a/src/emsdevice.h b/src/emsdevice.h index afd0f2aea..d1b47261f 100644 --- a/src/emsdevice.h +++ b/src/emsdevice.h @@ -51,7 +51,7 @@ class EMSdevice { static const char * uom_to_string(uint8_t uom); static const char * tag_to_mqtt(uint8_t tag); static uint8_t decode_brand(uint8_t value); - static bool export_values(uint8_t device_type, JsonObject & output, const int8_t id, const uint8_t output_target); + static bool export_values(uint8_t device_type, JsonObject output, const int8_t id, const uint8_t output_target); // non static @@ -204,7 +204,7 @@ class EMSdevice { void show_telegram_handlers(uuid::console::Shell & shell) const; char * show_telegram_handlers(char * result, const size_t len, const uint8_t handlers); void show_mqtt_handlers(uuid::console::Shell & shell) const; - void list_device_entries(JsonObject & output) const; + void list_device_entries(JsonObject output) const; void add_handlers_ignored(const uint16_t handler); void set_climate_minmax(uint8_t tag, int16_t min, uint32_t max); @@ -216,12 +216,12 @@ class EMSdevice { std::string get_value_uom(const std::string & shortname) const; - bool get_value_info(JsonObject & root, const char * cmd, const int8_t id); - void get_dv_info(JsonObject & json); + bool get_value_info(JsonObject root, const char * cmd, const int8_t id); + void get_dv_info(JsonObject json); enum OUTPUT_TARGET : uint8_t { API_VERBOSE, API_SHORTNAMES, MQTT, CONSOLE }; - bool generate_values(JsonObject & output, const uint8_t tag_filter, const bool nested, const uint8_t output_target); - void generate_values_web(JsonObject & output); + bool generate_values(JsonObject output, const uint8_t tag_filter, const bool nested, const uint8_t output_target); + void generate_values_web(JsonObject output); void generate_values_web_customization(JsonArray & output); void add_device_value(uint8_t tag, diff --git a/src/emsesp.cpp b/src/emsesp.cpp index 8251820e4..56a609d7d 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -662,7 +662,7 @@ void EMSESP::publish_response(std::shared_ptr telegram) { // builds json with the detail of each value, // for a specific EMS device type or the sensors, scheduler and custom entities -bool EMSESP::get_device_value_info(JsonObject & root, const char * cmd, const int8_t id, const uint8_t devicetype) { +bool EMSESP::get_device_value_info(JsonObject root, const char * cmd, const int8_t id, const uint8_t devicetype) { for (const auto & emsdevice : emsdevices) { if (emsdevice->device_type() == devicetype) { if (emsdevice->get_value_info(root, cmd, id)) { @@ -1170,14 +1170,14 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const Command::add( device_type, F_(info), - [device_type](const char * value, const int8_t id, JsonObject & output) { + [device_type](const char * value, const int8_t id, JsonObject output) { return EMSdevice::export_values(device_type, output, id, EMSdevice::OUTPUT_TARGET::API_VERBOSE); }, FL_(info_cmd)); Command::add( device_type, F_(values), - [device_type](const char * value, const int8_t id, JsonObject & output) { + [device_type](const char * value, const int8_t id, JsonObject output) { return EMSdevice::export_values(device_type, output, id, @@ -1188,12 +1188,12 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const Command::add( device_type, F_(commands), - [device_type](const char * value, const int8_t id, JsonObject & output) { return command_commands(device_type, output, id); }, + [device_type](const char * value, const int8_t id, JsonObject output) { return command_commands(device_type, output, id); }, FL_(commands_cmd)); Command::add( device_type, F_(entities), - [device_type](const char * value, const int8_t id, JsonObject & output) { return command_entities(device_type, output, id); }, + [device_type](const char * value, const int8_t id, JsonObject output) { return command_entities(device_type, output, id); }, FL_(entities_cmd)); // MQTT subscribe to the device e.g. "ems-esp/boiler/#" @@ -1204,7 +1204,7 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const } // list device entities -bool EMSESP::command_entities(uint8_t device_type, JsonObject & output, const int8_t id) { +bool EMSESP::command_entities(uint8_t device_type, JsonObject output, const int8_t id) { JsonObject node; for (const auto & emsdevice : emsdevices) { @@ -1218,7 +1218,7 @@ bool EMSESP::command_entities(uint8_t device_type, JsonObject & output, const in } // list all available commands, return as json -bool EMSESP::command_commands(uint8_t device_type, JsonObject & output, const int8_t id) { +bool EMSESP::command_commands(uint8_t device_type, JsonObject output, const int8_t id) { return Command::list(device_type, output); } diff --git a/src/emsesp.h b/src/emsesp.h index 3cf337c16..0e8c67fdb 100644 --- a/src/emsesp.h +++ b/src/emsesp.h @@ -125,7 +125,7 @@ class EMSESP { static uint8_t count_devices(); static uint8_t device_index(const uint8_t device_type, const uint8_t unique_id); - static bool get_device_value_info(JsonObject & root, const char * cmd, const int8_t id, const uint8_t devicetype); + static bool get_device_value_info(JsonObject root, const char * cmd, const int8_t id, const uint8_t devicetype); static void show_device_values(uuid::console::Shell & shell); static void show_sensor_values(uuid::console::Shell & shell); @@ -234,8 +234,8 @@ class EMSESP { static void process_version(std::shared_ptr telegram); static void publish_response(std::shared_ptr telegram); static void publish_all_loop(); - static bool command_commands(uint8_t device_type, JsonObject & output, const int8_t id); - static bool command_entities(uint8_t device_type, JsonObject & output, const int8_t id); + static bool command_commands(uint8_t device_type, JsonObject output, const int8_t id); + static bool command_entities(uint8_t device_type, JsonObject output, const int8_t id); static constexpr uint32_t EMS_FETCH_FREQUENCY = 60000; // check every minute static constexpr uint8_t EMS_WAIT_KM_TIMEOUT = 60; // wait one minute diff --git a/src/mqtt.cpp b/src/mqtt.cpp index abc0019d0..a123fdd75 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -668,12 +668,12 @@ bool Mqtt::queue_publish(const char * topic, const std::string & payload) { return queue_publish_message((topic), payload, mqtt_retain_); } -bool Mqtt::queue_publish(const char * topic, const JsonObject & payload) { +bool Mqtt::queue_publish(const char * topic, const JsonObjectConst & payload) { return queue_publish_retain(topic, payload, mqtt_retain_); } // publish json doc, only if its not empty -bool Mqtt::queue_publish(const std::string & topic, const JsonObject & payload) { +bool Mqtt::queue_publish(const std::string & topic, const JsonObjectConst & payload) { return queue_publish_retain(topic, payload, mqtt_retain_); } @@ -683,11 +683,11 @@ bool Mqtt::queue_publish_retain(const char * topic, const std::string & payload, } // publish json doc, only if its not empty, using the retain flag -bool Mqtt::queue_publish_retain(const std::string & topic, const JsonObject & payload, const bool retain) { +bool Mqtt::queue_publish_retain(const std::string & topic, const JsonObjectConst & payload, const bool retain) { return queue_publish_retain(topic.c_str(), payload, retain); } -bool Mqtt::queue_publish_retain(const char * topic, const JsonObject & payload, const bool retain) { +bool Mqtt::queue_publish_retain(const char * topic, const JsonObjectConst & payload, const bool retain) { if (payload.size()) { std::string payload_text; payload_text.reserve(measureJson(payload) + 1); @@ -707,7 +707,7 @@ bool Mqtt::queue_remove_topic(const char * topic) { } // queue a Home Assistant config topic and payload, with retain flag off. -bool Mqtt::queue_ha(const char * topic, const JsonObject & payload) { +bool Mqtt::queue_ha(const char * topic, const JsonObjectConst & payload) { if (!enabled()) { return false; } @@ -788,21 +788,21 @@ bool Mqtt::publish_system_ha_sensor_config(uint8_t type, const char * name, cons // MQTT discovery configs // entity must match the key/value pair in the *_data topic // note: some extra string copying done here, it looks messy but does help with heap fragmentation issues -bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdevice::DeviceValueType - uint8_t tag, // EMSdevice::DeviceValueTAG - const char * const fullname, // fullname, already translated - const char * const en_name, // original name in english - const uint8_t device_type, // EMSdevice::DeviceType - const char * const entity, // same as shortname - const uint8_t uom, // EMSdevice::DeviceValueUOM (0=NONE) - const bool remove, // true if we want to remove this topic - const bool has_cmd, - const char * const ** options, - uint8_t options_size, - const int16_t dv_set_min, - const uint32_t dv_set_max, - const int8_t num_op, - const JsonObject & dev_json) { +bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdevice::DeviceValueType + uint8_t tag, // EMSdevice::DeviceValueTAG + const char * const fullname, // fullname, already translated + const char * const en_name, // original name in english + const uint8_t device_type, // EMSdevice::DeviceType + const char * const entity, // same as shortname + const uint8_t uom, // EMSdevice::DeviceValueUOM (0=NONE) + const bool remove, // true if we want to remove this topic + const bool has_cmd, + const char * const ** options, + uint8_t options_size, + const int16_t dv_set_min, + const uint32_t dv_set_max, + const int8_t num_op, + const JsonObjectConst & dev_json) { // ignore if name (fullname) is empty if (!fullname || !en_name) { return false; diff --git a/src/mqtt.h b/src/mqtt.h index 235a4cd68..eb7d55307 100644 --- a/src/mqtt.h +++ b/src/mqtt.h @@ -67,31 +67,31 @@ class Mqtt { static bool queue_publish(const std::string & topic, const std::string & payload); static bool queue_publish(const char * topic, const char * payload); - static bool queue_publish(const std::string & topic, const JsonObject & payload); - static bool queue_publish(const char * topic, const JsonObject & payload); + static bool queue_publish(const std::string & topic, const JsonObjectConst & payload); + static bool queue_publish(const char * topic, const JsonObjectConst & payload); static bool queue_publish(const char * topic, const std::string & payload); - static bool queue_publish_retain(const std::string & topic, const JsonObject & payload, const bool retain); + static bool queue_publish_retain(const std::string & topic, const JsonObjectConst & payload, const bool retain); static bool queue_publish_retain(const char * topic, const std::string & payload, const bool retain); - static bool queue_publish_retain(const char * topic, const JsonObject & payload, const bool retain); - static bool queue_ha(const char * topic, const JsonObject & payload); + static bool queue_publish_retain(const char * topic, const JsonObjectConst & payload, const bool retain); + static bool queue_ha(const char * topic, const JsonObjectConst & payload); static bool queue_remove_topic(const char * topic); static bool publish_ha_sensor_config(DeviceValue & dv, const char * model, const char * brand, const bool remove, const bool create_device_config = false); - static bool publish_ha_sensor_config(uint8_t type, - uint8_t tag, - const char * const fullname, - const char * const en_name, - const uint8_t device_type, - const char * const entity, - const uint8_t uom, - const bool remove, - const bool has_cmd, - const char * const ** options, - uint8_t options_size, - const int16_t dv_set_min, - const uint32_t dv_set_max, - const int8_t num_op, - const JsonObject & dev_json); + static bool publish_ha_sensor_config(uint8_t type, + uint8_t tag, + const char * const fullname, + const char * const en_name, + const uint8_t device_type, + const char * const entity, + const uint8_t uom, + const bool remove, + const bool has_cmd, + const char * const ** options, + uint8_t options_size, + const int16_t dv_set_min, + const uint32_t dv_set_max, + const int8_t num_op, + const JsonObjectConst & dev_json); static bool publish_system_ha_sensor_config(uint8_t type, const char * name, const char * entity, const uint8_t uom); static bool publish_ha_climate_config(const uint8_t tag, const bool has_roomtemp, const bool remove = false, const int16_t min = 5, const uint32_t max = 30); diff --git a/src/shower.cpp b/src/shower.cpp index 3d37894bb..838de8895 100644 --- a/src/shower.cpp +++ b/src/shower.cpp @@ -35,7 +35,7 @@ void Shower::start() { Command::add( EMSdevice::DeviceType::BOILER, F_(coldshot), - [&](const char * value, const int8_t id, JsonObject & output) { + [&](const char * value, const int8_t id, JsonObject output) { LOG_INFO("Forcing coldshot..."); if (shower_state_) { output["message"] = "OK"; diff --git a/src/system.cpp b/src/system.cpp index 23813e39b..969e6128e 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -95,7 +95,7 @@ bool System::command_send(const char * value, const int8_t id) { return EMSESP::txservice_.send_raw(value); // ignore id } -bool System::command_response(const char * value, const int8_t id, JsonObject & output) { +bool System::command_response(const char * value, const int8_t id, JsonObject output) { JsonDocument doc; if (DeserializationError::Ok == deserializeJson(doc, Mqtt::get_response())) { for (JsonPair p : doc.as()) { @@ -109,7 +109,7 @@ bool System::command_response(const char * value, const int8_t id, JsonObject & // output all the EMS devices and their values, plus the sensors and any custom entities // not scheduler as these are records with no output data -bool System::command_allvalues(const char * value, const int8_t id, JsonObject & output) { +bool System::command_allvalues(const char * value, const int8_t id, JsonObject output) { JsonDocument doc; JsonObject device_output; @@ -629,7 +629,7 @@ void System::send_info_mqtt() { } // create the json for heartbeat -bool System::heartbeat_json(JsonObject & output) { +bool System::heartbeat_json(JsonObject output) { uint8_t bus_status = EMSESP::bus_status(); if (bus_status == EMSESP::BUS_STATUS_TX_ERRORS) { output["bus_status"] = "txerror"; @@ -1165,12 +1165,12 @@ bool System::check_upgrade(bool factory_settings) { } // list commands -bool System::command_commands(const char * value, const int8_t id, JsonObject & output) { +bool System::command_commands(const char * value, const int8_t id, JsonObject output) { return Command::list(EMSdevice::DeviceType::SYSTEM, output); } // convert settings file into json object -void System::extractSettings(const char * filename, const char * section, JsonObject & output) { +void System::extractSettings(const char * filename, const char * section, JsonObject output) { #ifndef EMSESP_STANDALONE File settingsFile = LittleFS.open(filename); if (settingsFile) { @@ -1189,7 +1189,7 @@ void System::extractSettings(const char * filename, const char * section, JsonOb } // save settings file using input from a json object -bool System::saveSettings(const char * filename, const char * section, JsonObject & input) { +bool System::saveSettings(const char * filename, const char * section, JsonObject input) { #ifndef EMSESP_STANDALONE JsonObject section_json = input[section]; if (section_json) { @@ -1207,7 +1207,7 @@ bool System::saveSettings(const char * filename, const char * section, JsonObjec // export status information including the device information // http://ems-esp/api/system/info -bool System::command_info(const char * value, const int8_t id, JsonObject & output) { +bool System::command_info(const char * value, const int8_t id, JsonObject output) { JsonObject node; // System diff --git a/src/system.h b/src/system.h index bf8f5c237..d53853bd1 100644 --- a/src/system.h +++ b/src/system.h @@ -57,10 +57,10 @@ class System { static bool command_restart(const char * value, const int8_t id); static bool command_syslog_level(const char * value, const int8_t id); static bool command_watch(const char * value, const int8_t id); - static bool command_info(const char * value, const int8_t id, JsonObject & output); - static bool command_commands(const char * value, const int8_t id, JsonObject & output); - static bool command_response(const char * value, const int8_t id, JsonObject & output); - static bool command_allvalues(const char * value, const int8_t id, JsonObject & output); + static bool command_info(const char * value, const int8_t id, JsonObject output); + static bool command_commands(const char * value, const int8_t id, JsonObject output); + static bool command_response(const char * value, const int8_t id, JsonObject output); + static bool command_allvalues(const char * value, const int8_t id, JsonObject output); #if defined(EMSESP_TEST) static bool command_test(const char * value, const int8_t id); @@ -79,7 +79,7 @@ class System { void syslog_init(); bool check_upgrade(bool factory_settings); bool check_restore(); - bool heartbeat_json(JsonObject & output); + bool heartbeat_json(JsonObject output); void send_heartbeat(); void send_info_mqtt(); @@ -102,8 +102,8 @@ class System { void button_init(bool refresh); void commands_init(); - static void extractSettings(const char * filename, const char * section, JsonObject & output); - static bool saveSettings(const char * filename, const char * section, JsonObject & input); + static void extractSettings(const char * filename, const char * section, JsonObject output); + static bool saveSettings(const char * filename, const char * section, JsonObject input); static bool is_valid_gpio(uint8_t pin); static bool load_board_profile(std::vector & data, const std::string & board_profile); diff --git a/src/temperaturesensor.cpp b/src/temperaturesensor.cpp index a38c57d3b..fd6a257f2 100644 --- a/src/temperaturesensor.cpp +++ b/src/temperaturesensor.cpp @@ -49,18 +49,18 @@ void TemperatureSensor::start() { Command::add( EMSdevice::DeviceType::TEMPERATURESENSOR, F_(info), - [&](const char * value, const int8_t id, JsonObject & output) { return command_info(value, id, output); }, + [&](const char * value, const int8_t id, JsonObject output) { return command_info(value, id, output); }, FL_(info_cmd)); Command::add( EMSdevice::DeviceType::TEMPERATURESENSOR, F_(values), - [&](const char * value, const int8_t id, JsonObject & output) { return command_info(value, 0, output); }, + [&](const char * value, const int8_t id, JsonObject output) { return command_info(value, 0, output); }, nullptr, CommandFlag::HIDDEN); // this command is hidden Command::add( EMSdevice::DeviceType::TEMPERATURESENSOR, F_(commands), - [&](const char * value, const int8_t id, JsonObject & output) { return command_commands(value, id, output); }, + [&](const char * value, const int8_t id, JsonObject output) { return command_commands(value, id, output); }, FL_(commands_cmd)); char topic[Mqtt::MQTT_TOPIC_MAX_SIZE]; @@ -362,13 +362,13 @@ bool TemperatureSensor::updated_values() { } // list commands -bool TemperatureSensor::command_commands(const char * value, const int8_t id, JsonObject & output) { +bool TemperatureSensor::command_commands(const char * value, const int8_t id, JsonObject output) { return Command::list(EMSdevice::DeviceType::TEMPERATURESENSOR, output); } // creates JSON doc from values // returns true if there are no sensors -bool TemperatureSensor::command_info(const char * value, const int8_t id, JsonObject & output) { +bool TemperatureSensor::command_info(const char * value, const int8_t id, JsonObject output) { if (sensors_.empty()) { return true; } @@ -394,7 +394,7 @@ bool TemperatureSensor::command_info(const char * value, const int8_t id, JsonOb } // called from emsesp.cpp, similar to the emsdevice->get_value_info -bool TemperatureSensor::get_value_info(JsonObject & output, const char * cmd, const int8_t id) { +bool TemperatureSensor::get_value_info(JsonObject output, const char * cmd, const int8_t id) { if (sensors_.empty()) { return true; } diff --git a/src/temperaturesensor.h b/src/temperaturesensor.h index f4350707f..ba850bf92 100644 --- a/src/temperaturesensor.h +++ b/src/temperaturesensor.h @@ -83,7 +83,7 @@ class TemperatureSensor { void publish_values(const bool force); void reload(); bool updated_values(); - bool get_value_info(JsonObject & output, const char * cmd, const int8_t id); + bool get_value_info(JsonObject output, const char * cmd, const int8_t id); // return back reference to the sensor list, used by other classes std::vector sensors() const { @@ -112,7 +112,7 @@ class TemperatureSensor { bool update(const std::string & id, const std::string & name, int16_t offset); - bool command_info(const char * value, const int8_t id, JsonObject & output); + bool command_info(const char * value, const int8_t id, JsonObject output); #if defined(EMSESP_TEST) void test(); @@ -155,7 +155,7 @@ class TemperatureSensor { uint64_t get_id(const uint8_t addr[]); void remove_ha_topic(const std::string & id); - bool command_commands(const char * value, const int8_t id, JsonObject & output); + bool command_commands(const char * value, const int8_t id, JsonObject output); std::vector sensors_; // our list of active sensors diff --git a/src/web/WebAPIService.cpp b/src/web/WebAPIService.cpp index 1de7230b5..a0a5b493e 100644 --- a/src/web/WebAPIService.cpp +++ b/src/web/WebAPIService.cpp @@ -67,7 +67,7 @@ void WebAPIService::webAPIService_post(AsyncWebServerRequest * request, JsonVari // parse the URL looking for query or path parameters // reporting back any errors -void WebAPIService::parse(AsyncWebServerRequest * request, JsonObject & input) { +void WebAPIService::parse(AsyncWebServerRequest * request, JsonObject input) { // check if the user has admin privileges (token is included and authorized) bool is_admin = false; EMSESP::webSettingsService.read([&](WebSettings & settings) { diff --git a/src/web/WebAPIService.h b/src/web/WebAPIService.h index 2570317b5..1eb7fcbcf 100644 --- a/src/web/WebAPIService.h +++ b/src/web/WebAPIService.h @@ -49,7 +49,7 @@ class WebAPIService { static uint32_t api_count_; static uint16_t api_fails_; - void parse(AsyncWebServerRequest * request, JsonObject & input); + void parse(AsyncWebServerRequest * request, JsonObject input); void getSettings(AsyncWebServerRequest * request); void getCustomizations(AsyncWebServerRequest * request); diff --git a/src/web/WebCustomEntityService.cpp b/src/web/WebCustomEntityService.cpp index cfe1c9488..a371c745e 100644 --- a/src/web/WebCustomEntityService.cpp +++ b/src/web/WebCustomEntityService.cpp @@ -42,7 +42,7 @@ void WebCustomEntityService::begin() { // this creates the entity file, saving it to the FS // and also calls when the Entity web page is refreshed -void WebCustomEntity::read(WebCustomEntity & webEntity, JsonObject & root) { +void WebCustomEntity::read(WebCustomEntity & webEntity, JsonObject root) { JsonArray entity = root["entities"].to(); uint8_t counter = 0; for (const CustomEntityItem & entityItem : webEntity.customEntityItems) { @@ -62,7 +62,7 @@ void WebCustomEntity::read(WebCustomEntity & webEntity, JsonObject & root) { // call on initialization and also when the Entity web page is updated // this loads the data into the internal class -StateUpdateResult WebCustomEntity::update(JsonObject & root, WebCustomEntity & webCustomEntity) { +StateUpdateResult WebCustomEntity::update(JsonObject root, WebCustomEntity & webCustomEntity) { #ifdef EMSESP_STANDALONE // invoke some fake data for testing // clang-format off @@ -183,7 +183,7 @@ bool WebCustomEntityService::command_setvalue(const char * value, const std::str // output of a single value // if add_uom is true it will add the UOM string to the value -void WebCustomEntityService::render_value(JsonObject & output, CustomEntityItem entity, const bool useVal, const bool web, const bool add_uom) { +void WebCustomEntityService::render_value(JsonObject output, CustomEntityItem entity, const bool useVal, const bool web, const bool add_uom) { char payload[12]; std::string name = useVal ? "value" : entity.name; switch (entity.value_type) { @@ -244,7 +244,7 @@ void WebCustomEntityService::render_value(JsonObject & output, CustomEntityItem // display all custom entities // adding each one, with UOM to a json object string -void WebCustomEntityService::show_values(JsonObject & output) { +void WebCustomEntityService::show_values(JsonObject output) { for (const CustomEntityItem & entity : *customEntityItems) { render_value(output, entity, false, false, true); // with add_uom } @@ -252,7 +252,7 @@ void WebCustomEntityService::show_values(JsonObject & output) { // process json output for info/commands and value_info -bool WebCustomEntityService::get_value_info(JsonObject & output, const char * cmd) { +bool WebCustomEntityService::get_value_info(JsonObject output, const char * cmd) { EMSESP::webCustomEntityService.read([&](WebCustomEntity & webEntity) { customEntityItems = &webEntity.customEntityItems; }); if (Helpers::toLower(cmd) == F_(commands)) { output[F_(info)] = Helpers::translated_word(FL_(info_cmd)); @@ -472,7 +472,7 @@ uint8_t WebCustomEntityService::has_commands() { } // send to dashboard, msgpack don't like serialized, use number -void WebCustomEntityService::generate_value_web(JsonObject & output) { +void WebCustomEntityService::generate_value_web(JsonObject output) { EMSESP::webCustomEntityService.read([&](WebCustomEntity & webEntity) { customEntityItems = &webEntity.customEntityItems; }); output["label"] = (std::string) "Custom Entities"; diff --git a/src/web/WebCustomEntityService.h b/src/web/WebCustomEntityService.h index 1b18e2073..27d49a50a 100644 --- a/src/web/WebCustomEntityService.h +++ b/src/web/WebCustomEntityService.h @@ -44,8 +44,8 @@ class WebCustomEntity { public: std::list customEntityItems; - static void read(WebCustomEntity & webEntity, JsonObject & root); - static StateUpdateResult update(JsonObject & root, WebCustomEntity & webEntity); + static void read(WebCustomEntity & webEntity, JsonObject root); + static StateUpdateResult update(JsonObject root, WebCustomEntity & webEntity); }; class WebCustomEntityService : public StatefulService { @@ -56,12 +56,12 @@ class WebCustomEntityService : public StatefulService { void publish_single(const CustomEntityItem & entity); void publish(const bool force = false); bool command_setvalue(const char * value, const std::string name); - bool get_value_info(JsonObject & output, const char * cmd); + bool get_value_info(JsonObject output, const char * cmd); bool get_value(std::shared_ptr telegram); void fetch(); - void render_value(JsonObject & output, CustomEntityItem entity, const bool useVal = false, const bool web = false, const bool add_uom = false); - void show_values(JsonObject & output); - void generate_value_web(JsonObject & output); + void render_value(JsonObject output, CustomEntityItem entity, const bool useVal = false, const bool web = false, const bool add_uom = false); + void show_values(JsonObject output); + void generate_value_web(JsonObject output); uint8_t count_entities(); uint8_t has_commands(); diff --git a/src/web/WebCustomizationService.cpp b/src/web/WebCustomizationService.cpp index 0eb72e688..e69f2132d 100644 --- a/src/web/WebCustomizationService.cpp +++ b/src/web/WebCustomizationService.cpp @@ -55,7 +55,7 @@ WebCustomizationService::WebCustomizationService(AsyncWebServer * server, FS * f } // this creates the customization file, saving it to the FS -void WebCustomization::read(WebCustomization & customizations, JsonObject & root) { +void WebCustomization::read(WebCustomization & customizations, JsonObject root) { // Temperature Sensor customization JsonArray sensorsJson = root["ts"].to(); @@ -95,7 +95,7 @@ void WebCustomization::read(WebCustomization & customizations, JsonObject & root // call on initialization and also when the page is saved via web UI // this loads the data into the internal class -StateUpdateResult WebCustomization::update(JsonObject & root, WebCustomization & customizations) { +StateUpdateResult WebCustomization::update(JsonObject root, WebCustomization & customizations) { #ifdef EMSESP_STANDALONE // invoke some fake data for testing const char * json = "{\"ts\":[],\"as\":[],\"masked_entities\":[{\"product_id\":123,\"device_id\":8,\"entity_ids\":[\"08heatingactive|my custom " diff --git a/src/web/WebCustomizationService.h b/src/web/WebCustomizationService.h index 5044c0005..e757725fb 100644 --- a/src/web/WebCustomizationService.h +++ b/src/web/WebCustomizationService.h @@ -71,8 +71,8 @@ class WebCustomization { std::list sensorCustomizations; // for sensor names and offsets std::list analogCustomizations; // for analog sensors std::list entityCustomizations; // for a list of entities that have a special mask set - static void read(WebCustomization & customizations, JsonObject & root); - static StateUpdateResult update(JsonObject & root, WebCustomization & customizations); + static void read(WebCustomization & customizations, JsonObject root); + static StateUpdateResult update(JsonObject root, WebCustomization & customizations); private: static bool _start; diff --git a/src/web/WebSchedulerService.cpp b/src/web/WebSchedulerService.cpp index ae85767b1..5794f414c 100644 --- a/src/web/WebSchedulerService.cpp +++ b/src/web/WebSchedulerService.cpp @@ -36,7 +36,7 @@ void WebSchedulerService::begin() { // this creates the scheduler file, saving it to the FS // and also calls when the Scheduler web page is refreshed -void WebScheduler::read(WebScheduler & webScheduler, JsonObject & root) { +void WebScheduler::read(WebScheduler & webScheduler, JsonObject root) { JsonArray schedule = root["schedule"].to(); uint8_t counter = 0; for (const ScheduleItem & scheduleItem : webScheduler.scheduleItems) { @@ -53,7 +53,7 @@ void WebScheduler::read(WebScheduler & webScheduler, JsonObject & root) { // 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) { +StateUpdateResult WebScheduler::update(JsonObject root, WebScheduler & webScheduler) { #ifdef EMSESP_STANDALONE // invoke some fake data for testing const char * json = @@ -132,7 +132,7 @@ bool WebSchedulerService::command_setvalue(const char * value, const std::string } // process json output for info/commands and value_info -bool WebSchedulerService::get_value_info(JsonObject & output, const char * cmd) { +bool WebSchedulerService::get_value_info(JsonObject output, const char * cmd) { EMSESP::webSchedulerService.read([&](WebScheduler & webScheduler) { scheduleItems = &webScheduler.scheduleItems; }); if (Helpers::toLower(cmd) == F_(commands)) { output[F_(info)] = Helpers::translated_word(FL_(info_cmd)); diff --git a/src/web/WebSchedulerService.h b/src/web/WebSchedulerService.h index ef012fc5a..baa19c712 100644 --- a/src/web/WebSchedulerService.h +++ b/src/web/WebSchedulerService.h @@ -43,8 +43,8 @@ class WebScheduler { public: std::list scheduleItems; - static void read(WebScheduler & webScheduler, JsonObject & root); - static StateUpdateResult update(JsonObject & root, WebScheduler & webScheduler); + static void read(WebScheduler & webScheduler, JsonObject root); + static StateUpdateResult update(JsonObject root, WebScheduler & webScheduler); }; class WebSchedulerService : public StatefulService { @@ -57,7 +57,7 @@ class WebSchedulerService : public StatefulService { void publish(const bool force = false); bool has_commands(); bool command_setvalue(const char * value, const std::string name); - bool get_value_info(JsonObject & output, const char * cmd); + bool get_value_info(JsonObject output, const char * cmd); void ha_reset() { ha_registered_ = false; } diff --git a/src/web/WebSettingsService.cpp b/src/web/WebSettingsService.cpp index 69ad73e9b..206df1829 100644 --- a/src/web/WebSettingsService.cpp +++ b/src/web/WebSettingsService.cpp @@ -35,7 +35,7 @@ WebSettingsService::WebSettingsService(AsyncWebServer * server, FS * fs, Securit addUpdateHandler([&](const String & originId) { onUpdate(); }, false); } -void WebSettings::read(WebSettings & settings, JsonObject & root) { +void WebSettings::read(WebSettings & settings, JsonObject root) { root["version"] = settings.version; root["locale"] = settings.locale; root["tx_mode"] = settings.tx_mode; @@ -80,7 +80,7 @@ void WebSettings::read(WebSettings & settings, JsonObject & root) { } // call on initialization and also when settings are updated via web or console -StateUpdateResult WebSettings::update(JsonObject & root, WebSettings & settings) { +StateUpdateResult WebSettings::update(JsonObject root, WebSettings & settings) { // load the version of the settings // will be picked up in System::check_upgrade() settings.version = root["version"] | EMSESP_DEFAULT_VERSION; diff --git a/src/web/WebSettingsService.h b/src/web/WebSettingsService.h index c887cdf09..f62815d48 100644 --- a/src/web/WebSettingsService.h +++ b/src/web/WebSettingsService.h @@ -71,8 +71,8 @@ class WebSettings { uint8_t eth_phy_addr; uint8_t eth_clock_mode; - static void read(WebSettings & settings, JsonObject & root); - static StateUpdateResult update(JsonObject & root, WebSettings & settings); + static void read(WebSettings & settings, JsonObject root); + static StateUpdateResult update(JsonObject root, WebSettings & settings); enum ChangeFlags : uint8_t { From 2366f6ba5015bb48b6851f90cc50e0ee8acbd9ff Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 6 Jan 2024 17:58:11 +0100 Subject: [PATCH 10/10] update licensing year to 2024 --- lib_standalone/emsuart_standalone.cpp | 2 +- lib_standalone/emsuart_standalone.h | 2 +- src/analogsensor.h | 2 +- src/command.cpp | 2 +- src/command.h | 2 +- src/common.h | 2 +- src/console.cpp | 3 ++- src/console.h | 2 +- src/default_settings.h | 2 +- src/device_library.h | 2 +- src/devices/alert.cpp | 2 +- src/devices/alert.h | 2 +- src/devices/boiler.cpp | 2 +- src/devices/boiler.h | 2 +- src/devices/connect.cpp | 2 +- src/devices/connect.h | 2 +- src/devices/controller.cpp | 2 +- src/devices/controller.h | 2 +- src/devices/extension.cpp | 2 +- src/devices/extension.h | 2 +- src/devices/gateway.cpp | 2 +- src/devices/gateway.h | 2 +- src/devices/generic.cpp | 2 +- src/devices/generic.h | 2 +- src/devices/heatpump.cpp | 2 +- src/devices/heatpump.h | 2 +- src/devices/heatsource.cpp | 2 +- src/devices/heatsource.h | 2 +- src/devices/mixer.cpp | 2 +- src/devices/mixer.h | 2 +- src/devices/solar.cpp | 2 +- src/devices/solar.h | 2 +- src/devices/switch.cpp | 2 +- src/devices/switch.h | 2 +- src/devices/thermostat.cpp | 2 +- src/devices/thermostat.h | 2 +- src/devices/ventilation.cpp | 2 +- src/devices/ventilation.h | 2 +- src/emsdevice.cpp | 2 +- src/emsdevice.h | 2 +- src/emsdevicevalue.cpp | 2 +- src/emsdevicevalue.h | 2 +- src/emsesp.cpp | 2 +- src/emsesp.h | 2 +- src/emsesp_stub.hpp | 2 +- src/emsfactory.h | 2 +- src/helpers.cpp | 2 +- src/helpers.h | 2 +- src/locale_common.h | 2 +- src/locale_translations.h | 2 +- src/main.cpp | 2 +- src/mqtt.cpp | 2 +- src/mqtt.h | 2 +- src/roomcontrol.cpp | 2 +- src/roomcontrol.h | 2 +- src/shower.cpp | 2 +- src/shower.h | 2 +- src/system.cpp | 2 +- src/system.h | 2 +- src/telegram.cpp | 2 +- src/telegram.h | 2 +- src/temperaturesensor.cpp | 2 +- src/temperaturesensor.h | 2 +- src/test/test.h | 2 +- src/uart/emsuart_esp32.cpp | 2 +- src/uart/emsuart_esp32.h | 2 +- src/web/WebAPIService.cpp | 2 +- src/web/WebAPIService.h | 2 +- src/web/WebCustomEntityService.cpp | 2 +- src/web/WebCustomEntityService.h | 2 +- src/web/WebCustomizationService.cpp | 2 +- src/web/WebCustomizationService.h | 2 +- src/web/WebDataService.cpp | 2 +- src/web/WebDataService.h | 2 +- src/web/WebLogService.cpp | 2 +- src/web/WebLogService.h | 2 +- src/web/WebSchedulerService.cpp | 2 +- src/web/WebSchedulerService.h | 2 +- src/web/WebSettingsService.cpp | 2 +- src/web/WebSettingsService.h | 2 +- src/web/WebStatusService.cpp | 2 +- src/web/WebStatusService.h | 2 +- 82 files changed, 83 insertions(+), 82 deletions(-) diff --git a/lib_standalone/emsuart_standalone.cpp b/lib_standalone/emsuart_standalone.cpp index 7d0e14fe3..56ac5271e 100644 --- a/lib_standalone/emsuart_standalone.cpp +++ b/lib_standalone/emsuart_standalone.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/lib_standalone/emsuart_standalone.h b/lib_standalone/emsuart_standalone.h index 2e6ea8797..ab63a9a0e 100644 --- a/lib_standalone/emsuart_standalone.h +++ b/lib_standalone/emsuart_standalone.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/analogsensor.h b/src/analogsensor.h index 01e353572..12615298d 100644 --- a/src/analogsensor.h +++ b/src/analogsensor.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/command.cpp b/src/command.cpp index e59d239b8..2724ff75e 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/command.h b/src/command.h index db00fa01a..79539ec29 100644 --- a/src/command.h +++ b/src/command.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/common.h b/src/common.h index 4583d5562..b212dc870 100644 --- a/src/common.h +++ b/src/common.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/console.cpp b/src/console.cpp index 6a22d679b..0947bebef 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -1,6 +1,7 @@ + /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/console.h b/src/console.h index d5d18ac76..a8e7eeaae 100644 --- a/src/console.h +++ b/src/console.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/default_settings.h b/src/default_settings.h index dd9deffaa..efabd8972 100644 --- a/src/default_settings.h +++ b/src/default_settings.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/device_library.h b/src/device_library.h index 3fb7b8afb..8a60bfa2e 100644 --- a/src/device_library.h +++ b/src/device_library.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/alert.cpp b/src/devices/alert.cpp index c297192c2..7a4c9adf6 100644 --- a/src/devices/alert.cpp +++ b/src/devices/alert.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/alert.h b/src/devices/alert.h index 97d5bc521..896b84d82 100644 --- a/src/devices/alert.h +++ b/src/devices/alert.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 5bf11ce39..5b09f8bc9 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/boiler.h b/src/devices/boiler.h index 70fa992c0..93007917f 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/connect.cpp b/src/devices/connect.cpp index ab442ba6e..db5d578e3 100644 --- a/src/devices/connect.cpp +++ b/src/devices/connect.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/connect.h b/src/devices/connect.h index d39e48a14..18b75c40f 100644 --- a/src/devices/connect.h +++ b/src/devices/connect.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/controller.cpp b/src/devices/controller.cpp index 56b768a3b..b5aad4d27 100644 --- a/src/devices/controller.cpp +++ b/src/devices/controller.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/controller.h b/src/devices/controller.h index 7a5de269c..2eac1b9c8 100644 --- a/src/devices/controller.h +++ b/src/devices/controller.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/extension.cpp b/src/devices/extension.cpp index 460d80791..153d8dfca 100644 --- a/src/devices/extension.cpp +++ b/src/devices/extension.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/extension.h b/src/devices/extension.h index 617456bdc..354326d1b 100644 --- a/src/devices/extension.h +++ b/src/devices/extension.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/gateway.cpp b/src/devices/gateway.cpp index 124e5bfed..b5b42d37f 100644 --- a/src/devices/gateway.cpp +++ b/src/devices/gateway.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/gateway.h b/src/devices/gateway.h index c20252727..55812fc97 100644 --- a/src/devices/gateway.h +++ b/src/devices/gateway.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/generic.cpp b/src/devices/generic.cpp index d93543d12..1ae9b90d2 100644 --- a/src/devices/generic.cpp +++ b/src/devices/generic.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/generic.h b/src/devices/generic.h index e1a662cac..e5e11c7f2 100644 --- a/src/devices/generic.h +++ b/src/devices/generic.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/heatpump.cpp b/src/devices/heatpump.cpp index 8a1c214b6..065884496 100644 --- a/src/devices/heatpump.cpp +++ b/src/devices/heatpump.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/heatpump.h b/src/devices/heatpump.h index cb0fbcab1..5512e2b77 100644 --- a/src/devices/heatpump.h +++ b/src/devices/heatpump.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/heatsource.cpp b/src/devices/heatsource.cpp index 2e4c6fbdd..031a5b681 100644 --- a/src/devices/heatsource.cpp +++ b/src/devices/heatsource.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/heatsource.h b/src/devices/heatsource.h index 7fbd4f8df..eb0b523b7 100644 --- a/src/devices/heatsource.h +++ b/src/devices/heatsource.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/mixer.cpp b/src/devices/mixer.cpp index 5f4a94fbe..e13bb401e 100644 --- a/src/devices/mixer.cpp +++ b/src/devices/mixer.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/mixer.h b/src/devices/mixer.h index b509cd3e6..f3c513cbc 100644 --- a/src/devices/mixer.h +++ b/src/devices/mixer.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/solar.cpp b/src/devices/solar.cpp index 53e1547fc..409533b50 100644 --- a/src/devices/solar.cpp +++ b/src/devices/solar.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/solar.h b/src/devices/solar.h index 16bb379bf..6d773f3cb 100644 --- a/src/devices/solar.h +++ b/src/devices/solar.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/switch.cpp b/src/devices/switch.cpp index b9d0d1932..842fab89a 100644 --- a/src/devices/switch.cpp +++ b/src/devices/switch.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/switch.h b/src/devices/switch.h index ddcd6f2cc..fb8ba01e8 100644 --- a/src/devices/switch.h +++ b/src/devices/switch.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 017ce071d..d9d28b474 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/thermostat.h b/src/devices/thermostat.h index 32072fa85..fe9d5ba6f 100644 --- a/src/devices/thermostat.h +++ b/src/devices/thermostat.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/ventilation.cpp b/src/devices/ventilation.cpp index 8d85895f5..8b815c34b 100644 --- a/src/devices/ventilation.cpp +++ b/src/devices/ventilation.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/devices/ventilation.h b/src/devices/ventilation.h index 336b6193c..4587f195f 100644 --- a/src/devices/ventilation.h +++ b/src/devices/ventilation.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index bdad16477..7762ac5da 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/emsdevice.h b/src/emsdevice.h index d1b47261f..736cc2c91 100644 --- a/src/emsdevice.h +++ b/src/emsdevice.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/emsdevicevalue.cpp b/src/emsdevicevalue.cpp index 8330b7b9b..a6604c075 100644 --- a/src/emsdevicevalue.cpp +++ b/src/emsdevicevalue.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/emsdevicevalue.h b/src/emsdevicevalue.h index eae5375f6..d99d0dc5b 100644 --- a/src/emsdevicevalue.h +++ b/src/emsdevicevalue.h @@ -1,7 +1,7 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/emsesp.cpp b/src/emsesp.cpp index 56a609d7d..fd6b61e1c 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/emsesp.h b/src/emsesp.h index 0e8c67fdb..324ed9ad5 100644 --- a/src/emsesp.h +++ b/src/emsesp.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/emsesp_stub.hpp b/src/emsesp_stub.hpp index 69ece6f7e..0df912ef1 100644 --- a/src/emsesp_stub.hpp +++ b/src/emsesp_stub.hpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/emsfactory.h b/src/emsfactory.h index 8c3eb17ad..3117afc84 100644 --- a/src/emsfactory.h +++ b/src/emsfactory.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/helpers.cpp b/src/helpers.cpp index c9c5eb9b5..5fc0e3129 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/helpers.h b/src/helpers.h index ea1422dcd..a31567e84 100644 --- a/src/helpers.h +++ b/src/helpers.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/locale_common.h b/src/locale_common.h index 1c69a1870..b80e97166 100644 --- a/src/locale_common.h +++ b/src/locale_common.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/locale_translations.h b/src/locale_translations.h index fb3492af2..da998b18f 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/main.cpp b/src/main.cpp index 15acb568d..a4ebccc72 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/mqtt.cpp b/src/mqtt.cpp index a123fdd75..f81a90c08 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/mqtt.h b/src/mqtt.h index eb7d55307..101fb53c3 100644 --- a/src/mqtt.h +++ b/src/mqtt.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/roomcontrol.cpp b/src/roomcontrol.cpp index 92472b8aa..a2023d656 100644 --- a/src/roomcontrol.cpp +++ b/src/roomcontrol.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/roomcontrol.h b/src/roomcontrol.h index 6ac4993e5..bd4e0ef42 100644 --- a/src/roomcontrol.h +++ b/src/roomcontrol.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/shower.cpp b/src/shower.cpp index 838de8895..4d83c837d 100644 --- a/src/shower.cpp +++ b/src/shower.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/shower.h b/src/shower.h index b2504a6d6..fc60c8037 100644 --- a/src/shower.h +++ b/src/shower.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/system.cpp b/src/system.cpp index 969e6128e..029620b75 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/system.h b/src/system.h index d53853bd1..acfc11b89 100644 --- a/src/system.h +++ b/src/system.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/telegram.cpp b/src/telegram.cpp index 03bdcd3e4..ac3da27c3 100644 --- a/src/telegram.cpp +++ b/src/telegram.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/telegram.h b/src/telegram.h index 28e12c630..fb047823d 100644 --- a/src/telegram.h +++ b/src/telegram.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/temperaturesensor.cpp b/src/temperaturesensor.cpp index fd6a257f2..359403736 100644 --- a/src/temperaturesensor.cpp +++ b/src/temperaturesensor.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/temperaturesensor.h b/src/temperaturesensor.h index ba850bf92..98d10066f 100644 --- a/src/temperaturesensor.h +++ b/src/temperaturesensor.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test/test.h b/src/test/test.h index 5bf4d8641..b8091a0e3 100644 --- a/src/test/test.h +++ b/src/test/test.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/uart/emsuart_esp32.cpp b/src/uart/emsuart_esp32.cpp index d259ab03c..ad8c9da7c 100644 --- a/src/uart/emsuart_esp32.cpp +++ b/src/uart/emsuart_esp32.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/uart/emsuart_esp32.h b/src/uart/emsuart_esp32.h index e39ad91ba..ada397087 100644 --- a/src/uart/emsuart_esp32.h +++ b/src/uart/emsuart_esp32.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebAPIService.cpp b/src/web/WebAPIService.cpp index a0a5b493e..4dc52fa53 100644 --- a/src/web/WebAPIService.cpp +++ b/src/web/WebAPIService.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebAPIService.h b/src/web/WebAPIService.h index 1eb7fcbcf..a7781102d 100644 --- a/src/web/WebAPIService.h +++ b/src/web/WebAPIService.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebCustomEntityService.cpp b/src/web/WebCustomEntityService.cpp index a371c745e..065ceb4f3 100644 --- a/src/web/WebCustomEntityService.cpp +++ b/src/web/WebCustomEntityService.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebCustomEntityService.h b/src/web/WebCustomEntityService.h index 27d49a50a..568261ddc 100644 --- a/src/web/WebCustomEntityService.h +++ b/src/web/WebCustomEntityService.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebCustomizationService.cpp b/src/web/WebCustomizationService.cpp index e69f2132d..0b0b94200 100644 --- a/src/web/WebCustomizationService.cpp +++ b/src/web/WebCustomizationService.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebCustomizationService.h b/src/web/WebCustomizationService.h index e757725fb..40a390428 100644 --- a/src/web/WebCustomizationService.h +++ b/src/web/WebCustomizationService.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebDataService.cpp b/src/web/WebDataService.cpp index 98daa8b5f..9dd41595d 100644 --- a/src/web/WebDataService.cpp +++ b/src/web/WebDataService.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebDataService.h b/src/web/WebDataService.h index d85d20988..68902e45d 100644 --- a/src/web/WebDataService.h +++ b/src/web/WebDataService.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebLogService.cpp b/src/web/WebLogService.cpp index c4f97f8b3..cd8f47266 100644 --- a/src/web/WebLogService.cpp +++ b/src/web/WebLogService.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebLogService.h b/src/web/WebLogService.h index 0f06bfff2..ce3630e94 100644 --- a/src/web/WebLogService.h +++ b/src/web/WebLogService.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebSchedulerService.cpp b/src/web/WebSchedulerService.cpp index 5794f414c..b70612960 100644 --- a/src/web/WebSchedulerService.cpp +++ b/src/web/WebSchedulerService.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebSchedulerService.h b/src/web/WebSchedulerService.h index baa19c712..d5496a9e1 100644 --- a/src/web/WebSchedulerService.h +++ b/src/web/WebSchedulerService.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebSettingsService.cpp b/src/web/WebSettingsService.cpp index 206df1829..436f5d23e 100644 --- a/src/web/WebSettingsService.cpp +++ b/src/web/WebSettingsService.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebSettingsService.h b/src/web/WebSettingsService.h index f62815d48..d820f1ce2 100644 --- a/src/web/WebSettingsService.h +++ b/src/web/WebSettingsService.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebStatusService.cpp b/src/web/WebStatusService.cpp index e0e93bb97..08cd42b60 100644 --- a/src/web/WebStatusService.cpp +++ b/src/web/WebStatusService.cpp @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/web/WebStatusService.h b/src/web/WebStatusService.h index c0111a86f..48551aac0 100644 --- a/src/web/WebStatusService.h +++ b/src/web/WebStatusService.h @@ -1,6 +1,6 @@ /* * EMS-ESP - https://github.com/emsesp/EMS-ESP - * Copyright 2020-2023 Paul Derbyshire + * Copyright 2020-2024 Paul Derbyshire * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by