Hi
I’m having problem on sending commands after setting up 2 mqtt devices.
For configuration of one item - everything is working good.
The steps I performed:
I flashed Tasmota on two sonoff basic modules.
The modules is up and running and I can access both by the IP addresses.
The mqtt configuration of both items:
First sonoff:
Now the problem is like that:
When switching on sonoff1 switch - the sonoff2 device is turned on.
When switching on sonoff2 - the sonoff2 device is turned on.
The same problem is when sending commands via MQTT.fx.
BTW - the status is receiving good, if I am turning on the sonoff1 device itself , the sonoff1 switch is turned on.
It seems that sonoff1 device not receiving commands - it only get the device if I am removing the settings of sonoff2.
Try changing your Tasmota config for each device. Both Devices have the same client name - openhab2, they should be different. Just leave the default values - that is what I did with my devices.
By way of explanation, the client ID is used for the device connecting to the MQTT broker.
So openHAB, sonoff-1, and sonoff-2 all need different client IDs
If you re-use client ID the broker will think you are the same box making another connection.
With MQTT there is a broker application sitting in the middle.
Nobody talks directly to each other, they all talk to the broker.
Everybody talking to the broker needs a unique client ID.
openHAB is just another client from the broker’s point of view.
openHAB needs only one connection to the broker no matter how many different topics it wants to listen to or publish.