Problem with Sonoff Zigbee Tasmota Flash Device

Hello to all.

I have a little Problem with my Zigbee Devices.
First I want to explain what I did.

I am running a Raspi with Home Assistant and I am using Node Red for my Sensors.
I flashed a Sonoff Zigbee device and connected a Sonoff Temp sensor.
Then I made a Gauge to show Temp and Humid on my Dashboard.

MQTT IN --> JSON --> 2x Gauge

This is working, but sometimes the Zigbee Temp sensor is reporting only one Value, the temp or the humid. When the humid is reporting over Mqtt the temp gauge ist showing 0.
When the temp is reporting, the humid gauge is showing 0.
I think this is because when one value is missing the gauge is automatically showing the value zero.

Can anybody help me with this Problem ?

My first solution is to place a function in between with an if loop, when there is no value take the previous value. But this is not working.

Is there an easy way to solve the problem ?

Many thanks.

Instead of sending the mqtt data directly into the gauge, send it to flow variable instead and use that to display in the gauge.

Or add a switch node:

So easy, both are working, perfect ...THX a lot.

Stop, the solution with the switch Node is not working.
When only one value is reporting the other gauge is showing 0.

Put a switch node in front of both gauges with the "has key" operator. So you stop other kind of measurements.

I added this one, but the same problem occured.

For the gauge I added this value string

G1: {{payload.ZbReceived["0xD348"].Temperature}}
G2: {{payload.ZbReceived["0xD348"].Humidity}}

Add debug nodes showing what is going to the gauges and I imagine it will be clear what is happening.
Also have a debug showing what is going into the Switch node. Give the debug nodes names so it is clear which is which.

What topic are you listening to ? should be something like; zigbee_bridge/tele/SENSOR

The Topic is tele/tasmota_zigbee-1/SENSOR

And what is the debug output when listening for a while ?
I don't get any ZbReceived messages (perhaps because i named my devices ?)

I don't think so, when I named my devices I always get an ZbReceived message.
I think this depends on the IN Node.
I took Mqtt in: tele/tasmota_zigbee-1/SENSOR

It doesnt matter so much, the key is to look at the messages.

ZBReceived depends on SetOption100

https://tasmota.github.io/docs/Commands/#setoption100

1 Like

Ah yes, i changed more default settings that's right.

We need to see the debug output from MQTT, that has been asked multiple times

2 Likes

Here is one of the message.
{"ZbReceived":{"ZTempBuero":{"Device":"0xD348","Name":"ZTempBuero","Humidity":46.6,"Endpoint":1,"LinkQuality":10}}}

Note: I've changed:

SetOption83 1
and
SetOption100 1

I also asked for the debug of what is going into the gauges, so it can be seen why the value is going to 0.

That won't give any output from the Switch node you showed, where you are testing msg.payload.ZBReceived["0xd348"] as that property does not exist.