Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the "Flash the Zigbee module" section of the documentation #18

Open
brandonb1987 opened this issue Sep 13, 2022 · 14 comments
Open
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@brandonb1987
Copy link

brandonb1987 commented Sep 13, 2022

Was able to get the code onto the device up to the point where I need to download the zigbee firmware.

I'm not sure what the instructions refer to with all the code below the "download and reset button" but when i do that step, nothing happens.

If i hit the download it gives me this in the log

[22:58:39][D][switch:013]: 'zb-gw03 Zigbee Download Mode' Turning ON.
[22:58:39][D][switch:037]: 'zb-gw03 Zigbee Download Mode': Sending state ON

If i hit the reset after I get this....no zigbee radio firmware downloads?

[22:59:56][D][switch:017]: 'zb-gw03 Zigbee nRST' Turning OFF.
[22:59:56][D][switch:037]: 'zb-gw03 Zigbee nRST': Sending state OFF

I also don't even get the temperature sensor data

Here is the full "download of the zigbee firmware" step output.

[23:16:00][D][switch:013]: 'zb-gw03-coordinator Zigbee Download Mode' Turning ON.
[23:16:00][D][switch:037]: 'zb-gw03-coordinator Zigbee Download Mode': Sending state ON
[23:16:00][D][switch:013]: 'zb-gw03-coordinator Zigbee Reset' Turning ON.
[23:16:00][D][switch:013]: 'zb-gw03-coordinator Zigbee nRST' Turning ON.
[23:16:00][D][switch:037]: 'zb-gw03-coordinator Zigbee nRST': Sending state ON
[23:16:00][D][switch:017]: 'zb-gw03-coordinator Zigbee nRST' Turning OFF.
[23:16:00][D][switch:037]: 'zb-gw03-coordinator Zigbee nRST': Sending state OFF
[23:16:05][D][switch:017]: 'zb-gw03-coordinator Zigbee Download Mode' Turning OFF.
[23:16:05][D][switch:037]: 'zb-gw03-coordinator Zigbee Download Mode': Sending state OFF
[23:16:05][D][switch:013]: 'zb-gw03-coordinator Zigbee Reset' Turning ON.
[23:16:05][D][switch:013]: 'zb-gw03-coordinator Zigbee nRST' Turning ON.
[23:16:05][D][switch:037]: 'zb-gw03-coordinator Zigbee nRST': Sending state ON
[23:16:05][D][switch:017]: 'zb-gw03-coordinator Zigbee nRST' Turning OFF.
[23:16:05][D][switch:037]: 'zb-gw03-coordinator Zigbee nRST': Sending state OFF

Any help?

@syssi
Copy link
Owner

syssi commented Sep 13, 2022

You are trying to convert your device to a Zigbee router and you got stuck here, right?

@syssi
Copy link
Owner

syssi commented Sep 15, 2022

@brandonb1987 Friendly ping.

@syssi
Copy link
Owner

syssi commented Sep 19, 2022

Some background: The ZB-GW03 is equipped with a Zigbee module. If we want to update the firmware of the zigbee module we must enable the "download mode" and reboot the Zigbee module (using the zigbee reset switch). The module boots into the "download mode" now.

We can talk to the serial interface of the Zigbee module using telnet (a network connection) because the ESPHome node provides a little ser2net service here. The code block of the documentation shows a telnet session. If you telnet to your ESPHome node on port 6638 and press return the Gecko bootloader of the zigbee module should respond with:

Gecko Bootloader v1.9.1.04
1. upload gbl
2. run
3. ebl info
BL >

This is a "menu". If you type 1 and press return the Bootloader starts into the "upload gbl" mode and asks you to upload the new firmware. Please abort the telnet session now because we don't use the telnet client to upload the binary. We use another tool/client called sx:

sx -vv -X -b --tcp-client 192.168.132.225:6638 ncp-uart-sw_6.7.8_115200.ota

This command establishes a new telnet connection to the ESPHome node and uploads the OTA file to the Zigbee module. You should see some progress and a Transfer complete response.

As last step we want to boot into the new firmware and don't want to stop at the Gecko bootloader again. You have to turn off the "download mode" switch and restart the Zigbee module using the "zigbee reset" switch.

@brandonb1987
Copy link
Author

