add test for #865

This commit is contained in:
proddy
2022-12-30 18:43:51 +01:00
parent 2db99a3e32
commit 8fa74c63c9
2 changed files with 18 additions and 2 deletions

View File

@@ -153,6 +153,8 @@ bool Test::run_test(const char * command, int8_t id) {
// HC1 on 0x20 // HC1 on 0x20
uart_telegram({0xA0, 00, 0xFF, 00, 01, 0xD7, 00, 00, 00, 0x80, 00, 00, 00, 00, 03, 0xC5}); uart_telegram({0xA0, 00, 0xFF, 00, 01, 0xD7, 00, 00, 00, 0x80, 00, 00, 00, 00, 03, 0xC5});
// TODO
return true; return true;
} }
@@ -1549,6 +1551,20 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
shell.invoke_command("call mixer info"); shell.invoke_command("call mixer info");
shell.invoke_command("call system publish"); shell.invoke_command("call system publish");
shell.invoke_command("show mqtt"); shell.invoke_command("show mqtt");
// shell.invoke_command("call mixer wwc1 info");
// shell.invoke_command("call mixer wwc2 info");
// test API
#if defined(EMSESP_STANDALONE)
AsyncWebServerRequest request;
request.url("/api/mixer");
EMSESP::webAPIService.webAPIService_get(&request);
request.url("/api/mixer/hc1/pumpstatus");
EMSESP::webAPIService.webAPIService_get(&request);
request.url("/api/mixer/wwc2/pumpstatus");
EMSESP::webAPIService.webAPIService_get(&request);
#endif
} }
if (command == "crash") { if (command == "crash") {

View File

@@ -28,7 +28,7 @@ namespace emsesp {
// #define EMSESP_DEBUG_DEFAULT "thermostat" // #define EMSESP_DEBUG_DEFAULT "thermostat"
// #define EMSESP_DEBUG_DEFAULT "solar" // #define EMSESP_DEBUG_DEFAULT "solar"
// #define EMSESP_DEBUG_DEFAULT "mixer" #define EMSESP_DEBUG_DEFAULT "mixer"
// #define EMSESP_DEBUG_DEFAULT "web" // #define EMSESP_DEBUG_DEFAULT "web"
// #define EMSESP_DEBUG_DEFAULT "mqtt" // #define EMSESP_DEBUG_DEFAULT "mqtt"
// #define EMSESP_DEBUG_DEFAULT "general" // #define EMSESP_DEBUG_DEFAULT "general"
@@ -52,7 +52,7 @@ namespace emsesp {
// #define EMSESP_DEBUG_DEFAULT "mqtt_post" // #define EMSESP_DEBUG_DEFAULT "mqtt_post"
// #define EMSESP_DEBUG_DEFAULT "api_wwmode" // #define EMSESP_DEBUG_DEFAULT "api_wwmode"
// #define EMSESP_DEBUG_DEFAULT "custom" // #define EMSESP_DEBUG_DEFAULT "custom"
#define EMSESP_DEBUG_DEFAULT "dump" // #define EMSESP_DEBUG_DEFAULT "dump"
class Test { class Test {
public: public: