xyzroe / ZigStarGW-FW

ZigStar LAN Gateway - Firmware
GNU General Public License v3.0
88 stars 24 forks source link

Two indentical coordinators conflict #24

Open ajunio3 opened 1 year ago

ajunio3 commented 1 year ago

I'm using 2 LAN POE coordinators in my 2 Z2M instances. Changed their hostnames and topics, but the ESP32 MQTT monitor is under conflict because it claims the device is already conected (see the broker log)

It seems it keeps using the standard device name "ZigStarGW-7348" for both disregarding the change in hostnames

image

First coordinator image image

Second one image image

ajunio3 commented 1 year ago

Doing some resarch, looks its the MQTT Client ID introduced in FW 0.6.0. But it seeems uses the same for both coordinators, disregarding the hostnames (nor the MQTT topic) inputs

image

xyzroe commented 1 year ago

Indeed, according to this line, 4 characters from the MAC address are used to determine the ID, but not the last two blocks, but before the last ones. In your case, both coordinators use MAC addresses that differ only in the last block, which is not used. I'll fix it in the next update.