mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
tidied up commands info, values etc
This commit is contained in:
@@ -744,7 +744,11 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
|||||||
shell.printfln("Testing device value rendering");
|
shell.printfln("Testing device value rendering");
|
||||||
|
|
||||||
Mqtt::ha_enabled(true);
|
Mqtt::ha_enabled(true);
|
||||||
|
// Mqtt::ha_enabled(false);
|
||||||
|
|
||||||
Mqtt::nested_format(1);
|
Mqtt::nested_format(1);
|
||||||
|
// Mqtt::nested_format(0);
|
||||||
|
|
||||||
// Mqtt::send_response(false);
|
// Mqtt::send_response(false);
|
||||||
|
|
||||||
test("boiler");
|
test("boiler");
|
||||||
@@ -759,13 +763,17 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
|||||||
shell.printfln("Testing adding Temperature sensor");
|
shell.printfln("Testing adding Temperature sensor");
|
||||||
shell.invoke_command("show commands");
|
shell.invoke_command("show commands");
|
||||||
|
|
||||||
|
// load some EMS data
|
||||||
|
// test("general");
|
||||||
|
|
||||||
emsesp::EMSESP::temperaturesensor_.test();
|
emsesp::EMSESP::temperaturesensor_.test();
|
||||||
|
|
||||||
shell.invoke_command("call temperaturesensor");
|
shell.invoke_command("call temperaturesensor");
|
||||||
shell.invoke_command("show values");
|
shell.invoke_command("show values");
|
||||||
shell.invoke_command("call system allvalues");
|
shell.invoke_command("call system allvalues");
|
||||||
|
|
||||||
shell.invoke_command("call temperaturesensor info");
|
shell.invoke_command("call temperaturesensor info");
|
||||||
|
shell.invoke_command("call temperaturesensor values");
|
||||||
|
|
||||||
AsyncWebServerRequest request;
|
AsyncWebServerRequest request;
|
||||||
request.method(HTTP_GET);
|
request.method(HTTP_GET);
|
||||||
request.url("/api/temperaturesensor/commands");
|
request.url("/api/temperaturesensor/commands");
|
||||||
@@ -799,18 +807,33 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
|
|||||||
shell.printfln("Testing adding Analog sensor");
|
shell.printfln("Testing adding Analog sensor");
|
||||||
Mqtt::ha_enabled(true);
|
Mqtt::ha_enabled(true);
|
||||||
// Mqtt::ha_enabled(false);
|
// Mqtt::ha_enabled(false);
|
||||||
|
|
||||||
Mqtt::nested_format(1);
|
Mqtt::nested_format(1);
|
||||||
// Mqtt::nested_format(0);
|
// Mqtt::nested_format(0);
|
||||||
|
|
||||||
|
// Mqtt::send_response(false);
|
||||||
|
|
||||||
// load some EMS data
|
// load some EMS data
|
||||||
test("general");
|
test("general");
|
||||||
|
|
||||||
EMSESP::webCustomizationService.test(); // load the analog sensors
|
EMSESP::webCustomizationService.test(); // load the analog sensors
|
||||||
|
|
||||||
|
shell.invoke_command("call analogsensor");
|
||||||
shell.invoke_command("show values");
|
shell.invoke_command("show values");
|
||||||
|
shell.invoke_command("call system allvalues");
|
||||||
shell.invoke_command("call analogsensor info");
|
shell.invoke_command("call analogsensor info");
|
||||||
shell.invoke_command("call analogsensor values");
|
shell.invoke_command("call analogsensor values");
|
||||||
|
|
||||||
|
AsyncWebServerRequest request;
|
||||||
|
request.method(HTTP_GET);
|
||||||
|
request.url("/api/analogsensor/commands");
|
||||||
|
EMSESP::webAPIService.webAPIService_get(&request);
|
||||||
|
request.url("/api/analogsensor/info");
|
||||||
|
EMSESP::webAPIService.webAPIService_get(&request);
|
||||||
|
request.url("/api/analogsensor/test_analog1");
|
||||||
|
request.url("/api/analogsensor/36");
|
||||||
|
EMSESP::webAPIService.webAPIService_get(&request);
|
||||||
|
|
||||||
// test renaming it
|
// test renaming it
|
||||||
// bool update(uint8_t id, const std::string & name, int16_t offset, float factor, uint8_t uom, uint8_t type);
|
// bool update(uint8_t id, const std::string & name, int16_t offset, float factor, uint8_t uom, uint8_t type);
|
||||||
// EMSESP::analogsensor_.update(36, "test_analog1_new", 2, 0.7, 17, 1);
|
// EMSESP::analogsensor_.update(36, "test_analog1_new", 2, 0.7, 17, 1);
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ namespace emsesp {
|
|||||||
// #define EMSESP_DEBUG_DEFAULT "dv"
|
// #define EMSESP_DEBUG_DEFAULT "dv"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "lastcode"
|
// #define EMSESP_DEBUG_DEFAULT "lastcode"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "2thermostats"
|
// #define EMSESP_DEBUG_DEFAULT "2thermostats"
|
||||||
#define EMSESP_DEBUG_DEFAULT "temperature"
|
// #define EMSESP_DEBUG_DEFAULT "temperature"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "analog"
|
#define EMSESP_DEBUG_DEFAULT "analog"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "api_values"
|
// #define EMSESP_DEBUG_DEFAULT "api_values"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "mqtt_post"
|
// #define EMSESP_DEBUG_DEFAULT "mqtt_post"
|
||||||
// #define EMSESP_DEBUG_DEFAULT "api_wwmode"
|
// #define EMSESP_DEBUG_DEFAULT "api_wwmode"
|
||||||
|
|||||||
Reference in New Issue
Block a user