# Switch node causes Feedback!

**URL:** <https://discourse.nodered.org/t/switch-node-causes-feedback/4757>\
**Category:** Dashboard\
**Created:** [10 November 2018 18:37 UTC](https://discourse.nodered.org/t/switch-node-causes-feedback/4757 "2018-11-10T18:37:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaff](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Gaff](https://discourse.nodered.org/u/Gaff)\
**Post date:** [10 November 2018 18:37 UTC](https://discourse.nodered.org/t/switch-node-causes-feedback/4757/1 "2018-11-10T18:37:59Z")

</div>

Hi, I've noticed that the `swicth` node is causing feedback. Perhaps it's simplest to explain with a diagram:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e59d02018d30cead550fd47d9586e02c50d6c80c.png)

When I click on the `ON` inject node the following happens:

1. Nodered sends a power on command over MQTT
2. Sonoff switches on and sends an `ON` status ipdate via MQTT
3. Nodered receives the update and updates the UI
4. _The switch component sends another `ON` command!!_

Step 4 is the problem. I don't expect the status update to cause a command to be sent again!

I've noticed in cases where I have several UIs open, or I switch to a UI that has been in the background for a while that this causes many queued messages to be sent at once! 😮

Is there a way to prevent this feedback loop?

---

<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 November 2018 18:57 UTC](https://discourse.nodered.org/t/switch-node-causes-feedback/4757/2 "2018-11-10T18:57:56Z")

</div>

Clear the message pass through option in the switch

---

<div class="post-metadata">

**Author:** ![Gaff](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Gaff](https://discourse.nodered.org/u/Gaff)\
**Post date:** [10 November 2018 18:58 UTC](https://discourse.nodered.org/t/switch-node-causes-feedback/4757/3 "2018-11-10T18:58:32Z")

</div>

Ah looks like I was using the deprecated `ui` modules rather than the newer `dashboard`. How confusing!

Now that I've installed the newer version I can see all the settings that I need to prevent the feedback!
