# Wave not disply correctly

**URL:** <https://discourse.nodered.org/t/wave-not-disply-correctly/66260>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [10 August 2022 03:58 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260 "2022-08-10T03:58:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kai](https://discourse.nodered.org/u/Kai)\
**Post date:** [10 August 2022 03:58 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/1 "2022-08-10T03:58:27Z")

</div>

Hi, my {{unit}} variable doesnt work for wave,

I was trying to set the gauge value by pass the msg.unit to my node

and it works for gauge, donut and compass

only doesnt work for wave type of gauge

![setting](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/3/03a4ccd032471ce2c59e71a8664e7ce755ec3eae.png)  
 ![ui](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/f/8f982be7655c7fe535a92bc0eda3dadaba71e32d.png)

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [10 August 2022 07:50 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/2 "2022-08-10T07:50:58Z")

</div>

It look like a cache problem.  
Doees clearing your browser cache resolve it?

---

<div class="post-metadata">

**Author:** ![Kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kai](https://discourse.nodered.org/u/Kai)\
**Post date:** [10 August 2022 07:58 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/3 "2022-08-10T07:58:42Z")

</div>

nope, after clear my browser cache, the problem still persists

---

<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:** [10 August 2022 08:34 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/4 "2022-08-10T08:34:36Z")

</div>

What version of node-red-dashboard are you using?

Add a debug node set to output the complete message and show us what is there.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [10 August 2022 08:48 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/5 "2022-08-10T08:48:13Z")

</div>

Ok. After I changed the field from {{something else}} to {{units}} the Level gauge didn't change as readily as the standard one, but reloading with ctrl F5 fixed it for me.

Something odd seems to be going on.

---

<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:** [10 August 2022 09:02 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/6 "2022-08-10T09:02:42Z")

</div>

On intial startup, if a message containing msg.units has not been sent then `{{units}}` is displayed. Then when a message containing msg.units is sent it needs a page refresh to update it. Similarly if the units text is dynamically changed then it takes a refresh for it to appear.  
Also it does seem possible to get into a mode, after sending a message with no msg.units to get it stuck in a mode where the units keeps just displaying as `{{units}}`.

---

<div class="post-metadata">

**Author:** ![Kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kai](https://discourse.nodered.org/u/Kai)\
**Post date:** [10 August 2022 09:09 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/7 "2022-08-10T09:09:43Z")

</div>

the dashboard version is 3.1.7

and below is the complete output message:

{"payload":null,  
"socketid":"Z8jyIBRc9qb5ag2OAAIm",  
"socketip":"192.168.8.24",  
"\_msgid":"b398f8a38a01d793",  
"unit":"unit4",  
"ui\_control":{  
"min":0,  
"max":100,  
"gtype":"wave"  
},  
"topic":"gauge4"}

---

<div class="post-metadata">

**Author:** ![Kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kai](https://discourse.nodered.org/u/Kai)\
**Post date:** [10 August 2022 09:19 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/8 "2022-08-10T09:19:15Z")

</div>

the weird thing is, I changed the variable from {{unit}} to {{units}}

and it works, below is the flow:

```auto
[
    {
        "id": "9cf6c90f9c70163d",
        "type": "inject",
        "z": "e418283ccb0b6a1e",
        "name": "",
        "props": [
            {
                "p": "unit",
                "v": "test",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "x": 539.9999771118164,
        "y": 1807.7777004241943,
        "wires": [
            [
                "c68e5033c631254f"
            ]
        ]
    },
    {
        "id": "c68e5033c631254f",
        "type": "ui_gauge",
        "z": "e418283ccb0b6a1e",
        "name": "",
        "group": "e3299fb737f29dc9",
        "order": 5,
        "width": 0,
        "height": 0,
        "gtype": "wave",
        "title": "gauge",
        "label": "{{unit}}",
        "format": "{{value}}",
        "min": 0,
        "max": 10,
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "",
        "seg2": "",
        "className": "",
        "x": 679.9999771118164,
        "y": 1807.7777004241943,
        "wires": []
    },
    {
        "id": "0379de7260d74035",
        "type": "inject",
        "z": "e418283ccb0b6a1e",
        "name": "",
        "props": [
            {
                "p": "units",
                "v": "test",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "x": 530,
        "y": 1860,
        "wires": [
            [
                "83a84169f4f94a5f"
            ]
        ]
    },
    {
        "id": "83a84169f4f94a5f",
        "type": "ui_gauge",
        "z": "e418283ccb0b6a1e",
        "name": "",
        "group": "e3299fb737f29dc9",
        "order": 5,
        "width": 0,
        "height": 0,
        "gtype": "wave",
        "title": "gauge",
        "label": "{{units}}",
        "format": "{{value}}",
        "min": 0,
        "max": 10,
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "",
        "seg2": "",
        "className": "",
        "x": 670,
        "y": 1860,
        "wires": []
    },
    {
        "id": "e3299fb737f29dc9",
        "type": "ui_group",
        "name": "Gauge",
        "tab": "8f03e639.85956",
        "order": 2,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "8f03e639.85956",
        "type": "ui_tab",
        "name": "Home",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

```

---

<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:** [10 August 2022 09:22 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/9 "2022-08-10T09:22:42Z")

</div>

> [@Kai](#):
>
> the weird thing is, I changed the variable from {{unit}} to {{units}}
> 
> and it works

I suspect that if you change it back and refresh the page it will work again. Restart node red and refresh the page _after_ sending it the first message with a valid units. As I said, it does seem possible to get it stuck in a mode where it doesn't work.

---

<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:** [10 August 2022 09:24 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/10 "2022-08-10T09:24:10Z")

</div>

Also make sure you _never_ send it a message without a valid units (or unit or whatever) property.

---

<div class="post-metadata">

**Author:** ![Kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kai](https://discourse.nodered.org/u/Kai)\
**Post date:** [10 August 2022 09:34 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/11 "2022-08-10T09:34:50Z")

</div>

nope, after I change it back to "unit", the problem still persists 😥

even I had cleaned the browser cache and restarted the device

but it's ok as now I just using other word besides of the word "unit" to make it works :))

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 September 2022 09:35 UTC](https://discourse.nodered.org/t/wave-not-disply-correctly/66260/12 "2022-09-09T09:35:10Z")

</div>

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