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 Assistant's ZHA integration or Zigbee2MQTT

Back on this channel again. After +/- 2 weeks of having fun with the GW03 and tasmota firmware, it seems to be very unstable. (I now even struggle to get the GW03 back online, even starting from scratch again. Flashing works, but the ‘fixed Ecroc file’ doesn’t allow me to connect through 192.168.4.1), the helpfull idiot flash file does, but is very unstable in my setup.

In other words, the ESPhome route then, but I get stuck (as always due lack of full understanding what I am doing).

-I work with W10, CMD so therefore:

-I installed python (3.10) with GIT and I have installed ESP home 2021.9.3
-I have check working order by command ‘Esphome version’ and replies with: “version 2021.9.3”

-I have created a folder on my desktop called MyEsphome
-I have opened this folder in CMD, so my line states: C:\Users\Seesar\Desktop\MyEsphome
-now the guide states: " Setup an ESPHome Project (see README.md), compile the firmware for the gateway and flash the firmware to the device:"

No idea what this means…

-I managed to create a project by running the wizard (ESPhome wizard gw03.yaml) and followed the 4 steps (esp32, board esp-wrover-kit, SSID + PW and test OTA pw). A file is created called gw03.yaml in folder myesphome. This yaml files then contains my SSID and pw etc information.

My questions is, how do I compile the rest of the firmware and flash it with the configuration file?

I managed to flash the GW03 by running the command ‘Esphome run coordinator-example.yaml’.

As part of trail and error (because no idea what above instruction means) I created this file by manually creating a text file, copy-pased the example data in it an called it ‘coordinator-example.yaml’; there is no download option.

This file is successfully compiled and uploaded to the GW03, but of course it then still doesn’t know what my SSID and PW is to connect to the network; hence it is not recognized either.

So in short, what step am I missing, or what am I doing wrong?

I am not sure how the 2 files:

-coordinator-example.yaml
-wizard created gw03.yaml for SSID info

work together/are compiled/flashed together.

Also from where does it get configured to be in ethernet mode instead of wifi?

hey i´ve bought this ethernet Gateway click gut i don´t know how i can integrate this, i know the ip adress and the port from my router but it was all.

can anybody help me please ?

Thanks a lot and greetings from germany

That is not the same as the ZB-GW03 so off-topic for this thread, please create a new seperate topic thread instead.

I use ZB-GW03 flashed with Tasmota (tasmota32-EWELINK_11.1.0) and ncp-uart-sw_6.7.8_115200.ota
It works with zigbee2mqtt. I have 5 devices connected, and all of them are routers. After z2m restart, all devices are online for about 2-3 hours, sending updates each several minutes. And then all devices go offline altogether.
Do you have any ideas about how to debug and find the reason for such unpleasant behaviour?
This is an example of logs of a device online and then offline

Zigbee2MQTT:info  2022-12-13 13:29:47: MQTT publish: topic 'zigbee2mqtt/DIN1 switch', payload '{"ac_frequency":50.02,"current":1.424,"energy":504.38,"last_seen":"2022-12-13T13:29:47+00:00","linkquality":204,"power":86,"power_factor":24.9,"produced_energy":0,"state":"ON","voltage":241.1}'
Zigbee2MQTT:warn  2022-12-13 13:39:52: Failed to ping 'DIN1 switch' (attempt 1/2, Read 0x84b4dbfffeb8a8f7/1 genBasic(["zclVersion"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (sendZclFrameToEndpointInternal error))
Zigbee2MQTT:warn  2022-12-13 13:39:55: Failed to ping 'DIN1 switch' (attempt 2/2, Read 0x84b4dbfffeb8a8f7/1 genBasic(["zclVersion"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (sendZclFrameToEndpointInternal error))
Zigbee2MQTT:info  2022-12-13 13:39:58: MQTT publish: topic 'zigbee2mqtt/DIN1 switch/availability', payload '{"state":"offline"}' 

I am trying to get the device working as a router wit Esp home.
After a lot of puzzling i got the device in Esp home and added it to home assistant.
I have 4 entities so that is goed.
I can telnet in to the device but i am stuck at pont 7 of the installation instructions for the router.
I also could not get the transfer tool LRZSZ installed, but it looks like it is running fine without that.

7. Go to a second terminal and upload the new firmware. You don't need to cancel the telnet session
$ sx -vv -X -b --tcp-client 192.168.132.230:6638 efr32mg21_zigbee_router_signed-6.7.10.gbl.ota

If I open another window with cmd and paste the command in there I get the error that $ isn’t recognized as an internal command.
I tried a telnet session with putty but that seems to hang right on connecting, I can’t enter any command. Could someone please help me get this thing running as an router? My goal is to put this in the garage and send the ZigBee messages over ethernet to my home. as most know the wireless options do not work properly(I have tried 2)

Did you succeed or do you like some guidance?

I gave up on this. I went another route. And added a repeater to get good zigbee signal in my garage.

Hi all,
A simple question:I flashed my esphome-zb-gw03 in router mode with the very nice tuto(esphome-zb-gw03/router.md at 498a2dff57e2657b5e81f5e5349aa463d7912de5 · syssi/esphome-zb-gw03 · GitHub), and unfortunately, the pairing step doesn’t work. I start the pairing mode and I try to get the ESP with zigbee2MQTT but nothing…
Any ideas?

François

1 Like

We have built tasmota firmware in all languages based on ZB-GW03. The ETH version has wifi turned off by default, and it can be used after power-on without configuring the template. If you need to check the IP address, you can use the mdns tool to scan the network to find tasmota’s gateway, and you can also log in to the background of your router to check the gateway’s IP address. If the ETH version does not meet your needs, you can also use the WIFI&ETH version without additional configuration.

2 Likes

Good day,

First of all sorry if my questions seem very simple, I´m very new in this tasmota world.
I have bought a ZB-GW03 device that comes with tasmota preinstalled. Really this is my second one because I bricked the first one on the first day.
I have plugged and connected it to my network thru ethernet and I have one Hue light already linked. My problem is that I cannot connect it to Home Assistant in anyway.

I have MQTT installed and configured in the zb-qw03 hub, no problem here, but when I try to connect Zigbee2Mqtt it doesn’t work. I only was able to connect it when I change GPIO 3 and 5 from ZigBee TX and RX to TCP Rx and RXthe Template and started the TCP in port 8888, but at this moment I cannot access the light thru the hub (I connect with it sending commands from the console), and also no device appears in the Z2M device list, neither the coordinator.

This is my Zigbee2MQTT configuration.

Socat:

enabled: false
master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
options: “-d -d”
log: false

mqtt:

server: mqtt://192.168.0.50:1883
username: XXXX
password: XXXX

serial:

port: tcp://192.168.0.60:8888
adapter: ezsp

Please, someone who gives me a way to follow, I wouldn’t like to brick another one checking by myself.

Many thanks in advance.

Not sure if it is you or me that is confused now. Can you clarify your setup with a diagram or something?

Is it that you want the ZB-GW03 as a remote Zigbee Coordinator for Zigbee2MQTT? Or do you want to use the native Zigbee2Tasmota (Z2T) Zigbee gateway and control its devices via MQTT. You can do either one of those but not both as both of those features are mutually exclusive.

You need to understand that Zigbee module inside the ZB-GW03 is a only serial radio device and as such the Zigbee module can only be used by one single Zigbee gateway solution, (e.i. you can not connect two Zigbee gateway solutions to it), and it sounds as if you have already enabled the native Zigbee2Tasmota (Z2T) Zigbee gateway, which means that you can not also connect a different Zigbee gateway solution like Zigbee2MQTT or ZHA.

If you wanted to ZB-GW03 as a remote Zigbee Coordinator for Zigbee2MQTT or ZHA then you need to disable the native Zigbee2Tasmota (Z2T) Zigbee gateway and instead enable the serial server (e.i. the Serial to TCP Bridge that will allow serial protocol over TCP/IP pass-through) which will allow you to tunnel the serial communication from the Zigbee SoC inside the ZB-GW03 is a serial device to Zigbee2MQTT or ZHA via a socket. See → https://tasmota.github.io/docs/Serial-to-TCP-Bridge/

Also, Zigbee2MQTT is not a MQTT server (also known as a MQTT broker), but instead Zigbee2MQTT
is just MQTT client, so it can not connect to other MQTT clients like the native Zigbee2Tasmota (Z2T) Zigbee gateway.

Here are a few links to some guides about ZB-GW03 and Sonoff ZBBridge which might help you:

Hi Hedda, good day,

I’m the confused one, for sure.
Reading your post I understand that, when I receive the ZB-Gw03 it already arrives with Tasmota and a native configuration of Zigbee2Tasmota that should be an internal device soft that allows Tasmota to communicate with the zigbee antenna.
As long as I can read these days, use the coodinator via Z2T is not easy for non inizied ussers so I want the ZB-GW03 as a remote Zigbee Coordinator for Zigbee2MQTT as I like to think that it would be the easier way to manage the zigbee devices, maybe I’m wrong. I have also a Mosquitto MQTT broker installed in my HA and running.

Presently I have a HA OS running in a virtual box machine over Mac OS with a Mosquitto broker, I have installed the zb-gw03 connected directly to my router, closer to where I will have almost all of my zigbee devices.

I will read detailed the links that you have referenced in your post about disabling the Zigbee2Tasmota and the installation of ser2net, but any help will always be welcomed.
Edited: Ser2Net seems that must be used when you have a coordinator installed in another machine, than is not the case, it is its own machine.

Many thanks for your time and interest!

Well, I think that I’m still a bit confused.
I would like to use the zb-gw03 as a zigbee ethernet coordinator for zigbee2mqtt, seems that Z2M would be the easier way for me to integrate devices later (I needed a couple of hours to switch on/Off my light from Node-Red)
Understood that, as I have preinstalled Zigbee2Tasmota I must disable it before starting other configurations, but I cannot find the way. I have tried reassigning GPIOs 2 & 4 from ZBTX & ZBRX to TCP TX & TCPRX and starting TCP service in Port 8888 latter, it let me connect Zigbee2MQTT to the hub but it doesn’t receive any info, neither from the hub itself. Is there any command that I have to RUN to disable ZIgbee2Tasmota in the HUB? I cannot find it in the documentation.

Another way that I could try would be installing ESPhome firmware by Syssi, but I have not clear if it has any issue with the 2023.5.1 version of ESPHome that I have installed, and I’m not sure to downgrade it without harming two devices that I already have connected.

Sorry for another crying brick.

Regards from Huelva.

Suggest you ask that in the Tasmota community → https://github.com/arendst/Tasmota/discussions

Same here. I followed all the steps from here: How to Convert the Sonoff Zigbee Bridge into a Router / Repeater | digiblurDIY
But I cannot pair the device to my Zigbee network.

Were you able to find a solution?

Hi I’m using a ZB-GW03 ethernet gateway with Tasmota and a zigbee smart plug connected to it.
Plug is publishing its states power consumption… when I log to tasmota console with the IP adress of the gateway.
But I’m not able to sort out what should be the command to switch on or off this smart plug either from Tasmota console first, then from MQTT explorer and finally from HOME ASSITANT

23:00:57.964 MQT: tele/tasmota_2D60CC/PC_Tuya29/SENSOR = {"ZbReceived":{"0xFB25":{"Device":"0xFB25","Name":"PC_Tuya29","AppVersion":77,"0000/FFE2":54,"0000/FFE4":0,"Endpoint":1,"LinkQuality":144}}}
23:01:24.746 MQT: tele/tasmota_2D60CC/PC_Tuya29/SENSOR = {"ZbReceived":{"0xFB25":{"Device":"0xFB25","Name":"PC_Tuya29","RMSVoltage":241,"RMSCurrent":0,"ActivePower":0,"CurrentSummationDelivered":"0x000000000023","Endpoint":1,"LinkQuality":141}}}

Hope I’m clear enough

The Zigbee section in this forum is really about Home Assistant’s built-in ZHA integration and Zigbee devices that use that native component, so this is not the best or correct place to post a question about Tasmota and/or MQTT.

You need to instead post that question as a new discussion question to the Tasmota community → https://github.com/arendst/Tasmota/discussions

Zigbee2Tasmota is a stand-alone Zigbee gateway that is build into Tasmota with embeeded MQTT and really has nothing directly to do with Home Assistant so as such unlikley anyone here can help → https://tasmota.github.io/docs/Zigbee/

We can only help here if using If you are using togther with ZHA via Ser2Net, as then Tasmota is only passing bytes between the ZHA as Zigbee gateway host application and the Zigbee radio chip firmware.

Alternatively could try create a new seperate post in the the third-party integration sections and tag it with MQTT → https://community.home-assistant.io/c/third-party/15

Hi Hedda
Sorry for not beeing at the right place (Title was so long that I got confused). I’ll open a new topic as I do not want to use ZHA & Z2M because I have already 2 Lidl hacked gateway connected to them. I was looking to use this one as an independant one because of the ESP32 to publish to the broker and read with HA the states from the broker.
Anyway thanks

I wanted to use the zb-gw03 as a zigbee router. At this point I bought the version that comes with tasmota pre-installed and already works as a gateway in a second ZigBee instance but I wanted to transform it into a router first to have everything on the same ZigBee network.

Do you recommend using Tasmota or converting to Esphome?
I am using zigbee2mqtt.

You simply need to flash the router firmware to the ZigBee part. Neither Tasmota or Esphome have any use afterwards.