diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino
index 1a68f7c98..72294645c 100644
--- a/sonoff/_changelog.ino
+++ b/sonoff/_changelog.ino
@@ -4,6 +4,7 @@
* Add support for Chint DDSU666 Modbus energy meter by Pablo Zerón
* Add support for SM2135 as used in Action LSC Smart Led E14 (#6495)
* Add command SetOption72 0/1 to switch between software (0) or hardware (1) energy total counter (#6561)
+ * Add Zigbee tracking of connected devices and auto-probing of Manuf/Model Ids
*
* 6.6.0.14 20190925
* Change command Tariffx to allow time entries like 23 (hours), 1320 (minutes) or 23:00. NOTE: As this is development branch previous tariffs are lost! (#6488)
diff --git a/sonoff/i18n.h b/sonoff/i18n.h
index 089140dd9..0d7cdf0a9 100644
--- a/sonoff/i18n.h
+++ b/sonoff/i18n.h
@@ -458,12 +458,13 @@
// Commands xdrv_23_zigbee.ino
#define D_CMND_ZIGBEE_PERMITJOIN "ZigbeePermitJoin"
-#define D_CMND_ZIGBEE_DUMP "ZigbeeDump"
+#define D_CMND_ZIGBEE_STATUS "ZigbeeStatus"
#define D_CMND_ZIGBEEZNPSEND "ZigbeeZNPSend"
#define D_JSON_ZIGBEE_STATUS "ZigbeeStatus"
#define D_JSON_ZIGBEEZNPRECEIVED "ZigbeeZNPReceived"
#define D_JSON_ZIGBEEZNPSENT "ZigbeeZNPSent"
- #define D_JSON_ZIGBEEZCLRECEIVED "ZigbeeZCLReceived"
+ #define D_JSON_ZIGBEEZCL_RECEIVED "ZigbeeZCLReceived"
+ #define D_JSON_ZIGBEEZCL_RAW_RECEIVED "ZigbeeZCLRawReceived"
#define D_JSON_ZIGBEEZCLSENT "ZigbeeZCLSent"
// Commands xdrv_25_A4988_Stepper.ino
diff --git a/sonoff/xdrv_23_zigbee_0_constants.ino b/sonoff/xdrv_23_zigbee_0_constants.ino
index 651596878..8ff4174eb 100644
--- a/sonoff/xdrv_23_zigbee_0_constants.ino
+++ b/sonoff/xdrv_23_zigbee_0_constants.ino
@@ -422,7 +422,7 @@ enum ZCL_Global_Commands {
};
-enum class ZclGlobalCommandId : uint8_t {
-};
+const uint16_t Z_ProfileIds[] PROGMEM = { 0x0104, 0x0109, 0xA10E, 0xC05E };
+const char Z_ProfileNames[] PROGMEM = "ZigBee Home Automation|ZigBee Smart Energy|ZigBee Green Power|ZigBee Light Link";
#endif // USE_ZIGBEE
diff --git a/sonoff/xdrv_23_zigbee_3_devices.ino b/sonoff/xdrv_23_zigbee_3_devices.ino
new file mode 100644
index 000000000..78339b073
--- /dev/null
+++ b/sonoff/xdrv_23_zigbee_3_devices.ino
@@ -0,0 +1,413 @@
+/*
+ xdrv_23_zigbee.ino - zigbee support for Sonoff-Tasmota
+
+ Copyright (C) 2019 Theo Arends and Stephan Hadinger
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifdef USE_ZIGBEE
+
+#include
+#include