Zigbee2tasmota variables and ways to extract them from msg.payload

Looking at the list of key/values I'm now able to extract from msg.payload via zigbee2tasmota and MQTT, I thought it might be useful to share them in jsonata format (for extraction) and for others to share theirs as well. The following are from a bunch of sensors: BlitzWolf temp/humidity & water, IKEA tradfri motion, Wiser thermostats and the IKEA tradfri remote control.

{   "linkQuality": **.LinkQuality,  
    "waterLeak": **.Water,
    "power": **.Power,
    "dimmerUp": **.DimmerUp,
    "dimmerDown": **.DimmerDown,
    "dimmerMove": **.DimmerMove,
    "dimmerStepDown": **.DimmerStepDown,
    "dimmerStop": **.DimmerStop,
    "arrowClick": **.ArrowClick,
    "arrowHold": **.ArrowHold,
    "arrowRelease": **.ArrowRelease,
    "temperature": **.Temperature,
    "humidity": **.Humidity,
    "temperatureRoom": $each($.ZbReceived.*, function($v){$contains($string($v), /^ENV/) ? $number($split($v,",")[2])/100}),
    "humidityRoom": $each($.ZbReceived.*, function($v){$contains($string($v), /^ENV/) ? $number($split($v,",")[3])/100})
 }

The clever parts of the jsonata came from this thread Jsonata test works but doesn’t in the flow helped by @UnborN and @E1cid .

1 Like

Do you know how to ask for Zbinfo data from a device with node-red
I am searching for the correct mqtt/json statement in node-red to acquire ZbInfo from a device.
I have tried many combinations, but get :
stat/ZBridge/RESULT = Unrecognized zigbee command: Zbinfo or
stat/ZBridge/RESULT = {"Command":"Unknown"} or
stat/ZBridge/RESULT = {"ZbSend":"Unknown device"}
in Node-red.
When I use Zbinfo in the console from the device, the response via MQTT in node-red is a complete json from the device with all the attributes

You will need to send it to the cmnd topic, not stat. Unless i am reading it incorrectly.

Note that I have switched the topic prefix. Specify the hex value of the device as payload.
If you leave the payload empty, you get them all.

1 Like

Thanks,
I tried so many combinations, most with zbsend in it.
But I just realizing now that there 2 levels, the Tasmota level and the zigbee level.
I think I was too busy with the zigbee level while zbinfo is tasmota level.

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