mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
Merge pull request #1746 from MichaelDvP/dev
ipv6 permanent, shutdown command (fixed)
This commit is contained in:
515
interface/.yarn/releases/yarn-4.1.1.cjs → interface/.yarn/releases/yarn-4.2.1.cjs
vendored
Executable file → Normal file
515
interface/.yarn/releases/yarn-4.1.1.cjs → interface/.yarn/releases/yarn-4.2.1.cjs
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.1.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.2.1.cjs
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"@mui/material": "^5.15.16",
|
||||
"@table-library/react-table-library": "4.1.7",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^20.12.8",
|
||||
"@types/node": "^20.12.10",
|
||||
"@types/react": "^18.3.1",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
@@ -43,7 +43,7 @@
|
||||
"react": "latest",
|
||||
"react-dom": "latest",
|
||||
"react-dropzone": "^14.2.3",
|
||||
"react-icons": "^5.2.0",
|
||||
"react-icons": "^5.2.1",
|
||||
"react-router-dom": "^6.23.0",
|
||||
"react-toastify": "^10.0.5",
|
||||
"typesafe-i18n": "^5.26.2",
|
||||
@@ -68,5 +68,5 @@
|
||||
"vite-plugin-imagemin": "^0.6.1",
|
||||
"vite-tsconfig-paths": "^4.3.2"
|
||||
},
|
||||
"packageManager": "yarn@4.1.1"
|
||||
"packageManager": "yarn@4.2.1"
|
||||
}
|
||||
|
||||
@@ -86,7 +86,6 @@ const NetworkSettings: FC = () => {
|
||||
password: current_data ? current_data.password : '',
|
||||
hostname: current_data?.hostname,
|
||||
static_ip_config: false,
|
||||
enableIPv6: false,
|
||||
bandwidth20: false,
|
||||
tx_power: 0,
|
||||
nosleep: false,
|
||||
@@ -290,18 +289,6 @@ const NetworkSettings: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
)}
|
||||
{data.enableIPv6 !== undefined && (
|
||||
<BlockFormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
name="enableIPv6"
|
||||
checked={data.enableIPv6}
|
||||
onChange={updateFormValue}
|
||||
/>
|
||||
}
|
||||
label={LL.NETWORK_ENABLE_IPV6()}
|
||||
/>
|
||||
)}
|
||||
<BlockFormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
|
||||
@@ -278,7 +278,6 @@ const de: Translation = {
|
||||
NETWORK_USE_DNS: 'Aktiviere mDNS Service',
|
||||
NETWORK_ENABLE_CORS: 'Aktiviere CORS',
|
||||
NETWORK_CORS_ORIGIN: 'CORS origin',
|
||||
NETWORK_ENABLE_IPV6: 'Aktiviere IPv6 Unterstützung',
|
||||
NETWORK_FIXED_IP: 'Feste IP Adresse',
|
||||
NETWORK_GATEWAY: 'Gateway',
|
||||
NETWORK_SUBNET: 'Subnetz Maske',
|
||||
|
||||
@@ -278,7 +278,6 @@ const en: Translation = {
|
||||
NETWORK_USE_DNS: 'Enable mDNS Service',
|
||||
NETWORK_ENABLE_CORS: 'Enable CORS',
|
||||
NETWORK_CORS_ORIGIN: 'CORS origin',
|
||||
NETWORK_ENABLE_IPV6: 'Enable IPv6 support',
|
||||
NETWORK_FIXED_IP: 'Use Fixed IP address',
|
||||
NETWORK_GATEWAY: 'Gateway',
|
||||
NETWORK_SUBNET: 'Subnet Mask',
|
||||
|
||||
@@ -278,7 +278,6 @@ const fr: Translation = {
|
||||
NETWORK_USE_DNS: 'Activer le service mDNS',
|
||||
NETWORK_ENABLE_CORS: 'Activer CORS',
|
||||
NETWORK_CORS_ORIGIN: 'Origine CORS',
|
||||
NETWORK_ENABLE_IPV6: "Activer le support de l'IPv6",
|
||||
NETWORK_FIXED_IP: 'Utiliser une adresse IP fixe',
|
||||
NETWORK_GATEWAY: 'Passerelle',
|
||||
NETWORK_SUBNET: 'Masque de sous-réseau',
|
||||
|
||||
@@ -278,7 +278,6 @@ const it: Translation = {
|
||||
NETWORK_USE_DNS: 'Abilita servizio mDNS',
|
||||
NETWORK_ENABLE_CORS: 'Abilita CORS',
|
||||
NETWORK_CORS_ORIGIN: 'origine CORS',
|
||||
NETWORK_ENABLE_IPV6: 'Abilita supporto IPv6',
|
||||
NETWORK_FIXED_IP: 'Usa indirizzo IP fisso',
|
||||
NETWORK_GATEWAY: 'Gateway',
|
||||
NETWORK_SUBNET: 'Maschera Sottorete',
|
||||
|
||||
@@ -278,7 +278,6 @@ const nl: Translation = {
|
||||
NETWORK_USE_DNS: 'Activeer mDNS Service',
|
||||
NETWORK_ENABLE_CORS: 'Activeer CORS',
|
||||
NETWORK_CORS_ORIGIN: 'CORS origin',
|
||||
NETWORK_ENABLE_IPV6: 'Activeer IPv6 support',
|
||||
NETWORK_FIXED_IP: 'Gebruik vast IP addres',
|
||||
NETWORK_GATEWAY: 'Gateway',
|
||||
NETWORK_SUBNET: 'Subnetmasker',
|
||||
|
||||
@@ -278,7 +278,6 @@ const no: Translation = {
|
||||
NETWORK_USE_DNS: 'Aktiviser mDNS Service',
|
||||
NETWORK_ENABLE_CORS: 'Aktiviser CORS',
|
||||
NETWORK_CORS_ORIGIN: 'CORS origin',
|
||||
NETWORK_ENABLE_IPV6: 'Aktiviser IPv6 støtte',
|
||||
NETWORK_FIXED_IP: 'Benytt statisk IP adresse',
|
||||
NETWORK_GATEWAY: 'Gateway',
|
||||
NETWORK_SUBNET: 'Nettverksmaske',
|
||||
|
||||
@@ -278,7 +278,6 @@ const pl: BaseTranslation = {
|
||||
NETWORK_USE_DNS: 'Włącz wsparcie dla mDNS',
|
||||
NETWORK_ENABLE_CORS: 'Włącz wsparcie dla CORS',
|
||||
NETWORK_CORS_ORIGIN: 'CORS Origin',
|
||||
NETWORK_ENABLE_IPV6: 'Włącz wsparcie dla IPv6',
|
||||
NETWORK_FIXED_IP: 'Użyj stałego adresu IP',
|
||||
NETWORK_GATEWAY: 'Brama',
|
||||
NETWORK_SUBNET: 'Maska podsieci',
|
||||
|
||||
@@ -278,7 +278,6 @@ const sk: Translation = {
|
||||
NETWORK_USE_DNS: 'Povoliť mDNS službu',
|
||||
NETWORK_ENABLE_CORS: 'Povoliť CORS',
|
||||
NETWORK_CORS_ORIGIN: 'CORS origin',
|
||||
NETWORK_ENABLE_IPV6: 'Povoliť podporu IPv6',
|
||||
NETWORK_FIXED_IP: 'Použiť fixnú IP adresu',
|
||||
NETWORK_GATEWAY: 'Brána',
|
||||
NETWORK_SUBNET: 'Maska podsiete',
|
||||
|
||||
@@ -278,7 +278,6 @@ const sv: Translation = {
|
||||
NETWORK_USE_DNS: 'Aktivera mDNS-tjänsten',
|
||||
NETWORK_ENABLE_CORS: 'Aktivera CORS',
|
||||
NETWORK_CORS_ORIGIN: 'CORS origin',
|
||||
NETWORK_ENABLE_IPV6: 'Aktivera IPv6-support',
|
||||
NETWORK_FIXED_IP: 'Använd statiskt IP',
|
||||
NETWORK_GATEWAY: 'Gateway',
|
||||
NETWORK_SUBNET: 'Subnätmask',
|
||||
|
||||
@@ -278,7 +278,6 @@ const tr: Translation = {
|
||||
NETWORK_USE_DNS: 'mDNS Servisini deveye al',
|
||||
NETWORK_ENABLE_CORS: 'CORS u devreye al',
|
||||
NETWORK_CORS_ORIGIN: 'CORS kaynağı',
|
||||
NETWORK_ENABLE_IPV6: 'IPv6 desteğini devreye al',
|
||||
NETWORK_FIXED_IP: 'Sabit IP adresi kullan',
|
||||
NETWORK_GATEWAY: 'Aü geçidi',
|
||||
NETWORK_SUBNET: 'Ağ Alt Maskesi',
|
||||
|
||||
@@ -42,7 +42,6 @@ export interface NetworkSettingsType {
|
||||
password: string;
|
||||
hostname: string;
|
||||
static_ip_config: boolean;
|
||||
enableIPv6?: boolean;
|
||||
bandwidth20: boolean;
|
||||
nosleep: boolean;
|
||||
tx_power: number;
|
||||
|
||||
@@ -1644,12 +1644,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:^20.12.8":
|
||||
version: 20.12.8
|
||||
resolution: "@types/node@npm:20.12.8"
|
||||
"@types/node@npm:^20.12.10":
|
||||
version: 20.12.10
|
||||
resolution: "@types/node@npm:20.12.10"
|
||||
dependencies:
|
||||
undici-types: "npm:~5.26.4"
|
||||
checksum: 10c0/840002d20654e38a9af8cdffa215598fdb28ac4f96c5701ed672ec365ed6ccc66da299edddaa409baf13cd71bbf1128901f633b5e44e070fc236e26415805b78
|
||||
checksum: 10c0/2cc3b6ea09894ed1a3cf39f6491ec539281580f4ff83216e7d26ce85c83237fe0543c0ca49e25b2515ccdb6c8814b488d17a64a05f536dcaea94f9d32a60c7d7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1882,7 +1882,7 @@ __metadata:
|
||||
"@trivago/prettier-plugin-sort-imports": "npm:^4.3.0"
|
||||
"@types/babel__core": "npm:^7"
|
||||
"@types/lodash-es": "npm:^4.17.12"
|
||||
"@types/node": "npm:^20.12.8"
|
||||
"@types/node": "npm:^20.12.10"
|
||||
"@types/react": "npm:^18.3.1"
|
||||
"@types/react-dom": "npm:^18.3.0"
|
||||
"@types/react-router-dom": "npm:^5.3.3"
|
||||
@@ -1900,7 +1900,7 @@ __metadata:
|
||||
react: "npm:latest"
|
||||
react-dom: "npm:latest"
|
||||
react-dropzone: "npm:^14.2.3"
|
||||
react-icons: "npm:^5.2.0"
|
||||
react-icons: "npm:^5.2.1"
|
||||
react-router-dom: "npm:^6.23.0"
|
||||
react-toastify: "npm:^10.0.5"
|
||||
rollup-plugin-visualizer: "npm:^5.12.0"
|
||||
@@ -5966,12 +5966,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-icons@npm:^5.2.0":
|
||||
version: 5.2.0
|
||||
resolution: "react-icons@npm:5.2.0"
|
||||
"react-icons@npm:^5.2.1":
|
||||
version: 5.2.1
|
||||
resolution: "react-icons@npm:5.2.1"
|
||||
peerDependencies:
|
||||
react: "*"
|
||||
checksum: 10c0/bd9176b1aa6ddaa99b2abea2cecb523443b39a470912725e12da0b478697312fdefb55daaee921cf28bd9d76f580f0fa879d127c8f63fa1ca4516d44817eb6f4
|
||||
checksum: 10c0/9d52b975afaf27dab07dcaefd50497ba43cc57076fc26ccac5142965e01c7fd0c503a62ea31c3bb710e0b2959a4620c2fed12c3c86960ad8ceb63de7f0085f3a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ void NetworkSettingsService::manageSTA() {
|
||||
if (WiFi.isConnected() || _state.ssid.length() == 0) {
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5
|
||||
if (_state.ssid.length() == 0) {
|
||||
ETH.enableIPv6(_state.enableIPv6);
|
||||
ETH.enableIPv6(true);
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
@@ -76,7 +76,7 @@ void NetworkSettingsService::manageSTA() {
|
||||
// Connect or reconnect as required
|
||||
if ((WiFi.getMode() & WIFI_STA) == 0) {
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5
|
||||
WiFi.enableIPv6(_state.enableIPv6);
|
||||
WiFi.enableIPv6(true);
|
||||
#endif
|
||||
if (_state.staticIPConfig) {
|
||||
WiFi.config(_state.localIP, _state.gatewayIP, _state.subnetMask, _state.dnsIP1, _state.dnsIP2); // configure for static IP
|
||||
@@ -358,17 +358,13 @@ void NetworkSettingsService::WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info)
|
||||
setWiFiPowerOnRSSI();
|
||||
}
|
||||
#if ESP_IDF_VERSION_MAJOR < 5
|
||||
if (_state.enableIPv6) {
|
||||
WiFi.enableIpV6();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case ARDUINO_EVENT_ETH_CONNECTED:
|
||||
#if ESP_IDF_VERSION_MAJOR < 5
|
||||
if (_state.enableIPv6) {
|
||||
ETH.enableIpV6();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -406,9 +402,6 @@ void NetworkSettings::read(NetworkSettings & settings, JsonObject root) {
|
||||
root["enableCORS"] = settings.enableCORS;
|
||||
root["CORSOrigin"] = settings.CORSOrigin;
|
||||
root["tx_power"] = settings.tx_power;
|
||||
#ifndef TASMOTA_SDK
|
||||
root["enableIPv6"] = settings.enableIPv6;
|
||||
#endif
|
||||
|
||||
// extended settings
|
||||
JsonUtils::writeIP(root, "local_ip", settings.localIP);
|
||||
@@ -436,11 +429,6 @@ StateUpdateResult NetworkSettings::update(JsonObject root, NetworkSettings & set
|
||||
settings.enableMDNS = root["enableMDNS"] | true;
|
||||
settings.enableCORS = root["enableCORS"] | false;
|
||||
settings.CORSOrigin = root["CORSOrigin"] | "*";
|
||||
#ifdef TASMOTA_SDK
|
||||
settings.enableIPv6 = true;
|
||||
#else
|
||||
settings.enableIPv6 = root["enableIPv6"] | false;
|
||||
#endif
|
||||
// extended settings
|
||||
JsonUtils::readIP(root, "local_ip", settings.localIP);
|
||||
JsonUtils::readIP(root, "gateway_ip", settings.gatewayIP);
|
||||
|
||||
@@ -69,7 +69,6 @@ class NetworkSettings {
|
||||
String password;
|
||||
String hostname;
|
||||
bool staticIPConfig;
|
||||
bool enableIPv6;
|
||||
bool bandwidth20;
|
||||
uint8_t tx_power;
|
||||
bool nosleep;
|
||||
|
||||
@@ -67,7 +67,6 @@ class DummySettings {
|
||||
bool staticIPConfig = false;
|
||||
String dnsIP1 = "";
|
||||
String dnsIP2 = "";
|
||||
bool enableIPv6 = false;
|
||||
bool enableMDNS = true;
|
||||
bool enableCORS = false;
|
||||
String CORSOrigin = "*";
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.1.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.2.1.cjs
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"itty-router": "^5.0.17",
|
||||
"multer": "^1.4.5-lts.1"
|
||||
},
|
||||
"packageManager": "yarn@4.1.1",
|
||||
"packageManager": "yarn@4.2.1",
|
||||
"devDependencies": {
|
||||
"@types/multer": "^1.4.11"
|
||||
}
|
||||
|
||||
@@ -209,7 +209,6 @@ let network_settings = {
|
||||
enableMDNS: true,
|
||||
enableCORS: false,
|
||||
CORSOrigin: '*',
|
||||
enableIPv6: false,
|
||||
local_ip: '',
|
||||
gateway_ip: '',
|
||||
subnet_mask: '',
|
||||
|
||||
@@ -803,7 +803,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
||||
DeviceValueUOM::NONE,
|
||||
MAKE_CF_CB(set_hpPumpMode));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &fan_, DeviceValueType::UINT8, FL_(hpFan), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_fan), 20, 100);
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpshutdown_, DeviceValueType::BOOL, FL_(hpShutdown), DeviceValueUOM::NONE, MAKE_CF_CB(set_shutdown));
|
||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &hpshutdown_, DeviceValueType::CMD, FL_(enum_modetype5), FL_(hpShutdown), DeviceValueUOM::NONE, MAKE_CF_CB(set_shutdown));
|
||||
// heatpump DHW settings
|
||||
register_device_value(DeviceValueTAG::TAG_DHW1,
|
||||
&wwAlternatingOper_,
|
||||
|
||||
@@ -1744,7 +1744,8 @@ bool EMSdevice::generate_values(JsonObject output, const int8_t tag_filter, cons
|
||||
// create the Home Assistant configs for each device value / entity
|
||||
// this is called when an MQTT publish is done via an EMS Device in emsesp.cpp::publish_device_values()
|
||||
void EMSdevice::mqtt_ha_entity_config_create() {
|
||||
bool create_device_config = !ha_config_done(); // do we need to create the main Discovery device config with this entity?
|
||||
bool create_device_config = !ha_config_done(); // do we need to create the main Discovery device config with this entity?
|
||||
uint16_t count = 0;
|
||||
|
||||
// check the state of each of the device values
|
||||
// create climate if roomtemp is visible
|
||||
@@ -1755,12 +1756,14 @@ void EMSdevice::mqtt_ha_entity_config_create() {
|
||||
if (Mqtt::publish_ha_climate_config(dv.tag, true, false, dv.min, dv.max)) { // roomTemp
|
||||
dv.remove_state(DeviceValueState::DV_HA_CLIMATE_NO_RT);
|
||||
dv.add_state(DeviceValueState::DV_HA_CONFIG_CREATED);
|
||||
count++;
|
||||
}
|
||||
} else if (*(int8_t *)(dv.value_p) == 0
|
||||
&& (!dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED) || !dv.has_state(DeviceValueState::DV_HA_CLIMATE_NO_RT))) {
|
||||
if (Mqtt::publish_ha_climate_config(dv.tag, false, false, dv.min, dv.max)) { // no roomTemp
|
||||
dv.add_state(DeviceValueState::DV_HA_CLIMATE_NO_RT);
|
||||
dv.add_state(DeviceValueState::DV_HA_CONFIG_CREATED);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1771,16 +1774,21 @@ void EMSdevice::mqtt_ha_entity_config_create() {
|
||||
if (Mqtt::publish_ha_sensor_config(dv, name(), brand_to_char(), false, create_device_config)) {
|
||||
dv.add_state(DeviceValueState::DV_HA_CONFIG_CREATED);
|
||||
create_device_config = false; // only create the main config once
|
||||
count++;
|
||||
}
|
||||
#ifndef EMSESP_STANDALONE
|
||||
// always create minimum one config
|
||||
if (ESP.getMaxAllocHeap() < (6 * 1024) || (!EMSESP::system_.PSram() && ESP.getFreeHeap() < (65 * 1024))) {
|
||||
if (count && (heap_caps_get_free_size(MALLOC_CAP_8BIT) < 65 * 1024)) { // checks free Heap+PSRAM
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef EMSESP_DEBUG
|
||||
if (count) {
|
||||
EMSESP::logger().debug("Created %d HA-%s-configs", count, device_type_name());
|
||||
}
|
||||
#endif
|
||||
ha_config_done(!create_device_config);
|
||||
}
|
||||
|
||||
|
||||
@@ -1315,7 +1315,6 @@ bool System::command_info(const char * value, const int8_t id, JsonObject output
|
||||
}
|
||||
node["TxPower setting"] = settings.tx_power;
|
||||
node["static ip config"] = settings.staticIPConfig;
|
||||
node["enable IPv6"] = settings.enableIPv6;
|
||||
node["low bandwidth"] = settings.bandwidth20;
|
||||
node["disable sleep"] = settings.nosleep;
|
||||
node["enable MDNS"] = settings.enableMDNS;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"password": "fake",
|
||||
"hostname": "ems-esp",
|
||||
"static_ip_config": false,
|
||||
"enableIPv6": false,
|
||||
"bandwidth20": false,
|
||||
"tx_power": 0,
|
||||
"nosleep": false,
|
||||
|
||||
Reference in New Issue
Block a user