From 5c9285a1963f08304f39ead41880e24bd6515673 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 30 Sep 2019 19:13:58 +0200 Subject: [PATCH] added devices [all] option --- src/ems-esp.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index d72046651..4cebd5c83 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -132,7 +132,7 @@ static const command_t project_cmds[] PROGMEM = { {false, "publish", "publish all values to MQTT"}, {false, "refresh", "fetch values from the EMS devices"}, - {false, "devices", "list all supported and detected EMS devices and types IDs"}, + {false, "devices [all]", "list all supported and detected EMS devices"}, {false, "queue", "show current Tx queue"}, {false, "autodetect [deep]", "detect EMS devices and attempt to automatically set boiler and thermostat types"}, {false, "shower ", "toggle either timer or alert on/off"}, @@ -1439,7 +1439,14 @@ void TelnetCommandCallback(uint8_t wc, const char * commandLine) { } if (strcmp(first_cmd, "devices") == 0) { - ems_printAllDevices(); + if (wc == 2) { + char * second_cmd = _readWord(); + if (strcmp(second_cmd, "all") == 0) { + ems_printAllDevices(); // verbose + } + } else { + ems_printDevices(); + } ok = true; }