gysmo38 / mitsubishi2MQTT

Mitsubishi to MQTT with ESP8266 module
GNU Lesser General Public License v2.1
371 stars 133 forks source link

Multiple units flood the broker #188

Closed Sprinterfreak closed 1 year ago

Sprinterfreak commented 1 year ago

Since I was happy with my first Mitsubishi unit tamed, I wanted to fit the second.

TL;DR after flashing the second ESP32, connecting, both ESP's start to flood LWT online messages to the broker. Perhaps not using unique Client ID's to broker?

Long Version Hardware ESP32 Software 2022.11.0 (built with pio on ubuntu)

Both ESP's have different names below settings/wifi Hostname: HVACabc / HVACdef Both ESP's have different names below settings/mqtt Friendy Name: HVACabc / HVACdef Both using default topic: mitsubishi2mqtt Happens with and without mqtt authentication

Both ESP's are located in the same L2 network as the broker and get unique IP's via DHCP.

I'm using Homeassistant.

Sprinterfreak commented 1 year ago

I'm using ESP32 modules from az-delivery. All ESP modules from az-delivery have the same Chip ID ef49c0 which causes getID() to be not a unique id.

Intrestingly does the mac appear to be unique.

Sprinterfreak commented 1 year ago

Turned out that getId() returned the wrong half of the MAC as unique identifier. az-delivery is not to blame here. The vendor part of the mac is to be expected static on a batch of ESP's ;)

Using the serial part of the MAC from EfuseMac seem to have solved this issue.