1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.5k stars 775 forks source link

Feature Request: Zigbee Support #205

Open jwillmer opened 6 years ago

jwillmer commented 6 years ago

Zigbee is becoming the de facto standard in home automation. It would be great if OpenMQTTGateway could support this protocol. Below I have a write up about the most promising solution at the moment. I think with some work it would be possible to write an interface for the serial communication of the CC253X hardware.

There is a zigbee2mqtt bridge for Raspberry Pi already. It is using zigbee-shepherd that runs on node.js. It all is build around the CC253X USB stick. The cc-znp library offers a firmware for serial communication with the Zigbee chip. A good explanation about the hardware setup can be found zigbee2mqtt wiki.

Additional references:

Hedda commented 2 years ago

FYI, there's now a detailed step-by-step instruction about flashing Tasmota on ZB-GW03 eWeLink Ethernet Zigbee Gateway (wired network bridge) for Zigbee2Tasmota (also using with Home Assistant's ZHA):

https://thehelpfulidiot.com/a-wired-sonoff-zigbee-alternative

Again, basic info for experienced Tasmota and Z2T users here :

https://templates.blakadder.com/ewelink_ZB-GW03

and again there is also a discussion about it in Home Assistant community forum here:

https://community.home-assistant.io/t/zb-gw03-ewelink-ethernet-zigbee-gateway-now-hacked-with-tasmota-zbbridge-so-can-be-used-via-mqtt-or-as-a-remote-zigbee-adapter-with-home-assistant-zha/341223

UPDATE! The ESP32 inside ZB-GW03 has now also been hacked with ESPHome for use as a remote Zigbee Coordinator adapter:

https://github.com/syssi/esphome-zb-gw03

https://github.com/syssi/esphome-zb-gw03/blob/main/docs/flashing.md

Hedda commented 2 years ago

FYI, ESP32 and CC2652P based "Itead SONOFF Zigbee Bridge Pro" (ZBBridge-P, a.k.a. "ZB Bridge-P") is now available for purchase:

https://itead.cc/product/sonoff-zigbee-bridge-pro/

FCC leak from earlier in January this year showed inside with ESP32 + CC2652P based Sonoff ZBBridge-P v1.1 Zigbee Bridge:

https://fccid.io/2APN5ZBBRIDGEP

Both NotEnoughTech and digiblur have received theirs and while neither of them has tried to flash/hack it yet they posted some early thoughts on the original eWeLink hub firmware and hardware board, confirming that the first retail version ITead's SONOFF Zigbee Bridge Pro with PCB board labelled "ZBBridge-P V1.1 2021.11.12" is indeed based on Espressiff ESP32-DOWD-V3 (that ESP32 variant by the way also has integrated support for Bluetooth 4.2 including BLE), Texas Instruments CC2652P Zigbee module labelled "SM-031 V1.1 2021.07.28" (so probably manufactured by CoolKit Technologies like the Zigbee module for previous Sonoff bridge), with a cell-battery for the RTC (Real-Time-Clock), a built-in buzzer for chime or alarm-siren, and also an Espressiff branded PSRAM (ESP-PSRAM16H) with 2MB/16Mbit capacity.

digiblurDIY also mention that he managed to backup original firmware from ESP32 without issue so suspect that it is not locked:

https://www.youtube.com/watch?v=P5op57y5i6k?t=920&ab_channel=digiblurDIY

https://notenoughtech.com/home-automation/sonoff-zigbee-bridge-pro/

https://www.youtube.com/watch?v=fsIjFxCPJLA&ab_channel=NotEnoughTECH

Internal pictures posted from FCC show using an unannounced Texas Intruments CC2652P (CC2652P1) MCU chip based “SM-031 v1.1” radio module which must be made by CoolKit (company that also makes their EFR32MG21 based “SM-011 V1.0” module).

The new module based on Texas Instruments CC2652 probably come preloaded with Zigbee Coordinator firmware from Koenkk:

https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0/bin

https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator

https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0

Again the main downside the this new and the old Sonoff ZBBridge is that they only have WiFi and not a wired Ethernet LAN port.

michcfr commented 3 weeks ago

Hello, A little up for this topic.

Finally, is it expected an OpenMQTTGateway for ZigBee either based on the TI ZNP stack (as done by Tasmota) or based on the Espressif’s Zigbee SDK (built on top of the Zboss stack) for the ESP32-C6?

Regards