absalom-muc / MHI-AC-Ctrl

Reads and writes data (e.g. power, mode, fan status etc.) from/to a Mitsubishi Heavy Industries (MHI) air conditioner (AC) via SPI controlled by MQTT
MIT License
270 stars 61 forks source link

MQTT Connection Failed #130

Closed Siumba closed 1 year ago

Siumba commented 1 year ago

Yesterday I though about updating my Wemos D1 mini with the newest version. Worst decision ever.

The Wemos gets connected to WiFi but almost instantly drops off, getting in to a boot loop. I've tried several things, downgrading to a lower version, I am using PubSubClient 2.7 but I just have no luck at all.

This is the error log: Attempting MQTT connection... reconnect failed, reason -2, WiFi status: 3 Attempting MQTT connection... reconnect failed, reason -2, WiFi status: 3 Attempting MQTT connection... reconnect failed, reason -2, WiFi status: 3 Attempting MQTT connection... reconnect failed, reason -2, WiFi status: 3 Attempting MQTT connection... reconnect failed, reason -2, WiFi status: 3 Attempting MQTT connection... reconnect failed, reason -2, WiFi status: 3 Attempting MQTT connection... reconnect failed, reason -2, WiFi status: 3 Attempting MQTT connection... reconnect failed, reason -2, WiFi status: 3 Attempting MQTT connection... reconnect failed, reason -2, WiFi status: 3 Attempting MQTT connection... reconnect failed, reason -2, WiFi status: 0 WIFI NETWORKS -- HIDDEN FOR PRIVACY current BSSID: 74:83:C2:34:61:5A, strongest BSSID: 74:83:C2:34:61:5A Connecting from bssid:74:83:C2:34:61:5A to bssid:74:83:C2:34:61:5A, channel:4 WIFI_CONNECT_ONGOING connected to WIFI-SSID-NAME, IP address: 192.168.1.208 (-57dBm) WIFI_CONNECT_OK Attempting MQTT connection... reconnect failed, reason -2, WiFi status: 3

What else can I do?

absalom-muc commented 1 year ago

Please check Troubleshooting.md especially section ESP8266 crashes periodically and show us the result of the frequency measurement.

Siumba commented 1 year ago

I tried everything in those steps. The weird thing even is that yesterday I did an OTA update, so the device was working and connected to the AC and after that nothing works anymore.

Siumba commented 1 year ago

I found it! The MQTT broker, in my case Mosquitto, was working in some sort of limbo mode. Some devices appear to be using a user/password that seemed to be accepted, but not for "new" devices. I reset everything and now it connects again.