Howto set a Zigbee switch

I'm using Sonoff Zigbee Bridge with Tasmota. Furthermore I'm using Node-red but whatever I do I can't set my Zigbee switch. I'm familliar with the following topic: Tradfri / ZBbridge (zigbee) / Tasmota commands in Node-Red and this helps me a little but further but I don't got it to work. They stated the following:

{
  "topic":"cmnd/yourbridge/ZbSend",
  "payload":{"Device":"0x7509","Send":{"Power":"off"}}
}

On my bridge console I can see the following:

tele/zigbee/SENSOR = {"ZbReceived":{" Aq1":{"Device":"0xF885","Name":" Aq1","Illuminance":15,"Occupancy":1,"Endpoint":1,"LinkQuality":58}}}

Hereby my flow:

[{"id":"434ba335.1c8b7c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"25ebc363.49ce9c","type":"mqtt out","z":"434ba335.1c8b7c","name":"","topic":"tele/zigbee/SENSOR","qos":"2","retain":"","broker":"89bfc099.8b73e","x":560,"y":240,"wires":},{"id":"68581e1e.8842","type":"inject","z":"434ba335.1c8b7c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{"Device":"0xDA52","Send":{"Power":"Toggle"}}","payloadType":"json","x":150,"y":240,"wires":[["25ebc363.49ce9c"]]},{"id":"89bfc099.8b73e","type":"mqtt-broker","z":"","name":"","broker":"192.168.1.232","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

What am I doing wrong? It would help me a lot if somebodye shows me a flow that actually works

1 Like

Hi,

With the Tasmota Zigbee bridge I'm using
cmnd/ZigbeeBridge/Zbsend as topic and

{
    "device": "TestLamp",
    "send": {
        "Dimmer": 25
    }
}

as payload.

Here's a sample flow:

[{"id":"2ae88aaf.e2fa8e","type":"mqtt out","z":"c4d9fae1.52009","name":"TestLamp","topic":"","qos":"0","retain":"","broker":"2f537664.491afa","x":1100,"y":4820,"wires":[]},{"id":"e13c799b.23f4f8","type":"inject","z":"c4d9fae1.52009","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cmnd/ZigbeeBridge/Zbsend","payload":"{\"device\":\"TestLamp\",\"send\":{\"Dimmer\":25}}","payloadType":"json","x":770,"y":4820,"wires":[["2ae88aaf.e2fa8e"]]},{"id":"2f537664.491afa","type":"mqtt-broker","name":"MosquittoLocal","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":false,"protocolVersion":4,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

This works fine for me.
You can adapt this sample very easy to use it with a switch.

Thanks but I still can't get it to work :cry:

My payload is: {"device":"zbSchakelaar","send":{"Power":"Toggle"}}
My Topic is: tele/zigbee/SENSOR/ZbSend
Hereby the flow I'm using:

[{"id":"434ba335.1c8b7c","type":"tab","label":"Zigbee","disabled":false,"info":""},{"id":"41e6870f.95be88","type":"mqtt out","z":"434ba335.1c8b7c","name":"TestZigbee","topic":"","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"89bfc099.8b73e","x":510,"y":440,"wires":[]},{"id":"1338adea.a0c8d2","type":"inject","z":"434ba335.1c8b7c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"tele/zigbee/SENSOR/ZbSend","payload":"{\"device\":\"zbSchakelaar\",\"send\":{\"Power\":\"Toggle\"}}","payloadType":"json","x":170,"y":440,"wires":[["41e6870f.95be88","6d573cbe.79f4d4"]]},{"id":"6d573cbe.79f4d4","type":"debug","z":"434ba335.1c8b7c","name":"ZIGBEE","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":460,"y":540,"wires":[]},{"id":"89bfc099.8b73e","type":"mqtt-broker","name":"","broker":"192.168.1.232","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

But no sign of activity in the console when I activate the flow.

The only thing that's working is when I directly enter the following command in the console ZbSend { "device":"zbSchakelaar", "send":{"Power":"Toggle"} }

I do have strong doubts about the correctness of the used topic: tele/zigbee/SENSOR/ZbSend but I've tried several other options.

Hopefully can somebody help me

Topic should start with cmnd, rest of the topic depends on the settings you made in Tasmota web interface.
Tele topic is what the Tasmota bridge send to you, cmnd is what you want that the Tasmota bridge to do.

"topic":"cmnd/yourbridge/ZbSend" I do not use zigbee2tasmota (I use zigbee2MQTT) but I think that yourbridge should be replaced with the name of your bridge. For example edje11 uses ZigbeeBridge

I also use MQTT-Explorer for checking MQTT messages. Helps when you want to see exactly what is being sent & received

Goto your Tasmota webinterface, then goto the Information button.
Half way the page you find the needed topic under Mqtt Full topic.
Use this topic and add /ZbSend to it for your topic in Node-red.

Tasmota

Thanks I finally got it working. My MQTT FULL TOPIC turns out to be cmnd/zigbee so the topic cmnd/zigbee/ZbSend and payload {"Device":"ZbSchak1","send":{"Power":"Toggle"}} did it form me.
Thank you all guys!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.