# Problem with MQTT subscribe node

**URL:** <https://forum.xod.io/t/problem-with-mqtt-subscribe-node/4751>\
**Category:** XOD Programming Questions\
**Created:** [January 4, 2021, 1:09pm UTC](https://forum.xod.io/t/problem-with-mqtt-subscribe-node/4751 "2021-01-04T13:09:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gleijten](https://avatars.discourse-cdn.com/v4/letter/g/977dab/32.png) [@gleijten](https://forum.xod.io/u/gleijten)\
**Post date:** [January 4, 2021, 1:09pm UTC](https://forum.xod.io/t/problem-with-mqtt-subscribe-node/4751/1 "2021-01-04T13:09:24Z")

</div>

2021-01-03T23:00:00Z  
Hi all,

I am trying to use XOD programming to subscribe an Arduino NodeMCU to my NodeRED server.  
In this case I subscribe to the given values of a LDR which are available every 10 seconds on the server.  
I use the MQTT subcribe node from bradzilla84

After connecting and subscribing to the topic, I can recieve exactly 10 message values.  
After that the NodeMCU is sending subscribe messages so quickly that it looks like it’s in a loop.  
The server is responding to every message with an ACK but Node MCU can not recieve them anymore.  
After reset of the nodeMCU this cycle starts again with only 10 recieved messages.

Is this a bug in the MQTT node and how can I fix this problem.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![gleijten](https://avatars.discourse-cdn.com/v4/letter/g/977dab/32.png) [@gleijten](https://forum.xod.io/u/gleijten)\
**Post date:** [January 19, 2021, 2:21pm UTC](https://forum.xod.io/t/problem-with-mqtt-subscribe-node/4751/2 "2021-01-19T14:21:15Z")

</div>

Is there anybody on the forum that can answer my question?

---

<div class="post-metadata">

**Author:** ![benwithbanana](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@benwithbanana](https://forum.xod.io/u/benwithbanana)\
**Post date:** [January 22, 2021, 5:17pm UTC](https://forum.xod.io/t/problem-with-mqtt-subscribe-node/4751/3 "2021-01-22T17:17:27Z")

</div>

I had some problems too… resolved it with doing some debug with my esp 8266… if you try to publish or subscribe without adding some delays, the esp will crash and sending some reset debug output… i went to the solution, with adding step by step, whats working and nor… Try to reconnect as serial debug after resetting the esp mcu, to get the error message… there could be a problem with wifi watchdog… (thought it should be resetcode 7 or something like that…)

Be aware to isolate the part of code, leading your esp to crash… (use delay nodes)

Best Benjamin

---

<div class="post-metadata">

**Author:** ![benwithbanana](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@benwithbanana](https://forum.xod.io/u/benwithbanana)\
**Post date:** [January 22, 2021, 5:29pm UTC](https://forum.xod.io/t/problem-with-mqtt-subscribe-node/4751/4 "2021-01-22T17:29:38Z")

</div>

And im Using Mosquitto as broker on same raspi im running node red… you can use mqtt fx for debug subscribe and publish…( sorry for typo… im writing on smartphone…)

---

<div class="post-metadata">

**Author:** ![chris-cross](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@chris-cross](https://forum.xod.io/u/chris-cross)\
**Post date:** [January 30, 2021, 9:31am UTC](https://forum.xod.io/t/problem-with-mqtt-subscribe-node/4751/5 "2021-01-30T09:31:33Z")

</div>

Dear benwithbanana,

there is an older post in the Forum by bradzilla84 in terms of MQTT Library  
where these problems are described but there is still no solution for the library to allow faster subscribing.  
I hope bradzilla84 may update this one day.

Greetings  
Chris

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [March 1, 2021, 9:32am UTC](https://forum.xod.io/t/problem-with-mqtt-subscribe-node/4751/6 "2021-03-01T09:32:06Z")

</div>

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