# Problem with MQTT and switch update

**URL:** <https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865>\
**Category:** General\
**Created:** [28 August 2019 18:36 UTC](https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865 "2019-08-28T18:36:08Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 November 2020 08:45 UTC](https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865/21 "2020-11-26T08:45:44Z")

</div>

Is the mqtt back in really providing a boolean ? add a debug to check.

---

<div class="post-metadata">

**Author:** ![mattrix](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mattrix](https://discourse.nodered.org/u/mattrix)\
**Post date:** [26 November 2020 09:00 UTC](https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865/22 "2020-11-26T09:00:52Z")

</div>

In MQTT Explorer yes  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/7950a8f716e2fcf514074b608fbcdd3646d9abad.png)

but i am not finding anything in debug console ?

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

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 November 2020 09:03 UTC](https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865/23 "2020-11-26T09:03:38Z")

</div>

add the debug before the switch - on the output of the mqtt node

---

<div class="post-metadata">

**Author:** ![mattrix](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mattrix](https://discourse.nodered.org/u/mattrix)\
**Post date:** [26 November 2020 09:33 UTC](https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865/24 "2020-11-26T09:33:04Z")

</div>

> [@dceejay](#):
>
> mqtt

same punition

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

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 November 2020 09:39 UTC](https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865/25 "2020-11-26T09:39:31Z")

</div>

well then you aren't subscribed to the correct topic ... you either need the full correct topic or to use correct wildcard # at the end.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [26 November 2020 09:57 UTC](https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865/26 "2020-11-26T09:57:20Z")

</div>

Have you got a trailing slash at the end of your MQTT topic in your node?  
Try removing it.

---

<div class="post-metadata">

**Author:** ![mattrix](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mattrix](https://discourse.nodered.org/u/mattrix)\
**Post date:** [26 November 2020 10:19 UTC](https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865/27 "2020-11-26T10:19:07Z")

</div>

> [@Paul-Reed](#):
>
> MQTT

Is better now but not solved yet. Because it s like if node red has over ride control.  
I mean when i use my homey app to switch on the light for example, and that the switch is off on node red, then the light goes on then off immediately like if nodered has over rights.

Weird ?

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [26 November 2020 11:56 UTC](https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865/28 "2020-11-26T11:56:50Z")

</div>

Subject moved to its own thread - [Node red master rules?](https://discourse.nodered.org/t/node-red-master-rules/36554)

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [26 November 2020 11:56 UTC](https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865/29 "2020-11-26T11:56:56Z")

</div>

Closed on 26 November 2020 11:56 UTC



[Previous page](https://discourse.nodered.org/t/problem-with-mqtt-and-switch-update/14865.md?page=1)
