# Jittering slider when input and output are equal

**URL:** https://discourse.nodered.org/t/jittering-slider-when-input-and-output-are-equal/33561
**Category:** Dashboard
**Created:** [30 September 2020 10:46 UTC](https://discourse.nodered.org/t/jittering-slider-when-input-and-output-are-equal/33561 "2020-09-30T10:46:46Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![DLug](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@DLug](https://discourse.nodered.org/u/DLug)
#### Post date: [30 September 2020 10:46 UTC](https://discourse.nodered.org/t/jittering-slider-when-input-and-output-are-equal/33561/1 "2020-09-30T10:46:47Z")

</div>

Hello,

when I feed the slider for my brightness with the current value and also set the same value when changing the slider I get the problem that the slider starts jittering and the brightness values are jumping around.

My flow looks like this:

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

How do I prevent this behaviour? I want my slider to mirror the current birghtness value as well as set the value with it.

Best regards

---

<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: [30 September 2020 10:58 UTC](https://discourse.nodered.org/t/jittering-slider-when-input-and-output-are-equal/33561/2 "2020-09-30T10:58:46Z")

</div>

Can you export a flow showing the problem, maybe use link nodes instead of mqtt. Presumably you have disabled Pass Through in the node.

---

<div class="post-metadata">

### Author: ![DLug](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@DLug](https://discourse.nodered.org/u/DLug)
#### Post date: [30 September 2020 14:38 UTC](https://discourse.nodered.org/t/jittering-slider-when-input-and-output-are-equal/33561/3 "2020-09-30T14:38:18Z")

</div>

This is my flow:

```auto
[
    {
        "id": "578b1f3e.dac6e",
        "type": "ui_slider",
        "z": "9f1ed1de.da5b7",
        "name": "",
        "label": "Helligkeit",
        "tooltip": "",
        "group": "fe456f98.7dca5",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "outs": "all",
        "topic": "",
        "min": 0,
        "max": "100",
        "step": 1,
        "x": 620,
        "y": 380,
        "wires": [
            [
                "aeda3227.cf9aa"
            ]
        ]
    },
    {
        "id": "7c3051b0.8bfae",
        "type": "function",
        "z": "9f1ed1de.da5b7",
        "d": true,
        "name": "",
        "func": "if (msg.payload !== \"0\")\n return {payload: 100};\nelse\n return {payload: 0};",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 464.4444351196289,
        "y": 323.3333320617676,
        "wires": [
            [
                "9c2c42b8.b38db"
            ]
        ]
    },
    {
        "id": "9c2c42b8.b38db",
        "type": "ui_switch",
        "z": "9f1ed1de.da5b7",
        "name": "",
        "label": "An/Aus",
        "tooltip": "",
        "group": "fe456f98.7dca5",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": false,
        "decouple": "true",
        "topic": "",
        "style": "",
        "onvalue": "100",
        "onvalueType": "num",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "num",
        "officon": "",
        "offcolor": "",
        "x": 614.4444351196289,
        "y": 323.3333320617676,
        "wires": [
            [
                "aeda3227.cf9aa"
            ]
        ]
    },
    {
        "id": "7c822d36.75d064",
        "type": "mqtt in",
        "z": "9f1ed1de.da5b7",
        "name": "",
        "topic": "denis/light/brightness",
        "qos": "2",
        "datatype": "utf8",
        "broker": "ce38412c.c11f7",
        "x": 200,
        "y": 180,
        "wires": [
            [
                "cf86f741.a78b58"
            ]
        ]
    },
    {
        "id": "c1e77bf8.7877a8",
        "type": "ioBroker out",
        "z": "9f1ed1de.da5b7",
        "name": "Denis Zimmer Helligkeitslevel",
        "topic": "deconz.0.Groups.4.level",
        "ack": "false",
        "autoCreate": "false",
        "stateName": "",
        "role": "",
        "payloadType": "",
        "readonly": "",
        "stateUnit": "",
        "stateMin": "",
        "stateMax": "",
        "x": 630,
        "y": 180,
        "wires": []
    },
    {
        "id": "aeda3227.cf9aa",
        "type": "mqtt out",
        "z": "9f1ed1de.da5b7",
        "name": "",
        "topic": "denis/light/brightness",
        "qos": "1",
        "retain": "",
        "broker": "ce38412c.c11f7",
        "x": 860,
        "y": 340,
        "wires": []
    },
    {
        "id": "cf86f741.a78b58",
        "type": "function",
        "z": "9f1ed1de.da5b7",
        "name": "str2Num",
        "func": "return {payload: Number(msg.payload)};",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 400,
        "y": 180,
        "wires": [
            [
                "c1e77bf8.7877a8"
            ]
        ]
    },
    {
        "id": "9457b274.b7c68",
        "type": "mqtt in",
        "z": "9f1ed1de.da5b7",
        "name": "",
        "topic": "denis/light/brightness",
        "qos": "2",
        "datatype": "utf8",
        "broker": "ce38412c.c11f7",
        "x": 200,
        "y": 340,
        "wires": [
            [
                "7c3051b0.8bfae",
                "578b1f3e.dac6e"
            ]
        ]
    },
    {
        "id": "fe456f98.7dca5",
        "type": "ui_group",
        "z": "",
        "name": "Licht",
        "tab": "12bbff51.05ec81",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false
    },
    {
        "id": "ce38412c.c11f7",
        "type": "mqtt-broker",
        "z": "",
        "name": "MQTT",
        "broker": "localhost",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": false,
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    },
    {
        "id": "12bbff51.05ec81",
        "type": "ui_tab",
        "z": "",
        "name": "Denis' Zimmer",
        "icon": "dashboard",
        "order": 4,
        "disabled": false,
        "hidden": false
    }
]

```

In the slider there is no option to pass through the message. I see this option only for the button but that element is not the problem.

---

<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: [30 September 2020 16:14 UTC](https://discourse.nodered.org/t/jittering-slider-when-input-and-output-are-equal/33561/4 "2020-09-30T16:14:32Z")

</div>

> [@Colin](#):
>
> Presumably you have disabled Pass Through in the node.

Did you see that comment?

---

<div class="post-metadata">

### Author: ![DLug](https://avatars.discourse-cdn.com/v4/letter/d/7c8e57/32.png) [@DLug](https://discourse.nodered.org/u/DLug)
#### Post date: [30 September 2020 16:57 UTC](https://discourse.nodered.org/t/jittering-slider-when-input-and-output-are-equal/33561/5 "2020-09-30T16:57:12Z")

</div>

See the comment under my code. I can't see any option in the slider settings.

There is only this option:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/742ec4e06d36090620981b27b0158b47ccaf5d04.png)

---

<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: [30 September 2020 18:08 UTC](https://discourse.nodered.org/t/jittering-slider-when-input-and-output-are-equal/33561/6 "2020-09-30T18:08:27Z")

</div>

Oh, yes, sorry I never realised that node does not have a pass through option, which makes it rather different to the switch node, for example.  
Unfortunately because of using mqtt it is not easy to run your flow. Could you make a simple example using link nodes instead? Put a small delay if necessary. Also don't include any non-core nodes if possible. Inject nodes can be used to simulate data.

---

<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: [30 October 2020 18:08 UTC](https://discourse.nodered.org/t/jittering-slider-when-input-and-output-are-equal/33561/7 "2020-10-30T18:08:34Z")

</div>

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