Elelabs / elelabs-zigbee-ezsp-utility

Elelabs Zigbee EZSP Utility to perform firmware update on a range of Elelabs EZSP products as well as other generic EZSP adapters.
Apache License 2.0
134 stars 27 forks source link

[SUGGESTION] SL Web Tools implementation as Web Flasher for flashing Silicon Labs EFR32 firmware via a web browser #40

Open Hedda opened 1 year ago

Hedda commented 1 year ago

Home Assistant founders (and Nabu Casa) have recently among other things announced: "SL Web Tools" project (short for "Silicon Labs Web Tools") is available as open source, so wondering if you would consider adding that to your website as a tool for updating/flashing Elelabs adapters/dongles based on Silicon Labs EFR32 SoC/MCU family. See:

https://www.home-assistant.io/blog/2023/02/08/state-of-matter-and-thread/#silabs-multi-flasher--sl-web-tools

(Note that this is only just one section from https://www.home-assistant.io/blog/2023/02/08/state-of-matter-and-thread/ )

SL Web Tools allows users to manage the firmware on Zigbee/Thread sticks directly from a web browser, with no terminals or compilation necessary. This allows product creators like yourself to offer easy firmware updates to their users and make experimental firmware updates available to test bug fixes quickly.

SL Web Tools runs in the browser using Pyodide and is currently powered by another new open-source Python project from them, “silabs-universal-flasher” for Silicon Labs EFR32 based SoCs like the EFR32MG21 SoC.

https://github.com/NabuCasa/sl-web-tools

(and currently powered by https://github.com/NabuCasa/universal-silabs-flasher for Silicon Labs based chips)

https://www.youtube.com/watch?v=-88K23e8XYw&t=2s&ab_channel=HomeAssistant

To see it in action, a demo of SL Web Tools for Silicon Labs chips has been added to the Home Assistant SkyConnect documentation.

https://skyconnect.home-assistant.io/firmware-update/ redirected from https://skyconnect.home-assistant.io/

image

Nabu Casa employee puddy very recently also added support for flashing Thread/OpenThread firmware with sl-web-tools:

https://github.com/NabuCasa/sl-web-tools/pull/7

Also, if wanted to take it to the next level then maybe forking that for Elelabs Silabs based adapters/dongles by starting a new project called "TI Web Tools" (short for "Texas Instruments Web Tools") or similar that is based on that in combination with cc2538-bsl code (and/or ZigStarGW-MT) for the TI flashing part(?). That is, an idea to extend this would be to replace the silabs-universal-flasher code part with cc2538-bsl and/or ZigStarGW-MT code in order to allow flashing of Texas Instruments based adapters instead.

Note! SL Web Tools is in turn a fork of their previous "ESP Web Tools" project which allow DIY firmware flashing of ESP32/ESP8266 SoC projecst to offer an easy web installer on their homepage, allowing users to get started directly from their browser. It has been adopted by all the great projects, including Tasmota, WLED, and ESPresense. Ever since the introduction of ESP Web Tools, they expanded this to more devices, and now they also introduced SL Web Tools for SiLabs based chips.

PS: For reference; the firmware build system for Silicon Labs was made by Home Assistant developer/engineer and Nabu Casa employee Stefan Agner (a.k.a. agners, who also developed the EFR32MG21-based Home Assistant SkyConnect USB stick/dongle as well as the EFR32MG21-based radio module integrated into the Home Assistant Yellow appliance for Rasberry Pi 4 Compute Module). And the "universal-silabs-flasher" firmware tool was made by puddly who is also one of the lead developers of zigpy and the radio libraries for zigpy that is used in Home Assistant's ZHA integration (among other projects).

@NilsBohr

Hedda commented 1 year ago

Note that would also need to add your VID and PID to "usb_filters" to manifest file for it to detect all of Elelabs dongles/adapters:

https://github.com/NabuCasa/sl-web-tools/blob/dc5d5c239d330e03add1511971280e4180bebf94/assets/manifests/skyconnect.json#L5

Hedda commented 1 year ago

FYI, @darkxst has published a barebone implementation hosted on Github pages as proof-of-concept for multiple adapters:

https://github.com/darkxst/sl-test/tree/gh-pages

https://darkxst.github.io/sl-test/

He does however write that it would, however, require some modifications to the build system:

https://github.com/ksjh/silabs-firmware-builder/issues/12

That in turn depends on silabs-firmware-builder fork from @ksjh here:

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

Hedda commented 1 year ago

@NilsBohr FYI, darkxst is not only continuing to improve his fork of silabs-firmware-builder and he has now also forked the Silabs Flasher add-on for Home Assistant and is working on making it compatible with many different Silicon Labs based USB adapters, see:

PS: Another tip is to also check out his blog -> https://dialedin.com.au/blog/

Hedda commented 1 year ago

@NilsBohr slightly off-topic but thought that you might be interested to know that darkxst have begun working on an experimental "Silicon Labs Multipan Flasher Add-on" as a fork of the official "Silabs Flasher" addon for Home Assistant to let users easily flash the firmware images from Home Assistant's GUI for built with Silicon Labs firmware builder on the other products that the official Home Assistant SkyConnect dongle, e.i. Zigbee Coordinator adapters like Easyiot zigbee 3.0 USB Dongle model ZB-GW04, ITead’s "Sonoff Zigbee 3.0 USB Dongle Plus V2” (model “ZBDongle-E”), and Elelabs ELU013 USB radio stick:

https://github.com/darkxst/multipan_flasher/tree/main

https://github.com/darkxst/multipan_flasher/blob/main/multipan_flasher/README.md

"This is a fork of the official Silabs Flasher HA Addon, but is shipped with my firmware builds. Once configured, It will automatically update dongle firmware on next reboot of HA, or you can manually run it after installing/updating. Currently supports ZBDongle-E and a few others."

Developers and users that have issues with it can create an issue here:

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

darkxst is not only continuing to improve his fork of silabs-firmware-builder and he has now also forked the Silabs Flasher add-on for Home Assistant and is working on making it compatible with many different Silicon Labs based USB adapters, see:

PS: Another tip is to also check out his blog -> https://dialedin.com.au/blog/