Tasmota Sonoff ethernet based gateway configuration

Im looking into how to add zigbee devices to HA with sonoff tasmota ethernet gateway brdige, I recently purchased (see link https://a.aliexpress.com/_ooK11yi)

not sure how to configure
the last post on this in this forum is 3 years old and the links to guides there not working

I added tasmota integration to HA

i can see tasmota device console / web page and can control it

my questions:

  1. i dont understand if i need to flash to the device or its already set ? the existing tutorials are quite old 3 years old and refer to older versions of f/w. My f/w version is tasmota 13.2.0

  2. How do I add zigbee devices? i have several tuya zigbee sensors, i understand i need to unpair them from tuya app and add them some how to tasmota integration? how it will discover them ?

You can use the bridge with Zigbee2MQTT or ZHA, or you can use Zigbee2Tasmota.

In case you use Zigbee2Tasmota, there is no discovery, you have to define your Zigbee devices in .yaml

1 Like

hi
i want to use ZHA
in order to use ZHA, I need to connect to the tasmota with TCP port
but i cant find proper instructions how to set it int asmota (which SetOption, etc)
all the youtube guides i found are 3 years old and suggest flashing the tasmota with much older version that i have
if you can point me to howto configure the tasmota
thanks

Use the following command to update the template:

backlog template {"NAME":"ZHA-bridge","GPIO":[0,0,5472,0,5504,0,0,0,5793,5792,320,544,5536,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,608,640,32,0,0,0,0,0],"FLAG":0,"BASE":1} ; module 0

Enter the following from the console to turn on the webserver for the Zigbee radio:

backlog rule1 on system#boot do TCPStart 8888 endon ; rule1 1 ; tcpstart 8888

Once the console reboots you should see the server has started on Port 8888:

17:35:58 TCP: Starting TCP server on port 888817:35:58 RSL: stat/tasmota/7FC5B0/RESULT = {"TCPStart":"Done"}
1 Like

thank you!
i now was able to add ZHA to connect to the tcp port
next question: I have few zigbee tuya devices (switches/door/movement sesnors)
How do i connect them to ZHA?
I understand i need to disconnect them first from Tuya cloud app
but do i need to configure the Radio channel of ZHA so it will talk to these zigbee devices?

ZHA prefers to use Zigbee channel 15 by default. You can change this using YAML configuration, but this only works if there’s no existing network.

Follow the pairing/reset instructions of the device.

thank u very much!
I was able to add one such zigbee tuya button switch
I can see it in ZHA devices
but i dont see entities related to the switch status (there r 2 push buttons on that switch)
I attach shot of the button and link
https://a.aliexpress.com/_olLipf8

i understand maybe not all tuya devices are supported in ZHA
is there a way to know which ones? or is there a way to update their f/w for this?

from your link:

Best resources are

and

1 Like

thanks very much!
I didnt even see the note …
ok will try to find compatible devices
may thanks!!!

hi
so it looks like it was working, then i see it disconnects often
both tasmota and my HA are connected via ethernet cable to same switch
my HA is running on Debian VM on UTM on Mac
I normally dont have problems accessing anything on the home network or intenet from HA

In Tasmota logs

23:19:06.627 ETH: Connected at 100Mbps Full Duplex, Mac 08:D1:F9:2D:29:57, Hostname tasmota-2D2954-2388-eth
23:19:12.625 ETH: Disconnected
23:19:14.627 ETH: Connected at 100Mbps Full Duplex, Mac 08:D1:F9:2D:29:57, Hostname tasmota-2D2954-2388-eth
23:19:16.625 ETH: Disconnected
23:19:20.627 ETH: Connected at 100Mbps Full Duplex, Mac 08:D1:F9:2D:29:57, Hostname tasmota-2D2954-2388-eth
23:20:26.625 ETH: Disconnected
23:20:28.627 ETH: Connected at 100Mbps Full Duplex, Mac 08:D1:F9:2D:29:57, Hostname tasmota-2D2954-2388-eth
23:20:30.625 ETH: Disconnected
23:20:32.627 ETH: Connected at 100Mbps Full Duplex, Mac 08:D1:F9:2D:29:57, Hostname tasmota-2D2954-2388-eth

and in ZHA it becomes “initializing” and only resets after i restart HA completely
HA logs i see:

2024-05-15 18:14:51.676 WARNING (MainThread) [zigpy.application] Zigbee channel 25 utilization is 82.35%!
2024-05-15 18:14:51.677 WARNING (MainThread) [zigpy.application] If you are having problems joining new devices, are missing sensor updates, or have issues keeping devices joined, ensure your coordinator is away from interference sources such as USB 3.0 devices, SSDs, WiFi routers, etc.
2024-05-15 18:15:00.977 ERROR (MainThread) [bellows.uart] Lost serial connection: ConnectionResetError(104, 'Connection reset by peer')
2024-05-15 18:15:00.980 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2024-05-15 18:15:00.981 ERROR (MainThread) [bellows.ezsp] Exception running handler
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/bellows/ezsp/__init__.py", line 494, in handle_callback
    handler(*args)
  File "/usr/local/lib/python3.12/site-packages/bellows/zigbee/application.py", line 626, in ezsp_callback_handler
    self.connection_lost(args[0])
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 688, in connection_lost
    self.listener_event("connection_lost", exc)
  File "/usr/local/lib/python3.12/site-packages/zigpy/util.py", line 50, in listener_event
    for listener, include_context in self._listeners.values():
RuntimeError: dictionary changed size during iteration
2024-05-15 18:15:00.997 WARNING (MainThread) [homeassistant.helpers.dispatcher] Unable to remove unknown dispatcher <bound method GroupProbe._reprobe_group of <homeassistant.components.zha.core.discovery.GroupProbe object at 0xffff8a878830>>
2024-05-15 18:15:00.997 WARNING (MainThread) [homeassistant.helpers.dispatcher] Unable to remove unknown dispatcher <bound method GroupProbe._reprobe_group of <homeassistant.components.zha.core.discovery.GroupProbe object at 0xffff8a878830>>
2024-05-15 18:15:00.997 WARNING (MainThread) [homeassistant.helpers.dispatcher] Unable to remove unknown dispatcher <bound method GroupProbe._reprobe_group of <homeassistant.components.zha.core.discovery.GroupProbe object at 0xffff8a878830>>
2024-05-15 18:15:28.973 WARNING (MainThread) [custom_components.localtuya.common] [bfe...pwl] Failed to connect to 192.168.0.172: [Errno 113] Connect call failed ('192.168.0.172', 6668)
2024-05-15 18:15:30.705 ERROR (MainThread) [bellows.uart] Lost serial connection: ConnectionResetError(104, 'Connection reset by peer')
2024-05-15 18:15:30.705 ERROR (MainThread) [bellows.ezsp] NCP entered failed state. Requesting APP controller restart
2024-05-15 18:15:30.707 ERROR (MainThread) [bellows.ezsp] Exception running handler
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/bellows/ezsp/__init__.py", line 494, in handle_callback
    handler(*args)
  File "/usr/local/lib/python3.12/site-packages/bellows/zigbee/application.py", line 626, in ezsp_callback_handler
    self.connection_lost(args[0])
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 688, in connection_lost
    self.listener_event("connection_lost", exc)
  File "/usr/local/lib/python3.12/site-packages/zigpy/util.py", line 50, in listener_event
    for listener, include_context in self._listeners.values():
RuntimeError: dictionary changed size during iteration

ZHA and ezsp-based adapters don’t handle disconnects well. But I don’t know why it disconnects. Maybe check the Tasmota logs

strange as tasmota last log msg says connected

01:18:10.773 RUL: SYSTEM#BOOT performs "TCPStart 8888"
01:18:10.786 TCP: Starting TCP server on port 8888
01:18:10.789 RSL: RESULT = {"TCPStart":"Done"}
01:18:10.836 ETH: Disconnected
01:18:14.837 ETH: Connected at 100Mbps Full Duplex, Mac 08:D1:F9:2D:29:57, Hostname tasmota-2D2954-2388-eth
01:18:14.975 RSL: STATE = {"Time":"2024-05-16T01:18:14","Uptime":"0T00:00:06","UptimeSec":6,"Heap":145,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"Berry":{"HeapUsed":3,"Objects":37}}

the problem i think its ZHA
is there any config to change timeout for disconnect etc ?

See if Tasmota is not rebooting all the time.

Unfortunately no

Just to update
So it seams sometimes there glitches on the LAN , I have no idea why as both the gateway and the machine running HA are connected to same switch side by side cables
looks like both ZHA and Z2M have issues with reconnecting after such glitches
for Z2M, i need to restart Z2M integration and it solves the issue
Im checking for automation to detect this and do this automatically