// April 8 2024, 3 min read, #home assistant #smart home #tech #hardware #guides
We came home from a nice night out and realized that our ceiling lights had just become inaccessible.
They're zigbee light bulbs and we have a USB zigbee dongle on Home Assistant to connect to them. We previously had an issue where they became inaccessible due to wireless interference, which was a bit of an annoying hassle to reconfigure the network. So as I prepared myself for that outcome, I was surprised to see Home Assistant reporting:
NVRAM is corrupted
Whaattt??? How did that happen! It was working just fine earlier today!
Well anyway. Did you know that DuckDuckGo _sucks_ as a search engine sometimes? It literally had no results for "sonoff zigbee "NVRAM is corrupted"", whereas Google's first result set me on the right path, though not without trouble and confusion.
Specifically, this comment by github user sideonshare:
Right away I ran into a few issues. First, the Texas Instrument website sucks. Thankfully sideonshore provides an alternate download link for the flashing software, but that software didn't work for me. Nor did the firmware download link they provided, as the SILabs website only offered drivers for XP and Vista. Turns out I had to use Windows Update to get drivers on Windows 11 (and presumably 10). The link to the firmware worked perfectly.
Eventually through some other github threads I was able to track down a python app, and then more usefully, a compiled executable with GUI using said python app: ZigStarGW-MT. And even then there was some weirdness with the process and order of operations... 😪
I also had to scrub through a YOUTUBE video just to determine where the bootloader button was (it's inside the device) and then which of the two buttons was the bootloader button! Argh!
Yeah! Let's make this as easy as possible for anyone else who has this issue:
1. Download and run ZigStarGW-MT as Administrator
2. Plug the dongle unmodified into your Windows computer and open the system Settings application (keyboard shortcut Win+I)
3. Navigate to Windows Update > Advanced Options > Optional Updates and look for something that says "Silicon Laboratories Inc. - Ports - $VERSION NUMBER", and click install.
4. Download the latest firmware from this repository:
It will be called "CC1352P2_CC2652P_launchpad_coordinator"
5. Unplug and open up your sonoff zigbee stick by unscrewing the two small screws on the antenna end of the device. Lightly tap it on your work surface to dislodge the back plate if it does not freely come out. The board then just slides out.
6. Connect the stick to your computer while holding down the bootloader button as labeled in the image below. Keep holding that button for about ten seconds after it's plugged in, just in case.
7. Using Device Manager, note down the COM port that it has registered as (mine was COM4).
8. In ZigStar, TYPE in the COM port, do not hit scan. Why? 🤷♀️
9. Select the firmware file you downloaded before. Check all three of (based on the instructions for the TI software):
- Erase
- Write
- Verify
10. Press the "Write" button
At this point for me, it took a minute or so to write to the device, said it was restarting the device, and then it was done. I plugged it back into Home Assistant, reloaded the Zigbee integration, and my Zigbee network came right back without any further work.
-=-=-=-=-=-=-=-=-=-