mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
Merge branch 'dev' into dev2
This commit is contained in:
@@ -179,6 +179,7 @@
|
|||||||
|
|
||||||
// Gateways - 0x48
|
// Gateways - 0x48
|
||||||
{189, DeviceType::GATEWAY, "KM200/MB LAN 2", DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
{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
|
// Generic - 0x40 or other with no product-id and no version
|
||||||
{0, DeviceType::GENERIC, "unknown", DeviceFlags::EMS_DEVICE_FLAG_NONE}
|
{0, DeviceType::GENERIC, "unknown", DeviceFlags::EMS_DEVICE_FLAG_NONE}
|
||||||
|
|||||||
@@ -742,6 +742,7 @@ std::string EMSESP::pretty_telegram(std::shared_ptr<const Telegram> telegram) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type_name.empty()) {
|
if (type_name.empty()) {
|
||||||
|
// fallback, get the type name from src
|
||||||
for (const auto & emsdevice : emsdevices) {
|
for (const auto & emsdevice : emsdevices) {
|
||||||
if (telegram->operation != Telegram::Operation::RX_READ && emsdevice->is_device_id(src)) {
|
if (telegram->operation != Telegram::Operation::RX_READ && emsdevice->is_device_id(src)) {
|
||||||
type_name = emsdevice->telegram_type_name(telegram);
|
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
|
// 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;
|
bool telegram_found = false;
|
||||||
uint8_t device_found = 0;
|
uint8_t device_found = 0;
|
||||||
|
// broadcast or send to us
|
||||||
for (const auto & emsdevice : emsdevices) {
|
for (const auto & emsdevice : emsdevices) {
|
||||||
if (emsdevice->is_device_id(telegram->src) && (telegram->dest == 0 || telegram->dest == EMSbus::ems_bus_id())) {
|
if (emsdevice->is_device_id(telegram->src) && (telegram->dest == 0 || telegram->dest == EMSbus::ems_bus_id())) {
|
||||||
telegram_found = emsdevice->handle_telegram(telegram);
|
telegram_found = emsdevice->handle_telegram(telegram);
|
||||||
|
|||||||
Reference in New Issue
Block a user