AlexxIT / XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN
https://github.com/AlexxIT/Blog
MIT License
2.4k stars 334 forks source link

ezsp to ember migration #1363

Open ALERTua opened 3 months ago

ALERTua commented 3 months ago

As Zigbee2MQTT states in its logs, ezsp support will be soon dropped in favor of ember. https://github.com/Koenkk/zigbee2mqtt/discussions/21462

[2024-05-18 11:44:24] warning:  zh:ezsp: Deprecated driver 'ezsp' currently in use, 'ember' will become the officially supported EmberZNet driver in next release. If using Zigbee2MQTT see https://github.com/Koenkk/zigbee2mqtt/discussions/21462

Are there any plans for this migration in XiaomiGateway3 @AlexxIT ?

AlexxIT commented 3 months ago

Check this https://github.com/AlexxIT/XiaomiGateway3/issues/1328 and this https://github.com/AlexxIT/XiaomiGateway3/issues/1307

Only problem is ember needs latest firmware. I don't have the skill to build them. And don't have time to update the compiled firmware in the integration.

ALERTua commented 3 months ago

Thank you. Maybe you should keep this issue to update users on the progress of this. Hoping for the best.

zalatnaicsongor commented 2 months ago

Unfortunately as per https://github.com/Koenkk/zigbee-herdsman/issues/943#issuecomment-2110570405 EFR32MG1B (Xiaomi Multimode Gateway) is not going to be supported, as EFR32MG1B does not support recent versions of the NCP firmware. However, the RCP firmware works perfectly on EFR32MG1B. You can try convincing the zigbee-herdsman folks to reconsider their stance on the RCP firmware.

I will soon compile a firmware for Xiaomi Multimode Gateway 2 that supports the ember driver.

zalatnaicsongor commented 2 months ago

Unfortunately as per Koenkk/zigbee-herdsman#943 (comment) EFR32MG1B (Xiaomi Multimode Gateway) is not going to be supported, as EFR32MG1B does not support recent versions of the NCP firmware. However, the RCP firmware works perfectly on EFR32MG1B. You can try convincing the zigbee-herdsman folks to reconsider their stance on the RCP firmware.

I will soon compile a firmware for Xiaomi Multimode Gateway 2 that supports the ember driver.

I have updated my repo at https://github.com/zalatnaicsongor/MGLGWFW/tree/main/mg21 with some newly compiled binaries for the Xiaomi Multimode Gateway 2 + uploaded some binaries to help with the flashing of the firmware to https://github.com/zalatnaicsongor/MGLGWFW/tree/main/arm

Once I find some time, I will update the flashing script to do the flashing automatically + maybe raise a PR in this repo to automate the process completely.

In the meantime I'm trying to look at fixing the bugs that cause the ember driver to fail with the RCP firmware + zigbeed.

Hedda commented 2 months ago

You can try convincing the zigbee-herdsman folks to reconsider their stance on the RCP firmware.

FYI, be aware you are probably unlikely to convince Koenkk and Nerivec in any near-term now that Multi-PAN RCP (multiprotocol) for concurrent Zigbee and OpenThread running on a single SoC radio adapter is also no longer recommended for Home Assistant's ZHA integration and now only recommended to use separate dedicated radio adapters for each IoT wireless protocol:

FYI, RCP MultiPAN in multiprotocol mode is no longer recommended because running multi-protocol with multiple active networks on a single radio adapter has proven to not be stable when using Zigbee and Thread network protocols simultaneously on the same radio adapter, it also increases the complexity of software component dependencies needed, so if already using RCP Multi-PAN then it is highly recommended that you plan to migrate to separate dedicated radio adapters instead, (using Zigbee NCP and Thread RCP firmware respectively), even if using RCP MultiPAN on a single radio adapter dongle has been working fine for you so far. For reference see more links and related discussion in darkxst's silabs-firmware-builder repository here:

