From fc189e13c30b15aa10efbc5fc7878aa113bdb240 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sun, 22 Nov 2020 10:09:24 +0100 Subject: [PATCH] telnet default settings #621 --- CHANGELOG_LATEST.md | 2 ++ lib/uuid-console/src/shell.cpp | 2 +- src/console.cpp | 1 + src/dallassensor.cpp | 2 +- src/emsdevice.cpp | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index dc77f1ee4..eb26bff35 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -27,6 +27,8 @@ - renamed the command system report (Which dumped debug info) to `info` - Changing settings via web restarts only selected services - renamed pio targets (esp8266-ci and esp32-ci for GitHub CI) +- telnet default settings `log info`, timeout 60 min +- `log debug` not showing telegram names, use `log trace` or `watch on` to show the telegrams ### Removed - old shell and python build scripts diff --git a/lib/uuid-console/src/shell.cpp b/lib/uuid-console/src/shell.cpp index c5f2d9ca8..29a97d436 100644 --- a/lib/uuid-console/src/shell.cpp +++ b/lib/uuid-console/src/shell.cpp @@ -61,7 +61,7 @@ void Shell::start() { uuid::log::Logger::register_handler(this, uuid::log::Level::DEBUG); // added by proddy //uuid::log::Logger::register_handler(this, uuid::log::Level::INFO); // added by proddy #else - uuid::log::Logger::register_handler(this, uuid::log::Level::NOTICE); + uuid::log::Logger::register_handler(this, uuid::log::Level::INFO); #endif line_buffer_.reserve(maximum_command_line_length_); diff --git a/src/console.cpp b/src/console.cpp index 5b86d17b1..e1bbd4cc0 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -681,6 +681,7 @@ void Console::start() { // note, this must be started after the network/wifi for ESP32 otherwise it'll crash #ifndef EMSESP_STANDALONE telnet_.start(); + telnet_.initial_idle_timeout(3600); // in sec, one hour idle timeout telnet_.default_write_timeout(1000); // in ms, socket timeout 1 second #endif diff --git a/src/dallassensor.cpp b/src/dallassensor.cpp index d85677b04..741c22101 100644 --- a/src/dallassensor.cpp +++ b/src/dallassensor.cpp @@ -151,11 +151,11 @@ void DallasSensor::loop() { scancnt_ = 0; } else if (scancnt_ == -2) { // startup firstscan_ = sensors_.size(); + LOG_DEBUG(F("First scan found %d dallassensor(s). Adding them."), firstscan_); } else if ((scancnt_ <= 0) && (firstscan_ != sensors_.size())) { // check 2 times for no change of sensor # scancnt_ = -3; sensors_.clear(); // restart scaning and clear to get correct numbering } - // LOG_DEBUG(F("Found %zu sensor(s). Adding them."), sensors_.size()); // uncomment for debug state_ = State::IDLE; } } diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index 091f4c8a6..3c26d3d0e 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -332,7 +332,7 @@ bool EMSdevice::handle_telegram(std::shared_ptr telegram) { return false; } - EMSESP::logger().debug(F("Received %s"), uuid::read_flash_string(tf.telegram_type_name_).c_str()); + // EMSESP::logger().debug(F("Received %s"), uuid::read_flash_string(tf.telegram_type_name_).c_str()); tf.process_function_(telegram); return true; }