mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
add test for 'send' command
This commit is contained in:
@@ -473,7 +473,7 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd) {
|
|||||||
|
|
||||||
if (command == "mqtt_individual") {
|
if (command == "mqtt_individual") {
|
||||||
shell.printfln(F("Testing individual MQTT"));
|
shell.printfln(F("Testing individual MQTT"));
|
||||||
Mqtt::ha_enabled(false); // turn off HA Discovery to stop the chatter
|
Mqtt::ha_enabled(false); // turn off HA Discovery to stop the chatter
|
||||||
Mqtt::subscribe_format(1); // individual topics
|
Mqtt::subscribe_format(1); // individual topics
|
||||||
|
|
||||||
run_test("boiler");
|
run_test("boiler");
|
||||||
@@ -1030,6 +1030,13 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd) {
|
|||||||
request.url("/api");
|
request.url("/api");
|
||||||
EMSESP::webAPIService.webAPIService_post(&request, json);
|
EMSESP::webAPIService.webAPIService_post(&request, json);
|
||||||
|
|
||||||
|
// 4 - system call
|
||||||
|
char data4[] = "{\"value\":\"0B 88 19 19 02\"}";
|
||||||
|
deserializeJson(doc, data4);
|
||||||
|
json = doc.as<JsonVariant>();
|
||||||
|
request.url("/api/system/send");
|
||||||
|
EMSESP::webAPIService.webAPIService_post(&request, json);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ namespace emsesp {
|
|||||||
// #define EMSESP_DEBUG_DEFAULT "shower_alert"
|
// #define EMSESP_DEBUG_DEFAULT "shower_alert"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "310"
|
// #define EMSESP_DEBUG_DEFAULT "310"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "render"
|
// #define EMSESP_DEBUG_DEFAULT "render"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "api"
|
#define EMSESP_DEBUG_DEFAULT "api"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "crash"
|
// #define EMSESP_DEBUG_DEFAULT "crash"
|
||||||
#define EMSESP_DEBUG_DEFAULT "mqtt_individual"
|
// #define EMSESP_DEBUG_DEFAULT "mqtt_individual"
|
||||||
|
|
||||||
class Test {
|
class Test {
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user