Page 1 of 1

Problem with more than one ESP with MQTT

Posted: 05 Feb 2016, 23:31
by CHK_BLN
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?

Re: Problem with more than one ESP with MQTT

Posted: 06 Feb 2016, 13:33
by Martinus
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)

Re: Problem with more than one ESP with MQTT

Posted: 07 Feb 2016, 21:01
by CHK_BLN
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?

Re: Problem with more than one ESP with MQTT

Posted: 07 Feb 2016, 22:54
by tozett
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?!

Re: Problem with more than one ESP with MQTT

Posted: 08 Feb 2016, 21:56
by CHK_BLN
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?