Repeated message even without anyone publish it

Hello, i'm new with this node-red things and need some guidance regarding my problem.
I'm using google VM as my server with mosquitto and esp32 as publisher and subscriber.
right now, i start using 2 esp32 to communicate with publish and subscribe things.

the first one esp32 i'm using it for publisher and the others for subscribe.

I have seen a repeated messages debug is coming all the time even i'm not powering the esp32 publisher.
Is it normal or i have done something wrong?

when i check to my subscriber esp, those data always coming even i don't power up my publisher esp32

thank you for your attention

NB here is my nodered graph

and one thing
my big goal is to use 4 esp32 to sharing some data between all of them
Is it possible to do that with mqtt and node red?
thank you

Assuming the subscribe nodes and publish nodes are all connected to the same broker, it looks like you have created an MQTT loop.

You should never publish to the topic you are subscribed to. The message just goes round and round your network, usually ending up in crashing node-red.

1 Like

oh ok i understand
thank you very much for your reply

but how i suppose to connect with my others esp32?

You use a topic convention (either your own design or homie)


ESP1 publishes

ESP2 publishes

ESP1 subscribes to

ESP2 subscribes to

1 Like

thank you very much
i think that is the answer i need

hii sory to disrupt you again
I'm still little bit confusing

may i ask one more?

i have tried like this
(publish)esp1/temperature ----->(subscribe) esp2/command

but the message is not received by my esp32 subs

I need direct communication between 2 esp32
no toggle or inject

thank you for your hospitality and patience

Why would it.

  • If you subscribe to hello you need to publish to hello
  • If you publish to esp1/temperature you should subscribe to esp1/temperature

You dont even need node-red in this at all. The ESPs will simply talk to the broker as 2 clients.

You can do something like this...


ESP1 - subscribe to esp2/send/esp1
ESP2 - publish to esp2/send/esp1


ESP2 - subscribe to esp1/send/esp2
ESP1 - publish to esp1/send/esp2

Use whatever topics you like but they should make sense and should be unique.

Without meaning to be cheeky, I think you should spend an hour reading up on MQTT - there are tonnes of videos on youtube and lots of info around the web. Get familiar with the basics before you continue.

1 Like

well thank you
that clarify my doubt

the big picture why i want use node-red is in the end after all direct communication i want to store all the value from 4 esp to my mysql.

thank you once again for clarify this for me

i got it now
best regards

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