mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
log detection of devcies without values
This commit is contained in:
@@ -1136,6 +1136,9 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const
|
|||||||
|
|
||||||
fetch_device_values(device_id); // go and fetch its data
|
fetch_device_values(device_id); // go and fetch its data
|
||||||
|
|
||||||
|
// Print to LOG showing we've added a new device
|
||||||
|
LOG_INFO(F("Recognized new %s with deviceID 0x%02X"), EMSdevice::device_type_2_device_name(device_type).c_str(), device_id);
|
||||||
|
|
||||||
// add command commands for all devices, except for connect, controller and gateway
|
// add command commands for all devices, except for connect, controller and gateway
|
||||||
if ((device_type == DeviceType::CONNECT) || (device_type == DeviceType::CONTROLLER) || (device_type == DeviceType::GATEWAY)) {
|
if ((device_type == DeviceType::CONNECT) || (device_type == DeviceType::CONTROLLER) || (device_type == DeviceType::GATEWAY)) {
|
||||||
return true;
|
return true;
|
||||||
@@ -1170,9 +1173,6 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const
|
|||||||
// MQTT subscribe to the device e.g. "ems-esp/boiler/#"
|
// MQTT subscribe to the device e.g. "ems-esp/boiler/#"
|
||||||
Mqtt::subscribe(device_type, EMSdevice::device_type_2_device_name(device_type) + "/#", nullptr);
|
Mqtt::subscribe(device_type, EMSdevice::device_type_2_device_name(device_type) + "/#", nullptr);
|
||||||
|
|
||||||
// Print to LOG showing we've added a new device
|
|
||||||
LOG_INFO(F("Recognized new %s with deviceID 0x%02X"), EMSdevice::device_type_2_device_name(device_type).c_str(), device_id);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user