mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
added 'autodetect quick' option
This commit is contained in:
@@ -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/),
|
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).
|
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
|
### Added
|
||||||
|
|
||||||
- Support for multiple Heating Circuits - https://github.com/proddy/EMS-ESP/issues/162
|
- 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
|
- 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
|
- Optimized event log loading in web and added integrity checks on all config and log files during boot
|
||||||
|
- `autodetect quick`
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ static const command_t project_cmds[] PROGMEM = {
|
|||||||
{false, "refresh", "fetch values from the EMS devices"},
|
{false, "refresh", "fetch values from the EMS devices"},
|
||||||
{false, "devices [all]", "list all supported and detected EMS devices"},
|
{false, "devices [all]", "list all supported and detected EMS devices"},
|
||||||
{false, "queue", "show current Tx queue"},
|
{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, "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, "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"},
|
{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();
|
char * second_cmd = _readWord();
|
||||||
if (strcmp(second_cmd, "deep") == 0) {
|
if (strcmp(second_cmd, "deep") == 0) {
|
||||||
startDeviceScan();
|
startDeviceScan();
|
||||||
ok = true;
|
} else if (strcmp(second_cmd, "quick") == 0) {
|
||||||
|
ems_clearDeviceList();
|
||||||
|
ems_doReadCommand(EMS_TYPE_UBADevices, EMS_Boiler.device_id);
|
||||||
|
} else {
|
||||||
|
ems_scanDevices();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
ems_scanDevices();
|
|
||||||
ok = true;
|
ok = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
12
src/ems.cpp
12
src/ems.cpp
@@ -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_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)
|
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
|
// init stats and counters and buffers
|
||||||
void ems_init() {
|
void ems_init() {
|
||||||
// init the device map
|
ems_clearDeviceList(); // init the device map
|
||||||
for (uint8_t i = 0; i < EMS_SYS_DEVICEMAP_LENGTH; i++) {
|
|
||||||
EMS_Sys_Status.emsDeviceMap[i] = 0x00;
|
|
||||||
}
|
|
||||||
|
|
||||||
// overall status
|
// overall status
|
||||||
EMS_Sys_Status.emsRxPgks = 0;
|
EMS_Sys_Status.emsRxPgks = 0;
|
||||||
@@ -1844,6 +1842,10 @@ void _process_RCTime(_EMS_RxTelegram * EMS_RxTelegram) {
|
|||||||
*/
|
*/
|
||||||
void ems_clearDeviceList() {
|
void ems_clearDeviceList() {
|
||||||
Devices.clear();
|
Devices.clear();
|
||||||
|
|
||||||
|
for (uint8_t i = 0; i < EMS_SYS_DEVICEMAP_LENGTH; i++) {
|
||||||
|
EMS_Sys_Status.emsDeviceMap[i] = 0x00;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1856,7 +1858,7 @@ void _addDevice(uint8_t model_type, uint8_t src, uint8_t product_id, char * vers
|
|||||||
// check for duplicates
|
// check for duplicates
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (std::list<_Generic_Device>::iterator it = Devices.begin(); it != Devices.end(); ++it) {
|
for (std::list<_Generic_Device>::iterator it = Devices.begin(); it != Devices.end(); ++it) {
|
||||||
if (((it)->product_id == product_id) && ((it)->device_id == src) ) {
|
if (((it)->product_id == product_id) && ((it)->device_id == src)) {
|
||||||
found = true; // it already exists in the list
|
found = true; // it already exists in the list
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,8 +268,8 @@ typedef struct {
|
|||||||
uint8_t model_id;
|
uint8_t model_id;
|
||||||
uint8_t product_id;
|
uint8_t product_id;
|
||||||
uint8_t device_id;
|
uint8_t device_id;
|
||||||
char model_string[50];
|
char model_string[50];
|
||||||
bool write_supported;
|
bool write_supported;
|
||||||
} _Thermostat_Device;
|
} _Thermostat_Device;
|
||||||
|
|
||||||
// for consolidating all types
|
// for consolidating all types
|
||||||
|
|||||||
Reference in New Issue
Block a user