# Problem with Sonoff Zigbee Tasmota Flash Device

**URL:** <https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518>\
**Category:** Dashboard\
**Created:** [21 January 2021 22:06 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518 "2021-01-21T22:06:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Markus667](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Markus667](https://discourse.nodered.org/u/Markus667)\
**Post date:** [21 January 2021 22:06 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/1 "2021-01-21T22:06:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [22 January 2021 05:48 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/2 "2021-01-22T05:48:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [22 January 2021 10:32 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/3 "2021-01-22T10:32:25Z")

</div>

Or add a switch node:

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/c/bcdeae2c52eaba0e83cb0496c7a02da94aac1393.png)

---

<div class="post-metadata">

**Author:** ![Markus667](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Markus667](https://discourse.nodered.org/u/Markus667)\
**Post date:** [22 January 2021 18:22 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/4 "2021-01-22T18:22:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Markus667](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Markus667](https://discourse.nodered.org/u/Markus667)\
**Post date:** [22 January 2021 19:33 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/5 "2021-01-22T19:33:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![EmilWesselink](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/emilwesselink/32/65829_2.png) [@EmilWesselink](https://discourse.nodered.org/u/EmilWesselink)\
**Post date:** [22 January 2021 22:46 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/6 "2021-01-22T22:46:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Markus667](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Markus667](https://discourse.nodered.org/u/Markus667)\
**Post date:** [23 January 2021 07:19 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/7 "2021-01-23T07:19:54Z")

</div>

I added this one, but the same problem occured.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/1/61dd750c17283922630d881d870ee4c155ecf5fb.png)

For the gauge I added this value string

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 January 2021 09:45 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/8 "2021-01-23T09:45:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [23 January 2021 10:38 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/9 "2021-01-23T10:38:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Markus667](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Markus667](https://discourse.nodered.org/u/Markus667)\
**Post date:** [23 January 2021 10:43 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/10 "2021-01-23T10:43:46Z")

</div>

The Topic is tele/tasmota\_zigbee-1/SENSOR

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [23 January 2021 10:55 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/11 "2021-01-23T10:55:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Markus667](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Markus667](https://discourse.nodered.org/u/Markus667)\
**Post date:** [23 January 2021 11:46 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/12 "2021-01-23T11:46:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [23 January 2021 11:59 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/13 "2021-01-23T11:59:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [23 January 2021 11:59 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/14 "2021-01-23T11:59:48Z")

</div>

`ZBReceived` depends on SetOption100

[https://tasmota.github.io/docs/Commands/#setoption100](https://tasmota.github.io/docs/Commands/#setoption100)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [23 January 2021 12:00 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/15 "2021-01-23T12:00:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 January 2021 12:01 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/17 "2021-01-23T12:01:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Markus667](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Markus667](https://discourse.nodered.org/u/Markus667)\
**Post date:** [23 January 2021 12:03 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/18 "2021-01-23T12:03:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [23 January 2021 12:04 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/19 "2021-01-23T12:04:17Z")

</div>

Note: I've changed:

`SetOption83 1`  
and  
`SetOption100 1`

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 January 2021 12:10 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/20 "2021-01-23T12:10:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 January 2021 12:13 UTC](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518/21 "2021-01-23T12:13:28Z")

</div>

> [@Markus667](#):
>
> {"ZbReceived":{"ZTempBuero":{"Device":"0xD348","Name":"ZTempBuero","Humidity":46.6,"Endpoint":1,"LinkQuality":10}}}

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.

[Next page](https://discourse.nodered.org/t/problem-with-sonoff-zigbee-tasmota-flash-device/39518.md?page=2)
