Problem with more than one ESP with MQTT

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
CHK_BLN
Normal user
Posts: 24
Joined: 19 Nov 2015, 22:14

Problem with more than one ESP with MQTT

#1 Post by CHK_BLN » 05 Feb 2016, 23:31

Hi
I have the following problem with MQTT.
The following ESP versions I use:
ESP-01
NodeMcu V 3
ESP ADC
ESP12-E

I would like to send all 4 ESP s the sensor values for MQTT broker. The broker is running on a Raspberry Pi 2 Quad Core
All ESP s run stable without the use of MQTT.

In one ESP with MQTT Protoll the data is sent to the broker stable.
Once I activate the MQTT protocol at a 2. ESP, will no longer receive data from the first ESP by the broker. Only the data from the 2 ESP arrive at the broker. Partial then the ESP s signing off altogether and are no longer accessible.
Can the Raspberry Pi or the network to be the problem? Or they interfere with the ESP s among each other?

Martinus

Re: Problem with more than one ESP with MQTT

#2 Post by Martinus » 06 Feb 2016, 13:33

Do your units have unique unit numbers configured? Each client connecting to MQTT broker has to use a unique client id. We use the Unit settings to make each ESP client connection unique to MQTT.

(I did not test this myself, but this is how it's build in theory)

CHK_BLN
Normal user
Posts: 24
Joined: 19 Nov 2015, 22:14

Re: Problem with more than one ESP with MQTT

#3 Post by CHK_BLN » 07 Feb 2016, 21:01

Hi Martinus,
The reference to the unit numbers was the solution. Thank you, I had already spent a lot of time troubleshooting.
In WiKi I find this nothing. Where can I read the individual settings and their meaning?

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Problem with more than one ESP with MQTT

#4 Post by tozett » 07 Feb 2016, 22:54

Martinus wrote:Do your units have unique unit numbers configured?
bug-report/feature-wish?
maybe you check node-numbers with the builin nodes-function? make this a default (with preset port-number in config)?
or set a default unique number, not all the same zero on fresh flashed ESPs?

bytheway: SOLVED?!

CHK_BLN
Normal user
Posts: 24
Joined: 19 Nov 2015, 22:14

Re: Problem with more than one ESP with MQTT

#5 Post by CHK_BLN » 08 Feb 2016, 21:56

If the ESP chip ID clearly? If so, then the software could put the last 4 digits of the ESP chip ID as UNIT number. Thus, the problem should be solved. Would it be possible?

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests