added 'autodetect quick' option

This commit is contained in:
Paul
2019-09-30 23:19:21 +02:00
parent a5ceaa0edd
commit 1aace72255
4 changed files with 17 additions and 12 deletions

View File

@@ -5,13 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.9.1 beta] 2019-09-27
## [1.9.1 beta] 2019-09-30
### Added
- Support for multiple Heating Circuits - https://github.com/proddy/EMS-ESP/issues/162
- new `mqttlog` command also shows which MQTT topics it is subscribed too
- Optimized event log loading in web and added integrity checks on all config and log files during boot
- `autodetect quick`
### Fixed

View File

@@ -134,7 +134,7 @@ static const command_t project_cmds[] PROGMEM = {
{false, "refresh", "fetch values from the EMS devices"},
{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, "autodetect [quick | deep]", "detect EMS devices and attempt to automatically set boiler and thermostat types"},
{false, "shower <timer | alert>", "toggle either timer or alert on/off"},
{false, "send XX ...", "send raw telegram data to EMS bus (XX are hex values)"},
{false, "thermostat read <type ID>", "send read request to the thermostat for heating circuit hc 1-4"},
@@ -1460,10 +1460,12 @@ void TelnetCommandCallback(uint8_t wc, const char * commandLine) {
char * second_cmd = _readWord();
if (strcmp(second_cmd, "deep") == 0) {
startDeviceScan();
ok = true;
}
} else if (strcmp(second_cmd, "quick") == 0) {
ems_clearDeviceList();
ems_doReadCommand(EMS_TYPE_UBADevices, EMS_Boiler.device_id);
} else {
ems_scanDevices();
}
ok = true;
}
}

View File

@@ -223,12 +223,10 @@ const uint8_t TX_WRITE_TIMEOUT_COUNT = 2; // 3 retries before timeout
const uint32_t EMS_BUS_TIMEOUT = 15000; // timeout in ms before recognizing the ems bus is offline (15 seconds)
const uint32_t EMS_POLL_TIMEOUT = 5000000; // timeout in microseconds before recognizing the ems bus is offline (5 seconds)
// init stats and counters and buffers
void ems_init() {
// init the device map
for (uint8_t i = 0; i < EMS_SYS_DEVICEMAP_LENGTH; i++) {
EMS_Sys_Status.emsDeviceMap[i] = 0x00;
}
ems_clearDeviceList(); // init the device map
// overall status
EMS_Sys_Status.emsRxPgks = 0;
@@ -1844,6 +1842,10 @@ void _process_RCTime(_EMS_RxTelegram * EMS_RxTelegram) {
*/
void ems_clearDeviceList() {
Devices.clear();
for (uint8_t i = 0; i < EMS_SYS_DEVICEMAP_LENGTH; i++) {
EMS_Sys_Status.emsDeviceMap[i] = 0x00;
}
}
/*