Update to Tasmota Core 2.0.6

This commit is contained in:
fvanroie 2023-02-16 05:11:07 +01:00
parent 87768f3040
commit 60088f7a77
3 changed files with 14 additions and 9 deletions

View File

@ -67,6 +67,8 @@ void dispatch_state_subtopic(const char* subtopic, const char* payload)
case MQTT_ERR_NO_CONN:
LOG_ERROR(TAG_MQTT, F(D_MQTT_NOT_CONNECTED " %s => %s"), subtopic, payload);
break;
case MQTT_ERR_DISABLED:
break;
default:
LOG_ERROR(TAG_MQTT, F(D_ERROR_UNKNOWN " %s => %s"), subtopic, payload);
}
@ -600,25 +602,28 @@ void dispatch_screenshot(const char*, const char* filename, uint8_t source)
bool dispatch_json_variant(JsonVariant& json, uint8_t& savedPage, uint8_t source)
{
if(json.is<JsonArray>()) { // handle json as an array of commands
LOG_WARNING(TAG_MSGR, "TEXT = ARRAY");
LOG_DEBUG(TAG_MSGR, "Json ARRAY");
for(JsonVariant command : json.as<JsonArray>()) {
dispatch_json_variant(command, savedPage, source);
}
} else if(json.is<JsonObject>()) { // handle json as a jsonl
LOG_WARNING(TAG_MSGR, "TEXT = OBJECT");
LOG_DEBUG(TAG_MSGR, "Json OBJECT");
hasp_new_object(json.as<JsonObject>(), savedPage);
} else if(json.is<std::string>()) { // handle json as a single command
LOG_WARNING(TAG_MSGR, "TEXT = %s", json.as<std::string>().c_str());
LOG_DEBUG(TAG_MSGR, "Json text = %s", json.as<std::string>().c_str());
dispatch_simple_text_command(json.as<std::string>().c_str(), source);
} else if(json.is<const char*>()) { // handle json as a single command
LOG_WARNING(TAG_MSGR, "TEXT = %s", json.as<const char*>());
LOG_DEBUG(TAG_MSGR, "Json text = %s", json.as<const char*>());
dispatch_simple_text_command(json.as<const char*>(), source);
} else if(json.isNull()) { // event handler not found
// nothing to do
} else {
LOG_WARNING(TAG_MSGR, "TEXT = unknown type");
LOG_WARNING(TAG_MSGR, "Json has unknown type");
return false;
}
return true;

View File

@ -134,8 +134,8 @@ lib_deps =
[arduino_esp32_v2]
extends = esp32
framework = arduino
platform = https://github.com/tasmota/platform-espressif32/releases/download/v.2.0.5/platform-espressif32-v.2.0.5.zip
;platform = https://github.com/tasmota/platform-espressif32/releases/download/2022.12.2/platform-espressif32.zip
;platform = https://github.com/tasmota/platform-espressif32/releases/download/v.2.0.5/platform-espressif32-v.2.0.5.zip
platform = https://github.com/Jason2866/platform-espressif32/releases/download/2022.12.2/platform-espressif32.zip
;platform = espressif32
lib_ignore =

View File

@ -74,8 +74,8 @@ fspi =
[arduino_esp32s2_v2]
extends = esp32s2
framework = arduino
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.4.1/platform-espressif32-2.0.4.1.zip
;platform = https://github.com/tasmota/platform-espressif32/releases/download/2022.12.2/platform-espressif32.zip
;platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.4.1/platform-espressif32-2.0.4.1.zip
platform = https://github.com/Jason2866/platform-espressif32/releases/download/2022.12.2/platform-espressif32.zip
;platform = espressif32
; =========================== SOLO ==============================================