mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
Merge branch 'dev' into dev2
This commit is contained in:
@@ -179,8 +179,9 @@
|
||||
|
||||
// Gateways - 0x48
|
||||
{189, DeviceType::GATEWAY, "KM200/MB LAN 2", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||
{252, DeviceType::GATEWAY, "MX300", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||
|
||||
// Generic - 0x40 or other with no product-id and no version
|
||||
{0, DeviceType::GENERIC, "unknown", DeviceFlags::EMS_DEVICE_FLAG_NONE}
|
||||
|
||||
// clang-format on
|
||||
// clang-format on
|
||||
|
||||
@@ -742,6 +742,7 @@ std::string EMSESP::pretty_telegram(std::shared_ptr<const Telegram> telegram) {
|
||||
}
|
||||
}
|
||||
if (type_name.empty()) {
|
||||
// fallback, get the type name from src
|
||||
for (const auto & emsdevice : emsdevices) {
|
||||
if (telegram->operation != Telegram::Operation::RX_READ && emsdevice->is_device_id(src)) {
|
||||
type_name = emsdevice->telegram_type_name(telegram);
|
||||
@@ -931,6 +932,7 @@ bool EMSESP::process_telegram(std::shared_ptr<const Telegram> telegram) {
|
||||
// after the telegram has been processed, see if there have been values changed and we need to do a MQTT publish
|
||||
bool telegram_found = false;
|
||||
uint8_t device_found = 0;
|
||||
// broadcast or send to us
|
||||
for (const auto & emsdevice : emsdevices) {
|
||||
if (emsdevice->is_device_id(telegram->src) && (telegram->dest == 0 || telegram->dest == EMSbus::ems_bus_id())) {
|
||||
telegram_found = emsdevice->handle_telegram(telegram);
|
||||
|
||||
Reference in New Issue
Block a user