Mahlzeit!
In letzter Zeit habe ich gehäuft folgendes Problem:
2019.02.13 22:10:05.276 3: Opening MQTTBroker device proliantg8:1883
2019.02.13 22:10:05.284 3: MQTTBroker device opened
2019.02.13 22:10:06.074 1: proliantg8:1883 disconnected, waiting to reappear (MQTTBroker)
2019.02.13 22:10:06.279 1: proliantg8:1883 reappeared (MQTTBroker)
2019.02.13 22:10:07.957 1: proliantg8:1883 disconnected, waiting to reappear (MQTTBroker)
2019.02.13 22:10:08.009 1: proliantg8:1883 reappeared (MQTTBroker)
2019.02.13 22:10:09.052 1: proliantg8:1883 disconnected, waiting to reappear (MQTTBroker)
2019.02.13 22:10:09.075 1: proliantg8:1883 reappeared (MQTTBroker)
Das Problem tritt häufig aber nicht reproduzierbar beim Start von FHEM auf und lässt sich durch set disconnect; set connect nicht beheben. Nur shutdown restart hilft. Diverse andere MQTT-Clients (nodered, ESPs etc.) haben eine stabile Verbindung zu mosquitto. Auf Logleveln <= 4 schweigt sich MQTT bis auf die obigen Meldungen aus, auf verbose 5 ergibt sich folgendes Bild:
2019.02.13 22:21:00.042 1: proliantg8:1883 disconnected, waiting to reappear (MQTTBroker)
2019.02.13 22:21:00.055 5: MQTT MQTTBroker message sent: Connect/at-most-once MQIsdp/3/Net::MQTT::Message[15] user=fhem pass=nix will=services/fhem/fhem/status,"disconnected",1,at-most-once
2019.02.13 22:21:00.060 5: MQTT MQTTBroker message sent: PingReq/at-most-once
2019.02.13 22:21:00.061 1: proliantg8:1883 reappeared (MQTTBroker)
2019.02.13 22:21:00.069 5: MQTT MQTTBroker message sent: Publish/at-most-once,retain services/fhem/fhem/status
2019.02.13 22:21:00.071 5: MQTT MQTTBroker message sent: Subscribe/at-least-once 2577 house/garage/garagedoor/+/at-most-once,house/garage/garagedoor/button/at-most-once,house/garage/garagedoor/esp-resetexccause/at-most-once,house/garage/garagedoor/esp-resetreason/at-most-once,house/garage/garagedoor/esp-state/at-most-once,house/garage/garagedoor/esp-version/at-most-once
2019.02.13 22:21:00.078 5: MQTT MQTTBroker message sent: Subscribe/at-least-once 2578 house/vr100-2/+/at-most-once,house/vr100-2/R-C-BatteryFailure/at-most-once,house/vr100-2/R-C-BatteryOverTemp/at-most-once,house/vr100-2/R-C-Charger_mAH/at-most-once,house/vr100-2/R-C-ChargingActive/at-most-once,house/vr100-2/R-C-ConfidentOnFuel/at-most-once,house/vr100-2/R-C-EmptyFuel/at-most-once,house/vr100-2/R-C-ExtPwrPresent/at-most-once,house/vr100-2/R-C-FuelPercent/at-most-once,house/vr100-2/R-C-LithiumChargeDone/at-most-once,house/vr100-2/R-C-LithiumChargeEnabled/at-most-once,house/vr100-2/R-C-OnReserveFuel/at-most-once,house/vr100-2/R-C-VBattV/at-most-once,house/vr100-2/R-E-Error/at-most-once,house/vr100-2/R-M-Brush_RPM/at-most-once,house/vr100-2/R-M-Laser_RPM/at-most-once,house/vr100-2/R-M-LeftWheel_RPM/at-most-once,house/vr100-2/R-M-RightWheel_RPM/at-most-once,house/vr100-2/R-M-Vacuum_RPM/at-most-once,house/vr100-2/R-X-RobotState/at-most-once,house/vr100-2/command/at-most-once,house/vr100-2/esp-boottime/at-most-once,house/vr100-2/esp-command/at-most-once,house/vr100-2/esp-connecttime/at-most-once,house/vr100-2/esp-debug/at-most-once,house/vr100-2/esp-resetexccause/at-most-once,house/vr100-2/esp-resetreason/at-most-once,house/vr100-2/esp-state/at-most-once,house/vr100-2/esp-version/at-most-once,house/vr100-2/rawcommand/at-most-once
2019.02.13 22:21:00.084 5: MQTT MQTTBroker message sent: Subscribe/at-least-once 2579 house/vr100/+/at-most-once,house/vr100/R-C-BatteryFailure/at-most-once,house/vr100/R-C-BatteryOverTemp/at-most-once,house/vr100/R-C-Charger_mAH/at-most-once,house/vr100/R-C-ChargingActive/at-most-once,house/vr100/R-C-ConfidentOnFuel/at-most-once,house/vr100/R-C-EmptyFuel/at-most-once,house/vr100/R-C-ExtPwrPresent/at-most-once,house/vr100/R-C-FuelPercent/at-most-once,/at-most-once,house/vr100/R-C-LithiumChargeDone/at-most-once,house/vr100/R-C-LithiumChargeEnabled/at-most-once,house/vr100/R-C-OnReserveFuel/at-most-once,house/vr100/R-C-VBattV/at-most-once,house/vr100/R-E-Error/at-most-once,house/vr100/R-M-Brush_RPM/at-most-once,house/vr100/R-M-Laser_RPM/at-most-once,house/vr100/R-M-LeftWheel_RPM/at-most-once,house/vr100/R-M-RightWheel_RPM/at-most-once,house/vr100/R-M-Vacuum_RPM/at-most-once,house/vr100/R-X-RobotState/at-most-once,house/vr100/command/at-most-once,house/vr100/esp-boottime/at-most-once,house/vr100/esp-command/at-most-once,house/vr100/esp-connecttime/at-most-once,house/vr100/esp-debug/at-most-once,house/vr100/esp-resetexccause/at-most-once,house/vr100/esp-resetreason/at-most-once,house/vr100/esp-state/at-most-once,house/vr100/esp-version/at-most-once,house/vr100/rawcommand/at-most-once
2019.02.13 22:21:00.090 5: MQTT MQTTBroker message sent: Subscribe/at-least-once 2580 house/cellar/gamingpc/+/at-most-once,house/cellar/gamingpc/button/at-most-once,house/cellar/gamingpc/esp-resetexccause/at-most-once,house/cellar/gamingpc/esp-resetreason/at-most-once,house/cellar/gamingpc/esp-state/at-most-once,house/cellar/gamingpc/esp-version/at-most-once,house/cellar/gamingpc/led/at-most-once
2019.02.13 22:21:00.878 5: MQTT MQTTBroker message sent: Publish/at-most-once,retain services/fhem/UG.FL.Thermostat/0.RSSI_DEVICE
2019.02.13 22:21:01.002 1: proliantg8:1883 disconnected, waiting to reappear (MQTTBroker)
Die SW-Einträge habe ich der Übersichtlichkeit halber rausgefiltert.
Patrick
Sorry, dass ich dieses alte Thema ausgrabe. Aber ich habe dieses Problem jetzt auch, nach einem upgrade von mosquitto von 1.4.10 (das ist die Version, die bei debian buster in den repos ist) auf 1.16.10 (aktuelle Version von mosquitto.org).
Nach dem Upgrade hatte ich auf allen meinen fhem-Instanzen (zwei) ein dauerndes "disconnected, waiting to reappear" und ein paar Sekunden später ein "reappeared".
Meine fhems sind aktuell. Das einzige, was auf die Schnelle geholfen hat, war ein downgrade auf mosquitto 1.4.10.
Meine mqtt-Definitionen sehen so aus:
Internals:
DEF mqtt.fritz.box:1883
DeviceName mqtt.fritz.box:1883
FD 56
FUUID 5c4b64c4-f33f-b796-347d-d616e1c481e4f24e
NAME mqtt
NOTIFYDEV global
NR 59
NTFY_ORDER 50-mqtt
PARTIAL
STATE opened
TYPE MQTT
buf
msgid 84
ping_received 1
timeout 60
READINGS:
2020-06-17 10:54:36 connection active
2020-06-17 10:49:36 state opened
messages:
Attributes:
room MQTT
Konntest Du das Problem irgendwie lösen?
Cheers,
Pula
Ich habe jetzt auch mosquitto 1.6.10 installiert, und hatte keine Probleme FHEM/MQTT2_CLIENT damit zu verbinden, Subscribe, Publish, Ping scheint ohne Probleme zu funktionieren.
Ich sehe gerade, es geht hier um das alte MQTT Modul.
Ich empfehle den Wechsel auf MQTT2.
Hallo!
Vielen Dank für den Hinweis. Aber ich verwende auch noch die MQTT_GENERIC_BRIDGE. Und wenn ich nicht falsch gelesen habe (was leicht möglich ist), tut die mit mqtt2 nicht, oder irre ich?
Cheers,
Pula
Soweit ich weiss, ja, Du irrst Dich :)
Super, danke schön! Dann muss ich da noch mal genauer lesen...
Mist, wird ein gröberes Projekt, da ich schon ziemlich viele (ca 50) mqtt-devices habe...