Tasmota icon indicating copy to clipboard operation
Tasmota copied to clipboard

ZB Smart Gateway

Open telizynav opened this issue 6 months ago • 5 comments

I have a Smart Gateway with Tasmota firmware. When switching the module from Sonoff Basic to Sonoff ZBGateway, the device resets the Wi-Fi settings and reboots cyclically every 40 seconds

Image

zb.log

Image

telizynav avatar Jun 16 '25 09:06 telizynav

Better ask questions in "Discussions" instead of "Issues".

Restarting after 40 seconds is a symptom of a gpio configured as a "Button" registering as pushed for 40 seconds straight. This is a Tasmota recovery feature.

Wondering if your socalled "smart gateway" is specifically the Sonoff ZBBridge, which is what the "normal" ESP8266 Zigbee bridge device is? Or if you while flashing did "something" to the physical button or its gpio connection.

sfromis avatar Jun 16 '25 11:06 sfromis

How to fix this? https://aliexpress.ru/item/1005009155721872.html?spm=a2g2w.orderdetail.0.0.3f244aa688opB8&sku_id=12000048127877344

telizynav avatar Jun 16 '25 12:06 telizynav

Configure gpios to match your hardware. Maybe simply try removing the Button config from the template.

sfromis avatar Jun 16 '25 14:06 sfromis

Thank you, I removed GPIO Button from the template. {"NAME":"Sonoff ZbBridge","GPIO":[320,3552,0,3584,5312,0,0,0,640,576,608,0,0,0],"FLAG":0,"BASE":75} Rule1 ON System#Boot do TCPStart 8888 endon I tried to do GPIO2 TCPtx, GPIO15 TCPrx, but the ZHA does not connect. Telnet to 8888 is OK.

zb1.log

What should I do?

telizynav avatar Jun 16 '25 15:06 telizynav

Again, do config to match your hardware. Using gpio2 for TX and gpio15 for rx is highly unusual. Are you quite sure about that? Do you have a good source for that odd config?

The template you posted has the common setup with TX on gpio1 and RX on gpio3.

sfromis avatar Jun 16 '25 16:06 sfromis

This template was already in the device when I bought it. The seller does not answer, I can only guess

telizynav avatar Jun 16 '25 21:06 telizynav

Gpio1 = ZBtx, gpio3 = ZBrx. TCPStart is working only with gpio's TCPtx/rx

telizynav avatar Jun 16 '25 22:06 telizynav

What I meant was that when you tried to modify the template you posted, you should not just select completely different gpios for tx/rx (sure, in the TCP variant, of course), meaning that you have to use gpio 1/3, unless you have very specific reasons to deviate.

sfromis avatar Jun 16 '25 22:06 sfromis

If gpio1-3 = TCP - i can connect the device to ZHA, but ZB dont working. If gpio1-3 = ZB - vice versa

telizynav avatar Jun 17 '25 07:06 telizynav

Are you expecting Tasmota to provide Zigbee at the same time as connecting to ZHA. That's not how it works. It is either-or.

sfromis avatar Jun 17 '25 07:06 sfromis

Then how to connect Tasmota Bridge to Home Assistant ?

telizynav avatar Jun 17 '25 08:06 telizynav

You did not answer my question about your expectations. But if you only want ZHA operation (without Tasmota Z2T active), you need to configure ZHA appropriately for it.

If you are able to have Zigbee working as Z2T (locally in Tasmota), this would suggest that you at least have the right gpios.

sfromis avatar Jun 17 '25 08:06 sfromis

Zigby works locally, devices are linked. My expectations are to control the Bridge from Home Assistant. Ideally - Zigbee2Mqtt.

telizynav avatar Jun 17 '25 09:06 telizynav

If you want to use Zigbee2MQTT (Z2M) or ZHA, you cannot also use the devices locally. When you config for TCP, there is no longer anything Zigbee done in Tasmota, as control over the Zigbee chip can only be from one coordinator, either Z2T, Z2M or ZHA.

And if Zigbee2MQTT is what you want to use, you still need to configure the exact right details there, to make it work.

sfromis avatar Jun 17 '25 09:06 sfromis

Got it. Thanks. Which Tasmot template should I use to connect to Zigbee2MQTT ?

telizynav avatar Jun 17 '25 10:06 telizynav

Well, what you need is what you already posted about doing, modify the config of TX/RX pins to be the TCP variant, just make sure to use the right gpios. And then you also need to config Zigbee2MQTT to use the connection.

sfromis avatar Jun 17 '25 11:06 sfromis