PS: Nabu Casa is also at this time longer releasing any newer RCP MultiPAN firmware versions for SkyConnect or Yellow:

zalatnaicsongor commented 2 months ago

Well then, this makes effectively makes the Xiaomi Multimode Gateway with the EFR32MG1B deprecated as no new ncp firmwares are released for it.

Hedda commented 2 months ago

FYI, build your own firmware check out Nabu Casa’s silabs-firmware-builder project:

https://github.com/NabuCasa/silabs-firmware-builder

and this fork for alternative manifest for other adapters:

https://github.com/darkxst/silabs-firmware-builder

PS: Note only EFR32MG2x and EFR32MG3x will be supported upcoming EmberZNet 8.x.x.x.x firmware as older are phased out:

https://github.com/Koenkk/zigbee-herdsman/issues/1093

Note! EmberZNet 8.0.0.0 and Gecko Platform remove support for EFR32 Series 0/1 (e.i. EFR32MGx and EFR32MG1x) so need to use separate SDKs for Series 0 & 1 and Series 2 & 3 Starting in Q2 2024 (June 2024) as the new Gecko Platfoprm and SDK are designed specifically for our EFR32 Series 2 and upcoming Series 3 devices only.

So only EFR32MG2x and EFR32MG3x will be supported upcoming EmberZNet 8.x.x.x.x firmware as old EFR32MG1x is phased out:

"Meanwhile, our Gecko Software Development Kit (GSDK) will continue to be available for users of our Series 0 and Series 1 devices. The Gecko SDK will continue to support all Series 0 and 1 devices with no change to the long-term support, maintenance, quality, and responsiveness provided under our software policy.The new SDK will branch from Gecko SDK and begin to offer new features that help developers take advantage of the advanced capabilities of our Series 2 and 3 products."

zalatnaicsongor commented 2 months ago

We'll see how the Gecko SDK will stay supported by the ember driver. However, since the current NCP firmware isn't even available for series 1 devices, I'd say users should migrate away from using the Xiaomi Multimode Gateway as a zigbee coordinator, a zb-gw04-1v2 literally costs $8 on Aliexpress.

Hedda commented 2 months ago

I'd say users should migrate away from using the Xiaomi Multimode Gateway as a zigbee coordinator, a zb-gw04-1v2 literally costs $8 on Aliexpress.

ZB-GW03 (ESP32 Zigbee Bridge) is not that expensive either if want a network-attached remote adapter for Zigbee2MQTT:

https://community.home-assistant.io/t/zb-gw03-ewelink-ethernet-zigbee-gateway-now-hacked-with-tasmota-and-esphome-so-can-be-used-via-mqtt-or-as-a-remote-zigbee-lan-adapter-with-home-assistants-zha-integration-or-zigbee2mqtt/341223?page=4

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

https://github.com/xsp1989/zigbeeFirmware

But if want a USB adapter instead then you are better of paying a little more for Sonoff ZBDongle-E (a.k.a. Dongle-E) by ITead:

https://community.home-assistant.io/t/itead-s-sonoff-zigbee-3-0-usb-dongle-plus-v2-model-zbdongle-e-based-on-silicon-labs-efr32mg21-20dbm-radio-soc-mcu/442695

https://itead.cc/product/zigbee-3-0-usb-dongle/

https://sonoff.tech/product/gateway-and-sensors/sonoff-zigbee-3-0-usb-dongle-plus-e/

https://github.com/itead/Sonoff_Zigbee_Dongle_Firmware/tree/master/Dongle-E

https://github.com/darkxst/silabs-firmware-builder/

zalatnaicsongor commented 2 months ago

Xiaomi Multimode Gateway 2 also works well as a networked gateway (with the NCP firmware I built). I will raise a PR against the https://github.com/darkxst/silabs-firmware-builder/ repo to include building a firmware for the Xiaomi Multimode Gateway 2. Flashing is also easy if you can telnet into the gateway, but impossible without telnet access.