Zitat von whe
Beitrag anzeigen
Ankündigung
Einklappen
Keine Ankündigung bisher.
Neues MQTT Plugin
Einklappen
X
-
Zitat von Sipple Beitrag anzeigenAber: Unter Dienste fehlt die Versionsnummer vom MQTT Broker, der nicht lokal installiert ist, sondern auf dem Raspi 3 für die openWB.Viele Grüße
Martin
There is no cloud. It's only someone else's computer.
Kommentar
-
Zitat von ThommyKNX Beitrag anzeigenWeiß jemand, wie man das debugging von dem mqtt-modul aufdreht?
Probiere es in der Admin GUI mal unter Logging/Logger Konfiguration und gehe auf das Tab "Advanced Logger". Dort findest Du den Logger modules.mqtt und kannst den Level einstellen.
Bei der Gelegenheit kannst Du im Tab "Custom Logger" auch mal den Level des Loggers cherrypy.error auf WARNING setzen. Dann sind die sinnfreien Einträge des CherryPy Packages weg.Zuletzt geändert von Msinn; 01.06.2023, 18:28.Viele Grüße
Martin
There is no cloud. It's only someone else's computer.
Kommentar
-
Zitat von ThommyKNX Beitrag anzeigenDie Smarthomeng-loglevels habe ich schon auf DEBUG gestellt, aber trotzdem kommt zu diesem Fehler nicht mehr durch.Viele Grüße
Martin
There is no cloud. It's only someone else's computer.
Kommentar
-
Zitat von ThommyKNX Beitrag anzeigen2023-06-01 17:14:22 WARNING modules.mqtt Disconnected from broker with returncode '7'
Google spuckt z.B. folgendes aus:
Some disconnection errors are due to reuse the same clientID.
If a client connects with the same clientID, the previous client is disconnected with error 7 or 8.
Try to use a unique clientID or randomize it.
Viele Grüße
Martin
There is no cloud. It's only someone else's computer.
Kommentar
-
Zitat von Msinn Beitrag anzeigenFür einen Broker Error 7 kann es diverse Möglichkeiten geben.
Zitat von Msinn Beitrag anzeigenHast Du evtl. mehrere SmartHomeNG Instanzen laufen? Schau mal in die Prozess Liste.
Was, denke ich, der Verursacher des Problems ist:
Code:2023-06-01 22:43:54 ERROR modules.mqtt _on_log: Caught exception in on_message: 'ip'
Kommentar
-
Wie ich bereits schrieb, gibt der paho-mqtt Client nicht mehr Informationen zum Loggen an die _on_log Funktion. Daher kann ich aus SmartHomeNG Sicht dazu nichts sagen.
Welche Version des paho-mqtt Packages hast Du denn installiert?Viele Grüße
Martin
There is no cloud. It's only someone else's computer.
Kommentar
-
Zitat von Msinn Beitrag anzeigenWelche Version des paho-mqtt Packages hast Du denn installiert?
Kommentar
-
Hallo,
sorry, dass ich mich erst jetzt melde, aber ich hatte isher noch keine Zeit gehabt, dies näher zu Untersuchen.
Ich habe mosquitto 2.0.11 im Einsatz.
Das mosquitto log gibt leider nicht sehr viel Aufschluss.
Anfangs sieht es noch gut aus:
Code:1686601396: New connection from 192.168.7.239:37635 on port 1883. 1686601396: New client connected from 192.168.7.239:37635 as smarthome.shng-mqtt (p2, c1, k60, u'smarthomeng'). 1686601396: No will message specified. 1686601396: Sending CONNACK to smarthome.shng-mqtt (0, 0) 1686601396: Received SUBSCRIBE from smarthome.shng-mqtt 1686601396: $SYS/broker/version (QoS 0) 1686601396: smarthome.shng-mqtt 0 $SYS/broker/version 1686601396: Sending SUBACK to smarthome.shng-mqtt 1686601396: Sending PUBLISH to smarthome.shng-mqtt (d0, q0, r1, m0, '$SYS/broker/version', ... (24 bytes)) 1686601396: Received SUBSCRIBE from smarthome.shng-mqtt 1686601396: $SYS/broker/clients/active (QoS 0) 1686601396: smarthome.shng-mqtt 0 $SYS/broker/clients/active 1686601396: Sending SUBACK to smarthome.shng-mqtt 1686601396: Received SUBSCRIBE from smarthome.shng-mqtt 1686601396: $SYS/broker/subscriptions/count (QoS 0) 1686601396: smarthome.shng-mqtt 0 $SYS/broker/subscriptions/count 1686601396: Sending SUBACK to smarthome.shng-mqtt 1686601396: Received SUBSCRIBE from smarthome.shng-mqtt 1686601396: $SYS/broker/messages/stored (QoS 0) 1686601396: smarthome.shng-mqtt 0 $SYS/broker/messages/stored 1686601396: Sending SUBACK to smarthome.shng-mqtt 1686601396: Received SUBSCRIBE from smarthome.shng-mqtt 1686601396: $SYS/broker/uptime (QoS 0) 1686601396: smarthome.shng-mqtt 0 $SYS/broker/uptime 1686601396: Sending SUBACK to smarthome.shng-mqtt 1686601396: Sending PUBLISH to smarthome.shng-mqtt (d0, q0, r1, m0, '$SYS/broker/uptime', ... (11 bytes)) 1686601396: Received SUBSCRIBE from smarthome.shng-mqtt 1686601396: $SYS/broker/retained messages/count (QoS 0) 1686601396: smarthome.shng-mqtt 0 $SYS/broker/retained messages/count . . . 1686601423: Received PUBLISH from evcc-1213392744 (d0, q1, r1, m44171, 'evcc/updated', ... (10 bytes)) 1686601423: Sending PUBLISH to smarthome.shng-mqtt (d0, q1, r0, m29, 'evcc/updated', ... (10 bytes)) 1686601423: Sending PUBACK to evcc-1213392744 (m44171, rc0) 1686601423: Received PUBLISH from evcc-1213392744 (d0, q1, r1, m44172, 'evcc/loadpoints/1/chargePower', ... (1 bytes)) 1686601423: Sending PUBLISH to smarthome.shng-mqtt (d0, q1, r0, m30, 'evcc/loadpoints/1/chargePower', ... (1 bytes)) 1686601423: Sending PUBACK to evcc-1213392744 (m44172, rc0) 1686601423: Received PUBLISH from evcc-1213392744 (d0, q1, r1, m44173, 'evcc/site/pvPower', ... (3 bytes)) 1686601423: Sending PUBACK to evcc-1213392744 (m44173, rc0) 1686601423: Received PUBLISH from evcc-1213392744 (d0, q1, r1, m44174, 'evcc/site/pv/1/power', ... (3 bytes)) 1686601423: Sending PUBACK to evcc-1213392744 (m44174, rc0) 1686601423: Received PUBLISH from evcc-1213392744 (d0, q1, r1, m44175, 'evcc/site/pv', ... (1 bytes)) 1686601423: Sending PUBACK to evcc-1213392744 (m44175, rc0) 1686601423: Received PUBLISH from evcc-1213392744 (d0, q1, r1, m44176, 'evcc/site/batteryCapacity', ... (1 bytes)) 1686601423: Sending PUBACK to evcc-1213392744 (m44176, rc0)
aber irgendwann dann uas heiterem Himmel:
Code:1686601483: Sending PUBACK to evcc-1213392744 (m44436, rc0) 1686601486: Received PUBLISH from ESP-GEIGER-4F7392 (d0, q0, r1, m0, 'Tkacsik/Sensoren/MightyOhm/CPM', ... (2 bytes)) 1686601486: Sending PUBLISH to smarthome.shng-mqtt (d0, q0, r0, m0, 'Tkacsik/Sensoren/MightyOhm/CPM', ... (2 bytes)) 1686601486: Received PUBLISH from ESP-GEIGER-4F7392 (d0, q0, r1, m0, 'Tkacsik/Sensoren/MightyOhm/dose', ... (4 bytes)) 1686601486: Sending PUBLISH to smarthome.shng-mqtt (d0, q0, r0, m0, 'Tkacsik/Sensoren/MightyOhm/dose', ... (4 bytes)) 1686601491: Client smarthome.shng-mqtt has exceeded timeout, disconnecting. 1686601491: Received PINGREQ from ESP-GEIGER-4F7392 1686601491: Sending PINGRESP to ESP-GEIGER-4F7392
Ich könnte mir vorstellen, dass es an irgendwelchen subscribes liegt. Ich denke ich kommentier mal alle aus den yaml-files aus, und schau, ob es dann immer noch ist.
Zuvor habe ich eigentlich nicht viel geändert, nur neue items angelegt mit neuen subscribes.
Kommentar
-
Habe grade gefunden, dass das Problem hier https://knx-user-forum.de/forum/supp...39#post1763639 schon mal beschrieben wurde.
Den entsprechenden Fix habe ich durch shng version 1.9.5 ja bereits drinnen. paho-mqtt ist Version ist jedoch 1.6.1.
Kommentar
-
Ich konnte den Fehler finden. Ich benutze auch das shelly-plugin, welches shellles/# via mqtt abonniert. Jedoch habe ich unter anderem ein neues Shelly-Device bekommen, welches nicht mit dem plugin kompatibel ist, jedoch auch nicht konfiguriert ist. Es existiert nur zusätzlich im Netz, und published dort messages. Nachdem ich das neue shelly vom broker genommen habe, kam auch
Code:2023-06-01 22:43:54 ERROR modules.mqtt _on_log: Caught exception in on_message: 'ip'
Offenbar pulished das Teil messages, welches vom shelly-plugin nicht interpretiert werden können.
Kommentar
-
Hi,
ich habe scheinbar ein Problem mit dem Push von Mqtt-Meldungen. Es sieht für mich aktuell so aus, als wenn SmarthomeNG als Cleint irgendwann die Verbindung zum Mosquitto verliert und dann nicht wieder herstellt.
mosquitto.log:1688925105: Client cubie2.MQTT-module has exceeded timeout, disconnecting.
mosquitto.log:1688984478: New client connected from 192.168.2.131:59533 as cubie2.MQTT-module (p2, c1, k60).
Code:2023-07-10 12:04:36 CEST INFO mqttplugin plugins.smlx.Smlx publish_topic: Item 'Haus.Zentral.Strom_Haushalt.Bezug.Phasen.L1' -> topic 'sgm-c8/phases/L1', payload '1.7', QoS 'None', retain 'True' -- (mqttplugin.py:publish_topic:164) 2023-07-10 12:04:36 CEST INFO __init__ plugins.smlx.Smlx Update item: Haus.Zentral.Strom_Haushalt.Bezug.Phasen.L2, item has been changed outside this plugin -- (__init__.py:update_item:206) 2023-07-10 12:04:36 CEST INFO mqttplugin plugins.smlx.Smlx publish_topic: Item 'Haus.Zentral.Strom_Haushalt.Bezug.Phasen.L2' -> topic 'sgm-c8/phases/L2', payload '3.2', QoS 'None', retain 'True' -- (mqttplugin.py:publish_topic:164) 2023-07-10 12:04:36 CEST INFO __init__ plugins.smlx.Smlx Update item: Haus.Zentral.Strom_Haushalt.Bezug.Phasen.L3, item has been changed outside this plugin -- (__init__.py:update_item:206) 2023-07-10 12:04:36 CEST INFO mqttplugin plugins.smlx.Smlx publish_topic: Item 'Haus.Zentral.Strom_Haushalt.Bezug.Phasen.L3' -> topic 'sgm-c8/phases/L3', payload '3.1', QoS 'None', retain 'True' -- (mqttplugin.py:publish_topic:164)
Ich habe das Debug-Log jetzt mal hochgedreht, vlt. gibt es da noch eine brauchbare Meldung.
Frage an die Experten - Gibt es da ein Polling oder ähnliches, um zu sehen ob der Connect zum Broker noch steht?
Danke
Gunnar
Kommentar
-
Das paho-mqtt Package überwacht das bestehen der Verbindung.
Das mqtt Modul tut bei einem disconnect folgendes:
Wenn das paho-mqtt Package einen disconnect feststellt, ruft es ein Callback Routine im mqtt Modul auf.
Diese erzeugt einen Logeintrag, abhängig vom Resultcode (rc) den das paho-mqtt Package zurückmeldet.
Bei rc = 0 wird ein INFO Eintrag geloggt: Disconnection was successful (rc=0)'"
bei rc = 7 wird ein WARNING Eintrag geloggt: Disconnected from broker with returncode '7'
Bei einem anderen rc wird ein NOTICE Eintrag geloggt: Disconnection returned result '{rc}'
Wenn ein rc = 7 zurück gemeldet wird, wird anschließend ein Reconnect veranlasst.
Viele Grüße
Martin
There is no cloud. It's only someone else's computer.
Kommentar
Kommentar