mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Update to Tasmota Core 2.0.6
This commit is contained in:
parent
87768f3040
commit
60088f7a77
@ -67,6 +67,8 @@ void dispatch_state_subtopic(const char* subtopic, const char* payload)
|
|||||||
case MQTT_ERR_NO_CONN:
|
case MQTT_ERR_NO_CONN:
|
||||||
LOG_ERROR(TAG_MQTT, F(D_MQTT_NOT_CONNECTED " %s => %s"), subtopic, payload);
|
LOG_ERROR(TAG_MQTT, F(D_MQTT_NOT_CONNECTED " %s => %s"), subtopic, payload);
|
||||||
break;
|
break;
|
||||||
|
case MQTT_ERR_DISABLED:
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_ERROR(TAG_MQTT, F(D_ERROR_UNKNOWN " %s => %s"), subtopic, payload);
|
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)
|
bool dispatch_json_variant(JsonVariant& json, uint8_t& savedPage, uint8_t source)
|
||||||
{
|
{
|
||||||
if(json.is<JsonArray>()) { // handle json as an array of commands
|
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>()) {
|
for(JsonVariant command : json.as<JsonArray>()) {
|
||||||
dispatch_json_variant(command, savedPage, source);
|
dispatch_json_variant(command, savedPage, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if(json.is<JsonObject>()) { // handle json as a jsonl
|
} 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);
|
hasp_new_object(json.as<JsonObject>(), savedPage);
|
||||||
|
|
||||||
} else if(json.is<std::string>()) { // handle json as a single command
|
} 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);
|
dispatch_simple_text_command(json.as<std::string>().c_str(), source);
|
||||||
|
|
||||||
} else if(json.is<const char*>()) { // handle json as a single command
|
} 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);
|
dispatch_simple_text_command(json.as<const char*>(), source);
|
||||||
|
|
||||||
|
} else if(json.isNull()) { // event handler not found
|
||||||
|
// nothing to do
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
LOG_WARNING(TAG_MSGR, "TEXT = unknown type");
|
LOG_WARNING(TAG_MSGR, "Json has unknown type");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -134,8 +134,8 @@ lib_deps =
|
|||||||
[arduino_esp32_v2]
|
[arduino_esp32_v2]
|
||||||
extends = esp32
|
extends = esp32
|
||||||
framework = arduino
|
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/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/Jason2866/platform-espressif32/releases/download/2022.12.2/platform-espressif32.zip
|
||||||
;platform = espressif32
|
;platform = espressif32
|
||||||
|
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
|
@ -74,8 +74,8 @@ fspi =
|
|||||||
[arduino_esp32s2_v2]
|
[arduino_esp32s2_v2]
|
||||||
extends = esp32s2
|
extends = esp32s2
|
||||||
framework = arduino
|
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/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/Jason2866/platform-espressif32/releases/download/2022.12.2/platform-espressif32.zip
|
||||||
;platform = espressif32
|
;platform = espressif32
|
||||||
|
|
||||||
; =========================== SOLO ==============================================
|
; =========================== SOLO ==============================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user