mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fix odd spelling mistakes
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Uses font-size 400 (normal) only and Latin (plus extra unicode chars) to keep flash memory to a minimun
|
* Uses font-size 400 (normal) only and Latin (plus extra unicode chars) to keep flash memory to a minimum
|
||||||
* View fonts on https://fonts.google.com/
|
* View fonts on https://fonts.google.com/
|
||||||
* Download woff2 using e.g. https://fonts.googleapis.com/css2?family=Lato or https://fonts.googleapis.com/css2?family=Roboto
|
* Download woff2 using e.g. https://fonts.googleapis.com/css2?family=Lato or https://fonts.googleapis.com/css2?family=Roboto
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,22 +21,22 @@ export const fetchLog = () => alovaInstance.Post('/rest/fetchLog');
|
|||||||
// Get versions from github
|
// Get versions from github
|
||||||
export const getStableVersion = () =>
|
export const getStableVersion = () =>
|
||||||
alovaInstanceGH.Get<Version>('releases/latest', {
|
alovaInstanceGH.Get<Version>('releases/latest', {
|
||||||
transformData(reponse: any) {
|
transformData(response: any) {
|
||||||
return {
|
return {
|
||||||
version: reponse.data.name,
|
version: response.data.name,
|
||||||
url: reponse.data.assets[1].browser_download_url,
|
url: response.data.assets[1].browser_download_url,
|
||||||
changelog: reponse.data.assets[0].browser_download_url
|
changelog: response.data.assets[0].browser_download_url
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export const getDevVersion = () =>
|
export const getDevVersion = () =>
|
||||||
alovaInstanceGH.Get<Version>('releases/tags/latest', {
|
alovaInstanceGH.Get<Version>('releases/tags/latest', {
|
||||||
transformData(reponse: any) {
|
transformData(response: any) {
|
||||||
return {
|
return {
|
||||||
version: reponse.data.name.split(/\s+/).splice(-1),
|
version: response.data.name.split(/\s+/).splice(-1),
|
||||||
url: reponse.data.assets[1].browser_download_url,
|
url: response.data.assets[1].browser_download_url,
|
||||||
changelog: reponse.data.assets[0].browser_download_url
|
changelog: response.data.assets[0].browser_download_url
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -498,7 +498,7 @@ void AnalogSensor::publish_values(const bool force) {
|
|||||||
config["val_tpl"] = (std::string) "{{" + val_obj + " if " + val_cond + " else " + sample_val + "}}";
|
config["val_tpl"] = (std::string) "{{" + val_obj + " if " + val_cond + " else " + sample_val + "}}";
|
||||||
|
|
||||||
char uniq_s[70];
|
char uniq_s[70];
|
||||||
if (Mqtt::entity_format() == Mqtt::entitiyFormat::MULTI_SHORT) {
|
if (Mqtt::entity_format() == Mqtt::entityFormat::MULTI_SHORT) {
|
||||||
snprintf(uniq_s, sizeof(uniq_s), "%s_analogsensor_%02d", Mqtt::basename().c_str(), sensor.gpio());
|
snprintf(uniq_s, sizeof(uniq_s), "%s_analogsensor_%02d", Mqtt::basename().c_str(), sensor.gpio());
|
||||||
} else {
|
} else {
|
||||||
snprintf(uniq_s, sizeof(uniq_s), "analogsensor_%02d", sensor.gpio());
|
snprintf(uniq_s, sizeof(uniq_s), "analogsensor_%02d", sensor.gpio());
|
||||||
|
|||||||
@@ -1139,8 +1139,8 @@ void Thermostat::process_RC300Settings(std::shared_ptr<const Telegram> telegram)
|
|||||||
// 0x2CC - e.g. wwprio for RC310 hcx parameter
|
// 0x2CC - e.g. wwprio for RC310 hcx parameter
|
||||||
void Thermostat::process_RC300Set2(std::shared_ptr<const Telegram> telegram) {
|
void Thermostat::process_RC300Set2(std::shared_ptr<const Telegram> telegram) {
|
||||||
// typeids are not in a raw. hc:0x2CC, hc2: 0x2CE for RC310
|
// typeids are not in a raw. hc:0x2CC, hc2: 0x2CE for RC310
|
||||||
// telegram is either offset 3 with data lenght of 1 and values 0/1 (radiators) - 10 0B FF 03 01 CC 01 F6
|
// telegram is either offset 3 with data length of 1 and values 0/1 (radiators) - 10 0B FF 03 01 CC 01 F6
|
||||||
// or offset 0 with data lenght of 6 bytes - offset 3 values are 0x00 or 0xFF - 10 0B FF 00 01 CE FF 13 0A FF 1E 00 20
|
// or offset 0 with data length of 6 bytes - offset 3 values are 0x00 or 0xFF - 10 0B FF 00 01 CE FF 13 0A FF 1E 00 20
|
||||||
|
|
||||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
||||||
if (hc == nullptr) {
|
if (hc == nullptr) {
|
||||||
@@ -2727,7 +2727,7 @@ bool Thermostat::set_controlmode(const char * value, const int8_t id) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// sets the thermostat time for nightmode for RC10, telegrm 0xB0
|
// sets the thermostat time for nightmode for RC10, telegram 0xB0
|
||||||
bool Thermostat::set_reducehours(const char * value, const int8_t id) {
|
bool Thermostat::set_reducehours(const char * value, const int8_t id) {
|
||||||
uint8_t hc_num = (id == -1) ? AUTO_HEATING_CIRCUIT : id;
|
uint8_t hc_num = (id == -1) ? AUTO_HEATING_CIRCUIT : id;
|
||||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(hc_num);
|
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(hc_num);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include <uuid/log.h>
|
#include <uuid/log.h>
|
||||||
|
|
||||||
// forward declarators
|
// forward declarator
|
||||||
// used to bind EMS-ESP functions to external frameworks
|
// used to bind EMS-ESP functions to external frameworks
|
||||||
namespace emsesp {
|
namespace emsesp {
|
||||||
class EMSESP {
|
class EMSESP {
|
||||||
|
|||||||
10
src/mqtt.cpp
10
src/mqtt.cpp
@@ -315,7 +315,7 @@ void Mqtt::show_topic_handlers(uuid::console::Shell & shell, const uint8_t devic
|
|||||||
|
|
||||||
// called when an MQTT Publish ACK is received
|
// called when an MQTT Publish ACK is received
|
||||||
void Mqtt::on_publish(uint16_t packetId) const {
|
void Mqtt::on_publish(uint16_t packetId) const {
|
||||||
LOG_DEBUG("Packet %d sent successfull", packetId);
|
LOG_DEBUG("Packet %d sent successful", packetId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// called when MQTT settings have changed via the Web forms
|
// called when MQTT settings have changed via the Web forms
|
||||||
@@ -521,7 +521,7 @@ void Mqtt::ha_status() {
|
|||||||
StaticJsonDocument<EMSESP_JSON_SIZE_LARGE> doc;
|
StaticJsonDocument<EMSESP_JSON_SIZE_LARGE> doc;
|
||||||
|
|
||||||
char uniq[70];
|
char uniq[70];
|
||||||
if (Mqtt::entity_format() == entitiyFormat::MULTI_SHORT) {
|
if (Mqtt::entity_format() == entityFormat::MULTI_SHORT) {
|
||||||
snprintf(uniq, sizeof(uniq), "%s_system_status", mqtt_basename_.c_str());
|
snprintf(uniq, sizeof(uniq), "%s_system_status", mqtt_basename_.c_str());
|
||||||
} else {
|
} else {
|
||||||
strcpy(uniq, "system_status");
|
strcpy(uniq, "system_status");
|
||||||
@@ -799,10 +799,10 @@ bool Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
|
|||||||
|
|
||||||
// build unique identifier also used as object_id which also becomes the Entity ID in HA
|
// build unique identifier also used as object_id which also becomes the Entity ID in HA
|
||||||
char uniq_id[80];
|
char uniq_id[80];
|
||||||
if (Mqtt::entity_format() == entitiyFormat::MULTI_SHORT) {
|
if (Mqtt::entity_format() == entityFormat::MULTI_SHORT) {
|
||||||
// prefix base name to each uniq_id and use the shortname
|
// prefix base name to each uniq_id and use the shortname
|
||||||
snprintf(uniq_id, sizeof(uniq_id), "%s_%s_%s", mqtt_basename_.c_str(), device_name, entity_with_tag);
|
snprintf(uniq_id, sizeof(uniq_id), "%s_%s_%s", mqtt_basename_.c_str(), device_name, entity_with_tag);
|
||||||
} else if (Mqtt::entity_format() == entitiyFormat::SINGLE_SHORT) {
|
} else if (Mqtt::entity_format() == entityFormat::SINGLE_SHORT) {
|
||||||
// shortname, no mqtt base. This is the default version.
|
// shortname, no mqtt base. This is the default version.
|
||||||
snprintf(uniq_id, sizeof(uniq_id), "%s_%s", device_name, entity_with_tag);
|
snprintf(uniq_id, sizeof(uniq_id), "%s_%s", device_name, entity_with_tag);
|
||||||
} else {
|
} else {
|
||||||
@@ -1166,7 +1166,7 @@ bool Mqtt::publish_ha_climate_config(const uint8_t tag, const bool has_roomtemp,
|
|||||||
|
|
||||||
snprintf(name_s, sizeof(name_s), "Hc%d", hc_num);
|
snprintf(name_s, sizeof(name_s), "Hc%d", hc_num);
|
||||||
|
|
||||||
if (Mqtt::entity_format() == entitiyFormat::MULTI_SHORT) {
|
if (Mqtt::entity_format() == entityFormat::MULTI_SHORT) {
|
||||||
snprintf(uniq_id_s, sizeof(uniq_id_s), "%s_thermostat_hc%d", mqtt_basename_.c_str(), hc_num); // add basename
|
snprintf(uniq_id_s, sizeof(uniq_id_s), "%s_thermostat_hc%d", mqtt_basename_.c_str(), hc_num); // add basename
|
||||||
} else {
|
} else {
|
||||||
snprintf(uniq_id_s, sizeof(uniq_id_s), "thermostat_hc%d", hc_num); // backward compatible with v3.4
|
snprintf(uniq_id_s, sizeof(uniq_id_s), "thermostat_hc%d", hc_num); // backward compatible with v3.4
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ using mqtt_sub_function_p = std::function<bool(const char * message)>;
|
|||||||
class Mqtt {
|
class Mqtt {
|
||||||
public:
|
public:
|
||||||
enum discoveryType : uint8_t { HOMEASSISTANT, DOMOTICZ };
|
enum discoveryType : uint8_t { HOMEASSISTANT, DOMOTICZ };
|
||||||
enum entitiyFormat : uint8_t { SINGLE_LONG, SINGLE_SHORT, MULTI_SHORT };
|
enum entityFormat : uint8_t { SINGLE_LONG, SINGLE_SHORT, MULTI_SHORT };
|
||||||
|
|
||||||
void loop();
|
void loop();
|
||||||
void start();
|
void start();
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ void Shower::set_shower_state(bool state, bool force) {
|
|||||||
doc["name"] = "Shower Active";
|
doc["name"] = "Shower Active";
|
||||||
|
|
||||||
char str[70];
|
char str[70];
|
||||||
if (Mqtt::entity_format() == Mqtt::entitiyFormat::MULTI_SHORT) {
|
if (Mqtt::entity_format() == Mqtt::entityFormat::MULTI_SHORT) {
|
||||||
snprintf(str, sizeof(str), "%s_shower_active", Mqtt::basename().c_str());
|
snprintf(str, sizeof(str), "%s_shower_active", Mqtt::basename().c_str());
|
||||||
} else {
|
} else {
|
||||||
snprintf(str, sizeof(str), "shower_active"); // v3.4 compatible
|
snprintf(str, sizeof(str), "shower_active"); // v3.4 compatible
|
||||||
|
|||||||
@@ -536,7 +536,7 @@ void System::loop() {
|
|||||||
|
|
||||||
// send MQTT info topic appended with the version information as JSON, as a retained flag
|
// send MQTT info topic appended with the version information as JSON, as a retained flag
|
||||||
void System::send_info_mqtt(const char * event_str, bool send_ntp) {
|
void System::send_info_mqtt(const char * event_str, bool send_ntp) {
|
||||||
// use dynamic json becaues it is called from NTP-callback from lwip task with small stack
|
// use dynamic json because it is called from NTP-callback from lwip task with small stack
|
||||||
DynamicJsonDocument doc = DynamicJsonDocument(EMSESP_JSON_SIZE_MEDIUM);
|
DynamicJsonDocument doc = DynamicJsonDocument(EMSESP_JSON_SIZE_MEDIUM);
|
||||||
doc["event"] = event_str;
|
doc["event"] = event_str;
|
||||||
doc["version"] = EMSESP_APP_VERSION;
|
doc["version"] = EMSESP_APP_VERSION;
|
||||||
@@ -1503,7 +1503,7 @@ std::string System::reset_reason(uint8_t cpu) const {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return ("Unkonwn");
|
return ("Unknown");
|
||||||
}
|
}
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
|||||||
@@ -528,7 +528,7 @@ void TemperatureSensor::publish_values(const bool force) {
|
|||||||
config["val_tpl"] = (std::string) "{{" + val_obj + " if " + val_cond + " else -55}}";
|
config["val_tpl"] = (std::string) "{{" + val_obj + " if " + val_cond + " else -55}}";
|
||||||
|
|
||||||
char uniq_s[70];
|
char uniq_s[70];
|
||||||
if (Mqtt::entity_format() == Mqtt::entitiyFormat::MULTI_SHORT) {
|
if (Mqtt::entity_format() == Mqtt::entityFormat::MULTI_SHORT) {
|
||||||
snprintf(uniq_s, sizeof(uniq_s), "%s_temperaturesensor_%s", Mqtt::basename().c_str(), sensor.id().c_str());
|
snprintf(uniq_s, sizeof(uniq_s), "%s_temperaturesensor_%s", Mqtt::basename().c_str(), sensor.id().c_str());
|
||||||
} else {
|
} else {
|
||||||
snprintf(uniq_s, sizeof(uniq_s), "temperaturesensor_%s", sensor.id().c_str());
|
snprintf(uniq_s, sizeof(uniq_s), "temperaturesensor_%s", sensor.id().c_str());
|
||||||
|
|||||||
@@ -1001,14 +1001,14 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
|||||||
EMSESP::mqtt_.incoming("ems-esp/thermostat/hc2/mode", "auto");
|
EMSESP::mqtt_.incoming("ems-esp/thermostat/hc2/mode", "auto");
|
||||||
EMSESP::mqtt_.incoming("ems-esp/thermostat/wwc3/mode", "auto");
|
EMSESP::mqtt_.incoming("ems-esp/thermostat/wwc3/mode", "auto");
|
||||||
EMSESP::mqtt_.incoming("ems-esp/boiler/wwcircpump", "off");
|
EMSESP::mqtt_.incoming("ems-esp/boiler/wwcircpump", "off");
|
||||||
EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload, sends reponse
|
EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload
|
||||||
EMSESP::mqtt_.incoming("ems-esp/thermostat_hc1", "22"); // HA only
|
EMSESP::mqtt_.incoming("ems-esp/thermostat_hc1", "22"); // HA only
|
||||||
EMSESP::mqtt_.incoming("ems-esp/thermostat_hc1", "off"); // HA only
|
EMSESP::mqtt_.incoming("ems-esp/thermostat_hc1", "off"); // HA only
|
||||||
EMSESP::mqtt_.incoming("ems-esp/system/send", "11 12 13");
|
EMSESP::mqtt_.incoming("ems-esp/system/send", "11 12 13");
|
||||||
EMSESP::mqtt_.incoming("ems-esp/boiler/syspress"); // empty payload, sends reponse
|
EMSESP::mqtt_.incoming("ems-esp/boiler/syspress"); // empty payload
|
||||||
EMSESP::mqtt_.incoming("ems-esp/thermostat/mode"); // empty payload, sends reponse
|
EMSESP::mqtt_.incoming("ems-esp/thermostat/mode"); // empty payload
|
||||||
EMSESP::mqtt_.incoming("ems-esp/system/publish");
|
EMSESP::mqtt_.incoming("ems-esp/system/publish");
|
||||||
EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload, sends reponse
|
EMSESP::mqtt_.incoming("ems-esp/thermostat/seltemp"); // empty payload
|
||||||
|
|
||||||
EMSESP::mqtt_.incoming("ems-esp/boiler/wwseltemp", "59");
|
EMSESP::mqtt_.incoming("ems-esp/boiler/wwseltemp", "59");
|
||||||
EMSESP::mqtt_.incoming("ems-esp/boiler/wwseltemp");
|
EMSESP::mqtt_.incoming("ems-esp/boiler/wwseltemp");
|
||||||
@@ -1022,7 +1022,7 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
|||||||
|
|
||||||
// check extended MQTT base
|
// check extended MQTT base
|
||||||
Mqtt::base("home/cellar/heating");
|
Mqtt::base("home/cellar/heating");
|
||||||
EMSESP::mqtt_.incoming("home/cellar/heating/thermostat/mode"); // empty payload, sends reponse
|
EMSESP::mqtt_.incoming("home/cellar/heating/thermostat/mode"); // empty payload
|
||||||
|
|
||||||
// Web API TESTS
|
// Web API TESTS
|
||||||
AsyncWebServerRequest request;
|
AsyncWebServerRequest request;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ void WebScheduler::read(WebScheduler & webScheduler, JsonObject & root) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// call on initialization and also when the Scheduile web page is saved
|
// call on initialization and also when the Schedule web page is saved
|
||||||
// this loads the data into the internal class
|
// 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
|
#ifdef EMSESP_STANDALONE
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ const char * WebStatusService::disconnectReason(uint8_t code) {
|
|||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case WIFI_REASON_UNSPECIFIED: // = 1,
|
case WIFI_REASON_UNSPECIFIED: // = 1,
|
||||||
return "unspecifiied";
|
return "unspecified";
|
||||||
case WIFI_REASON_AUTH_EXPIRE: // = 2,
|
case WIFI_REASON_AUTH_EXPIRE: // = 2,
|
||||||
return "auth expire";
|
return "auth expire";
|
||||||
case WIFI_REASON_AUTH_LEAVE: // = 3,
|
case WIFI_REASON_AUTH_LEAVE: // = 3,
|
||||||
@@ -239,9 +239,9 @@ const char * WebStatusService::disconnectReason(uint8_t code) {
|
|||||||
case WIFI_REASON_ASSOC_TOOMANY: // = 5,
|
case WIFI_REASON_ASSOC_TOOMANY: // = 5,
|
||||||
return "assoc too many";
|
return "assoc too many";
|
||||||
case WIFI_REASON_NOT_AUTHED: // = 6,
|
case WIFI_REASON_NOT_AUTHED: // = 6,
|
||||||
return "not authed";
|
return "not authenticated";
|
||||||
case WIFI_REASON_NOT_ASSOCED: // = 7,
|
case WIFI_REASON_NOT_ASSOCED: // = 7,
|
||||||
return "not assoced";
|
return "not assoc";
|
||||||
case WIFI_REASON_ASSOC_LEAVE: // = 8,
|
case WIFI_REASON_ASSOC_LEAVE: // = 8,
|
||||||
return "assoc leave";
|
return "assoc leave";
|
||||||
case WIFI_REASON_ASSOC_NOT_AUTHED: // = 9,
|
case WIFI_REASON_ASSOC_NOT_AUTHED: // = 9,
|
||||||
|
|||||||
Reference in New Issue
Block a user