mercenaruss / uzg-firmware Goto Github PK
View Code? Open in Web Editor NEWFirmware for ZigStar UZG-01
License: GNU General Public License v3.0
Firmware for ZigStar UZG-01
License: GNU General Public License v3.0
Hey there,
I don't know what to do anymore... I ordered two UZG-01 from Elecrow which arrived few days ago. I hooked up the first one via USB and flashed it via the ESP Web Flasher to the latest 0.x version (web flasher only does 0.x). I then hooked it up to via a PoE supported Ethernet port and it all worked fine. It powered up, got an IP, all good.
I flashed the Zigbee Router firmware, got it hooked up to ZHA, started adding devices, all good so far.
However, the device stopped responding to http / via ethernet after some time, like it would go into wifi sleep... Zigbee was still working. Reconnecting the ethernet cable fixed it eventually. However, after some time it complete stopped even using Ethernet: The LEDs next to the Ethernet port don't light up, BUT it powers up via PoE! Also Zigbee seems to work still. I hooked it up to my Laptop again, flashed the latest 1.0.0 (UZG-01.bin) via ESP Flasher: Nothing, no change. I however see the WiFi AP it broadcasts. I can connect to it, but it refuses to even use Ethernet...
SOMETIMES, I alternatively get both LEDs lighting up completely, no flashing. Just full on.
So I got the 2nd one out, directly flashed 1.0.0 (this time XZG_20240519.full.bin, as I think it contains a few partitions?) via Webflasher, hooked it up via Ethernet: Works! Nice! UI asked me if I wanna update to a newer version I couldn't find on that GitHub here, did it. Then flashed the router firmware again, hooked it up to my coordinator, gave it a new IP (yes, I gave it a new IP before that and it survived it), reconnected cable aaaaaand same issue: No lights at all on the Ethernet port... It survived several reboots, several reconnects, but all of the sudden stops working on Ethernet...
I took the first one back to the Laptop, erased flash via esptool, flashed XZG_20240519.full.bin vie ESP Flasher: Nothing, no Ethernet lights.
I even tried hooking it up via USB and then connect Ethernet: Same story. One time, when I got the case where instead both LEDs just light up, I disconnected the Ethernet cable and the LEDs were still on :D See picture below:
I really don't know what to do anymore. Are they broken? Any hints to get them back?
Thanks and greetings,
Andy!
The MQTT server under "MQTT options" cannot be addressed via FQDN.
Does the device use the DNS server that is communicated via DHCP?
Hey there
Any chance you could consider adding Thread support to your firmware?
The TI CC2652P7 supports:
Bluetooth 5.2 Low Energy, Matter, Thread, Zigbee 3.0
It would be great to have another protocol enabled in Home Assistant by the UZG-01. 👍
Can't for the life of me get the firmware to upgrade from v.0.1.5 OTA. It goes through the whole process then reboots and firmware reports same. Any tricks? Is there an issue with this version?
Periodically Zigbee module becomes unavailable.
Homeassistant Z2M shows the following errors in the logs:
Failed to ping 'Boiler_switch' (attempt 1/1, Read 0xa4c138be83e96410/1 genBasic(["zclVersion"], {"timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms))
The only solution is to restart Zigbee via System and Tools ->Restart Zigbee.
It happens about once a week. I want to find the reason but don`t know how to find any logs that can bring some light.
I checked Debug console and see the following:
[1107887728] -> fe 37 24 01 1a 0c 01 01 00 ef d9 00 1e 2d 11 90 00 2e 00 65 00 00 24 08 00 26 0b 1e 26 12 00 22 17 00 1e 06 00 22 0c 00 22 0e 1e 22 17 00 22 06 00 22 0c 1e 22 0f 00 22 17 00 22 ca
[1107893734] -> fe 37 24 01 1a 0c 01 01 00 ef da 00 1e 2d 11 91 00 2f 00 65 00 00 24 08 00 26 0b 1e 26 12 00 22 17 00 1e 06 00 22 0c 00 22 0e 1e 22 17 00 22 06 00 22 0c 1e 22 0f 00 22 17 00 22 c9
[1108194675] -> fe 0f 24 01 97 8c 01 01 00 00 db 00 1e 05 10 93 00 00 00 72
[1108227324] | [ZBCHK] Wrong answer
[1108227324] | [ZBVER] Unknown
Last 2 records appeared because I clicked Check Zigbee Connection.
Device information:
Zig-Star model: | UZG-01
ESP32 fw ver: | 0.2.0 (prod-solo)
ESP32 hw version: | ESP32-D0WDQ6
ESP32 temperature: | 39.78 °C
ESP32 frequency: | 2 cores @ 160 MHz
ESP32 flash size: | 4 Mb, external
ESP32 heap (free / total): | 257 / 326 KiB
CC2652P hw version: | CC2652PXX
My ZHA client disconnects from the UZG-01 about every two days and cannot reconnect when it retries. To fix it, I need to use the 'ESP32 Restart' button on the System Tools page of the UZG-01, and then reload ZHA.
The Raw Data log looks strange when the UZG-01 is in this state:The next time this happens, what logs can I collect to help troubleshoot this issue?
Looks like you've uploaded the wrong firmware files, it's one versin old.
Hello,
I'm following instruction https://uzg.zig-star.com/flashing-and-updating/#multi-tool-ethernet to flash UZG-01 based on the CC2652P chip with the following firmware: https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20230507.zip
I'm getting the following error:
local variable 'chip' referenced before assignment
Also tried using cc2538-bsl with the same result:
py ./cc2538-bsl.py -evw --ieee-address 00:12:4b:00:14:b5:56:da -p COM8 ./CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
Could you please advise what is the problem here?
Thanks.
I have a UGZ-01 v0.2. I am fining that I need to restart the zigbee radio about every week in order to resolved a broken ZHA connection in home assistant.
When the issue occurs, I discover that HA shows a failure in the ZHA integration and all zigbee devices are unavailable. I am able to resolve the issue by using the USG-01 device web portal and clicking the System Tools -> Modules control -> zigbee restart button. After this, HA is able to reload the ZHA successfully.
This leads to think it's an issue with the zigstar device and not HA.
can you add, ethernet configuration page, the abilities to specify other DNS and NTP Servers ?
See issue #25 for détails.
It seems UGZ-01 drops client connections while renewing DHCP leases
This causes disruption to clients like zigbee2mqtt, see related issue here where some people have reproduced this reliably: Koenkk/zigbee2mqtt#20148
Switching UGZ-01 to static IP solves the issue further confirming the diagnosis
When I log into the web interface, I get a notification to upgrade to 1.0. However, I am unable to do so. Trying to upgrade directly from Github doesn't do anything. So I then downloaded the release and attempted to upload it via the web interface. However, when I select the file in the file dialog, it is input as "C:\fakepath\XZG_20240526.1.full.bin". So not surprisingly, it doesn't upload correctly there either.
Direct links to the relevant help pages would be great.
Hi.
I think there is an error in lines 120, 122, 124, 126, 128, 130, 132, 134, and 136 of the file web.cpp, they all contain the same code. "{ sendGzip(contTypeTextHtml, PAGE_LOADER_html_gz, PAGE_LOADER_html_gz_len); });"
I used your firmware (UZG-01_v0.1.5.full.bin) for my
ZigStar UZG
After that the device stopped working
I wrote the firmware via USB using esptool (esptool.py write_flash 0x0 '/home/ad-ssd/Downloads/UZG-01_v0.1.5.full.bin')
The console endlessly writes this:
17:08:38.215 -> 10
17:08:38.415 -> [resetSettings] Start
17:08:41.402 -> [resetSettings] Led blinking done
17:08:41.435 -> [resetSettings] Config del done
17:08:41.475 -> Start
17:08:41.475 -> [hard reset] Entering hard reset mode
17:08:41.475 -> 1
17:08:41.667 -> 2
17:08:41.866 -> 3
17:08:42.065 -> 4
17:08:42.264 -> 5
17:08:42.462 -> 6
17:08:42.661 -> 7
17:08:42.861 -> 8
17:08:43.060 -> 9
17:08:43.260 -> 10
17:08:43.459 -> [resetSettings] Start
17:08:46.479 -> [resetSettings] Led blinking done
17:08:46.479 -> [resetSettings] Config del done
17:08:46.517 -> Start
I have attempted to update UZG-01 from FW 0.2.0 to 0.2.6 to no avail. I have used all available methods:
The webUI update (local file or GitHub connection) would never complete getting stuck between 30-40%.
I then attempted 0.2.0 -> 0.2.1 which after 3 attempts using local file UZG-01_v0.2.1.full.bin
succeeded, or so I thought. On device reboot I still have 0.2.0.
I have 3 of these gateways and they all behave the same way.
It would a nice feature to reset all the network configuration using the rear button on the device.
I ran into an issue where I could not access the WebUI because I forgot to enter my subnet mask for a static IP. I attempted a factory reset but that didn't seem to reset the network section either.
I ended up attaching the gateway directly to my laptop via ethernet and assigning it an IP under the same subnet mask as the default value.
Hello,
I want to compile the code but I'm not sure if I should use:
[platformio]
default_envs = prod-solo
or
[platformio]
default_envs = prod
if I try to use default_envs = prod, should I add lib_deps = ESP Async WebServer, is that correct?"
It would be good to have an endpoint like /health
or /status
that allows for programmatic reading of the status values that are currently displayed in human-readable format on the Status
HTML page. This way, external monitoring tools could easily be used to query UZG's status and configure alarms.
As a bonus, different formats could be provided, think /status?format=json
, /status?format=prometheus
or /status?format=plaintext
, defaulting to format=json
. Or expose JSON data on the /status
endpoint and Prometheus format on /metrics
.
Another bonus would be having two separate endpoints, e.g. /health
just returning HTTP 200
and OK
if the device is up and running without errors, and /status
returning all the values that can currently be seen on the front page.
The HTTP status code should in any case reflect the actual state of the device.
Thank you for considering this feature request!
hi, thanks for the great update. i'm just a bit at a loss as to how i can display the mqtt as sensors in home assistant? or restart the gateway via mqtt? i can see the individual mqtt states from the uzg in the mqtt explorer. but unfortunately there is no auto discovery in home assistant. thanks again!
Minor error I noticed when reviewing the code; I think the below line should check for == 1, not > 1
Line 1343 in 813589a
I have one socket connection, it's displayed as 'Yes, 1 connections' on the status page. This change should fix this to display 'Yes, 1 connection' instead.
Hello,
I am trying to understand the source ugz-firmware:
I have noticed some MQTT related code using the PubSubClient lib. But I thought that the MQTT part is managed by the Zigbee2MQTT code at the server side.
What is the purpose of this code? just checking the connection with the MQTT server?
Regards
Does ZigStar UZG-01 supports install codes?
I'm trying to pair Bosch Smoke Detector to my network (https://www.zigbee2mqtt.io/devices/BSD-2.html) and nothing happens. On previous bridge Sonoff ZBDongle-E (ezsp) it pairs without any problems.
Hi @mercenaruss ,
I've just received ZigStar UZG-01, great product. Thank you!
I wanted to flash everything like this:
python3 ../tools/esptool.py --port /dev/ttyUSB0 write_flash --verify -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader_dio_40m.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 UZG-01*.full.bin
But that's not possible since boot_app0.bin
file is missing in bin/
directory.
Could you please add it?
Thank you.
Hi,
i have a question is it only me that all the zigbee devices stop showing the RSSO
ZIGBEE:
20240316
UZG-01
FW 20240707
On my UZG-01 I click the "Install latest from Github" button, "Github download starting..." shows above the progress bar but then nothing happens, ever. I was about to try uploading the ESP32 binary via the file update button but thankfully saw this issue. Please can you advise on the upgrade process I need to follow.
FWIW...I'm using a wired network with a statically assigned IP, have enabled webserver authentication, set a custom hostname and changed the timezone.
I could try a reset before the update process but happy to provide some logging/testing before that if it will help.
Thanks
Just checking if mqtts is currently supported, or is it something that will make available later?
Cheers
Hi, followed all documentation but for some reason is not connecting to ZHA. I have another network Xiaomi coordinator that works correctly so I do not think Home Assistant is to blame. Any ideas? did I get a bad one?
Hello,
The web interface notify about new ESP32 update available (v0.2.3).
I've tryed to upgrade via System and Tools -> Firmware Upgrade -> Install later from github
the text change to Github download starting... but nothing change...
I've also tryed via the manual procedure "choose file..." and click to "ESP32 file update" without other success.
here is the hardware/software information:
Zig-Star model: UZG-01
ESP32 fw ver: 0.2.0 (prod-solo)
ESP32 hw version: ESP32-D0WDQ6
CC2652P hw version: CC2652PXX
CC2652P fw rev: 20230507
the UZG is connected via ethernet (static IP)
browser's console:
18:30:13,931 Cette page est en mode de compatibilité (quirks). La mise en page peut en être affectée. Pour le mode standard, utilisez « <!DOCTYPE html> ». 172.16.0.8
18:30:13,986 La feuille de style http://172.16.0.8/css/required.css a été chargée comme CSS même si son type MIME, « text/javascript », n’est pas « text/css ». 172.16.0.8
18:30:14,243 [loadPage] url: / functions.js:204:10
18:30:15,560 [apiGetPage] starting parse values functions.js:369:12
18:30:16,809 [modalConstructor] start functions.js:597:10
18:30:16,812 New firmware (v0.2.3) was found on GitHub. It was downloaded 64 times. Go -> System and Tools -> Firmware update page to get more info. functions.js:1156:13
18:30:20,050 [loadPage] url: /sys-tools functions.js:204:10
18:30:20,152 L’utilisation d’XMLHttpRequest de façon synchrone sur le fil d’exécution principal est obsolète à cause de son impact négatif sur la navigation de l’utilisateur final. Consulter https://xhr.spec.whatwg.org/#sync-warning pour plus d’informations. jquery-min.js:2:79717
18:30:20,174 [apiGetPage] starting parse values functions.js:369:12
18:30:23,884 Propriété « -moz-box-shadow » inconnue. Déclaration abandonnée. required.css:85:19
18:30:23,884 Jeu de règles ignoré suite à un mauvais sélecteur. required.css:216:9
18:30:23,884 Erreur d’analyse de la valeur pour « -webkit-text-size-adjust ». Déclaration abandonnée. required.css:319:29
18:30:23,885 Pseudo-classe ou pseudo-élément « -moz-focus-outer » inconnu. Jeu de règles ignoré suite à un mauvais sélecteur. required.css:2544:13
18:30:23,885 Jeu de règles ignoré suite à un mauvais sélecteur. required.css:2562:35
18:30:31,799 Update from Git started... Just be patient! sys-tools line 2 > injectedScript:110:17
18:30:31,799 Events try functions.js:479:10
18:30:32,314 [flash] start functions.js:472:11
I've left the page "active" for 3 hours, and it did not log anything else.
Given the stark warnings on picking the correct CC2652P chip here
eg. CC2652P7 vs CC2652P2
Would it not be possible to report this somehow to the user rather than hardcoding CC2652PXX
https://github.com/mercenaruss/uzg-firmware/blob/main/src/websrc/html/PAGE_ROOT.html#L87
I bought from elecrow and see no way of identifying what version I have.
Thanks this might make it easier for people to update their firmware thought there isn't actually a new one (currently 20230507 is the latest for either)
Hi,
As I am trying to find the best position in the house I am switching from Ethernet to Wifi and I have problems reconnecting to the device if I do not specify before the interface that will be used.
I suggest a feature request to permit defining the order (Ethernet, Wifi) and have a setting to always prefer Ethernet whenever is connected.
Thank you!
Hello,
I would be interested to adapt the uzg-firmware for the ESP32-C6 that already integrates a ZigBee radio. So no need of the CC2652P.
What part of the code should I change/adapt?
thank you
I have tried to have the device update itself via the web interface (OTA), seemed stuck (no progression) so I decided to download the latest fw and upload it to the device... terribly wrong, the device is now totally dead except for a blue fixed led
Now I can't update it at all. Tried everything, erase flash with esptool then reflash it, looks totally dead, i'm now the proud owner of a useless brick after 15 days of use.
Any help would be very welcome to make that device work again (i'm on Linux, fedora 40)
The web installer fails everytime, flashing with esptool works but nada I can do to have this firmware work again.
Any special op to maybe rebuild the partition table ? flash to a certain address ?....
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46
Many thanks in advance i'm very bummed :/
When setting up a gateway with a static IP address, the netmask textbox is prefilled with "255.255.255.0." Only it's not actually filled with a value, but rather an input hint. This caused me to configure the device without a netmask, which took some time to troubleshoot.
Correct fix: Add input validation on the form.
Easy fix: Remove the input hint so it's obvious that the value is null.
I have finally updated to the "latest" version and I am still seeing daily disconnects with my Home Assistant setup.
I have tried:
Is there anything that can be done to make this more stable or should I just move to a competitor device? This has only happened in the last month or so and was rock solid before that.
Hi everybody,
I know I can use esptool.py to flash ESP32 when connected over USB:
python3 ./tools/esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --verify -z --flash_mode dio --flash_freq 40m --flash_size detect 0x0 UZG-01_v*.full.bin
And I also found on: https://docs.espressif.com/projects/esptool/en/latest/esp32/esptool/remote-serial-ports.html
that it might be possible to use --port rfc2217://ADDRESS_OF_SERVER:PORT
for flashing.
so I tried:
python3 ./tools/esptool.py --port rfc2217://<IP>:6638 flash_id
but that didn't work... Is that possible?
P.S. I know I can use a web updater and I can do it via web management but I'm curious if this can be done via CLI.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.