It's strange because I did not have to do any of that in the end. It just started working all of a sudden. Not sure if that is because I went from beforehand Tasmota where I used the same .ota firmware or not, but it works.

The write-up you just added makes WAY more sense now. I suggest you add the extras to the instructions in the readme as it will make people stop scratching their head around that point lol. I didn't realize everything was done over telnet in that phase. The instructions at that point weren't very clear to the 'non-tech savy'.

Thanks!

The only concern I have is it pulls a bunch of stuff from different sources. This is quite reliant on git, and their maintainers continuing the good work. Any intentions to make it not pull from github?

@syssi
Copy link
Owner

syssi commented Sep 26, 2022

Your guess about the Zigbee firmware is correct. If you have used tasmota beforehand you had flashed the alternative Zigbee firmware already.

You could make a local copy of all external components and change the external_components section to pull from the local filesystem.

@syssi syssi changed the title Am I missing something? Improve the "Flash the Zigbee module" section of the documentation Sep 26, 2022
@syssi syssi added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 20, 2023
@cptbucky
Copy link
Contributor

First off, thank you ever so much for all your work here, I now have this running with Zigbee2MQTT which has been the plan for a very long time!

This issue explains a lot so thank you for logging, as I hit the telnet section and due to lack of experience I didn't know what to do, I did hit enter however I didn't get the gecko bootloader so skipped it and everything just worked. It appears that I'm in the same boat as @brandonb1987 as I had also previously converted the device to Tasmota so got lucky!

It might be worth adding a brief on Zigbee2MQTT as there is so little out there that this repo is absolute gold but hard to find when not looking for ZHA, though obviously not impossible :-)

@syssi
Copy link
Owner

syssi commented Mar 19, 2023

@cptbucky Could you describe your setup in a few words? I must admit I don't know zigbee2mqtt in detail and I don't feel confident to add details / instructions to the docs.

@cptbucky
Copy link
Contributor

I currently run a docker host which has Home Assistant, ESPHome, Zigbee2MQTT and Mosquitto Broker to name the important bits. Zigbee devices are predominantly attached to a ConBee II that is attached to the server and mounted to Zigbee2MQTT, though I've now added the GW-03 also, with a 2nd Zigbee2MQTT instance, same broker.

The "Add the ESPHome node to Home Assistant" section in the docs is slightly different for me as I don't use the HASS integration and haven't fixed an mDNS issue that sees me chasing static IPs 🥺

The "Connect the device to the ZHA integration of Home Assistant" section in the docs has all the information except that for Zigbee2MQTT you can either go to the application itself and setup the adapter as follows:

Screenshot_20230319_092023

I will have configured via the config files however, which is an entry of the following:

serial:
  port: tcp://192.168.1.100:6638
  adapter: ezsp

Official docs can be found here: https://www.zigbee2mqtt.io/guide/configuration/adapter-settings.html

If you like I can take a stab at a PR to list out both ZHA and Zigbee2MQTT options?

@syssi
Copy link
Owner

syssi commented Mar 19, 2023

I would super happy about a PR! Let's add a new section to the flashing guide mentioning the zigbee2mqtt route.

@Bytchus
Copy link

Bytchus commented May 19, 2023

Please abort the telnet session now because we don't use the telnet client to upload the binary. We use another tool/client called sx:

Good day,
First of all, say that I am impressed with all the work here selflessly shared, it is great, thank you very much.

I will try to follow your flashing guide from Windows, is there any client that I can use to upload the file from Windows?

Thanks.

@syssi
Copy link
Owner

syssi commented May 22, 2023

You can use any terminal program which supports network connections & xmodem data transfer. It looks like ExtraPuTTY could do the job!

@syssi
Copy link
Owner

syssi commented May 22, 2023

I you are looking for a well tested solution you should follow the flashing guide and spin up a ubuntu live system or virtual machine (once).

@Bytchus
Copy link

Bytchus commented May 26, 2023

Thx, I will follow it.

@ivananasco
Copy link

i trying install firmware zigbee....

ubuntu@IvanPC:~$ telnet 192.168.1.23 6638
Trying 192.168.1.23...
Connected to 192.168.1.23.
Escape character is '^]'.
1

no display Gecko Bootloader v1.9.1.04.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants