I have one Zigbee irrigation device, paired with Sonoff ZB Bridge running Tasmota 14.1.0 communicating with an MQTT server over TLS far away.
This ZB Bridge is not connected to the same network as the HA, so autodiscovery etc does not work.
But status shows up in topic Spain/ZB/SENSOR as
{“ZbReceived”:{“0xF6B8”:{“Device”:“0xF6B8”,“E001/D040”:null,“E001/0C03”:null,“Power”:0,“E001/0F06”:null,“E001/0000”:0,“Endpoint”:1,“LinkQuality”:63}}}
which can be used as a trigger in Home Assistant with this piece of yaml:
platform: mqtt
topic: tele/Spain/ZB/SENSOR
value_template: "{{ value_json.ZbReceived['0xF6B8'].Power | default(0) }}"
payload: 1
and acted upon, so, at least we can know if it is on, and similar if it’s off.
So how can you control it, I.E. turn irrigation on and off?
And this was the one question I couldn’t find an answer to to for many months.
But this yaml piece turns the device on:
service: mqtt.publish
data:
qos: 0
retain: false
topic: cmnd/Spain/ZB/ZbSend
payload: "{ \"device\": \"0xF6B8\", \"send\": { \"Power\": \"On\" } }"
…and I can now control a Zigbee device outside my local network with only mqtt commands. Hope this helps someone.