MQTT2_CLIENT Probleme

Begonnen von rudolfkoenig, 07 November 2018, 21:12:15

Vorheriges Thema - Nächstes Thema

rudolfkoenig

ZitatVielleicht hilft hier das PERL WARNING ja schon weiter?
Ja, danke :)
Ich habe jetzt ein Problem mit gleichen Symptomen behoben.
Es trat auf, wenn man ein set (publish oder passwort) oder ein Connect-spezifisches Attribut (user, LWT, etc) nach dem FHEM-Start gesetzt hat.

HomeAlone

Zitat von: rudolfkoenig am 24 November 2018, 17:09:43
Ja, danke :)
Ich habe jetzt ein Problem mit gleichen Symptomen behoben.
Es trat auf, wenn man ein set (publish oder passwort) oder ein Connect-spezifisches Attribut (user, LWT, etc) nach dem FHEM-Start gesetzt hat.

OK, habe nach dem morgentlichen Update noch mal ein publish durchgeführt. Das Warning ist verschwunden:
2018.11.25 08:35:28 5: mosquittolocal: sending PUBLISH test/blub
2018.11.25 08:35:28 5: mosquittolocal: received PUBLISH (0)(9)test/blub
2018.11.25 08:35:28 5: mosquittolocal: dispatch mosquittolocal:test/blub:
2018.11.25 08:35:31 5: mosquittolocal: keepalive 30
2018.11.25 08:35:31 5: mosquittolocal: received PINGRESP


*thumbsup* :)

HomeAlone

Durch Deine Antwort bin ich jetzt mal mutig geworden und habe mich gleich an die Tests mit Zertifikaten gemacht (Version 5).

Zwischenstand: Lokaler MQTT2_CLIENT mit SSL aktiviert, Benutzername und Passwort und eingebundener MQTT_GENERIC_BRIDGE hat jetzt (in 30 Minuten Testphase) keine disconnects mehr geliefert.
Lasse das Ganze jetzt laufen und schaue heute Abend noch mal drauf.
Wenn das ordentlich funktioniert, geh ich noch mal auf den Mosquitto auf einem anderen Rechner und schaue, wie sich das Ganze verhält.

HomeAlone

Leider kommen die connects und disconnects nach dem Update von heute wieder. Habe noch dieselbe config von gestern laufen  :(

2018.11.26 08:27:50 5: HttpUtils url=https://smartgulp2:8883/
2018.11.26 08:27:50 4: IP: smartgulp2 -> 127.0.1.1
2018.11.26 08:27:50 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.26 08:28:20 5: mosquittolocal: keepalive 30
2018.11.26 08:28:20 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.26 08:28:20 5: HttpUtils url=https://smartgulp2:8883/


Habe testweise den hostname um .local ergänzt (wird von der Fritzbox an die hostnamen im lokalen Netz angehangen) und neu gestartet.

2018.11.26 08:29:33 1: smartgulp2.local:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.26 08:29:33 5: HttpUtils url=https://smartgulp2.local:8883/
2018.11.26 08:29:33 4: IP: smartgulp2.local -> 192.168.178.72
2018.11.26 08:29:33 1: smartgulp2.local:8883 reappeared (mosquittolocal)
2018.11.26 08:29:33 1: smartgulp2.local:8883 disconnected, waiting to reappear (mosquittolocal)


Nach ein paar Minuten switched der  MQTT2_CLIENT auf ein virtuelles Netzwerk-Interface meiner Docker-Umgebung:
2018.11.26 08:33:03 1: smartgulp2.local:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.26 08:33:03 5: HttpUtils url=https://smartgulp2.local:8883/
2018.11.26 08:33:03 4: IP: smartgulp2.local -> 192.168.178.72
2018.11.26 08:33:03 1: smartgulp2.local:8883 reappeared (mosquittolocal)
2018.11.26 08:33:33 5: mosquittolocal: keepalive 30
2018.11.26 08:33:33 1: smartgulp2.local:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.26 08:33:33 5: HttpUtils url=https://smartgulp2.local:8883/
2018.11.26 08:33:33 4: IP: smartgulp2.local -> 169.254.68.85
2018.11.26 08:33:33 1: smartgulp2.local:8883 reappeared (mosquittolocal)
2018.11.26 08:34:03 5: mosquittolocal: keepalive 30


Die IP ist dem virtuellen Device veth3ea2eee zugewiesen.

Sämtliche Dienste funktionieren einwandfrei und ich kann auch ganz normal auf den Rechner zugreifen.

Ich habe dann testhalber den Rechner neu gestartet (vorher das .local aus der Konfiguration entfernt):

2018.11.26 08:47:15 1: smartgulp2.local:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.26 08:47:15 5: HttpUtils url=https://smartgulp2.local:8883/
2018.11.26 08:47:15 4: IP: smartgulp2.local -> 172.18.0.1
2018.11.26 08:47:15 1: smartgulp2.local:8883 reappeared (mosquittolocal)
2018.11.26 08:47:15 1: smartgulp2.local:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.26 08:47:15 5: HttpUtils url=https://smartgulp2.local:8883/
2018.11.26 08:47:15 4: IP: smartgulp2.local -> 172.18.0.1
2018.11.26 08:47:15 1: smartgulp2.local:8883 reappeared (mosquittolocal)
2018.11.26 08:47:37 5: mosquittolocal: keepalive 30
2018.11.26 08:47:37 1: smartgulp2.local:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.26 08:47:37 5: HttpUtils url=https://smartgulp2.local:8883/
2018.11.26 08:47:37 4: IP: smartgulp2.local -> 169.254.106.241
2018.11.26 08:47:37 1: smartgulp2.local:8883 reappeared (mosquittolocal)
2018.11.26 08:48:07 5: mosquittolocal: keepalive 30


Die 172.18.0.1 ist meine Docker-Bridge, die 169.254.106.241 wieder ein virtuelles Device ...

nach einem shutdown restart von fhem flutet der MQTT2_CLIENT das Logfile mit folgenden Nachrichten:
2018.11.26 08:53:14 1: smartgulp2.local:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.26 08:53:14 5: HttpUtils url=https://smartgulp2.local:8883/
2018.11.26 08:53:14 4: IP: smartgulp2.local -> 172.17.0.1
2018.11.26 08:53:14 1: smartgulp2.local:8883 reappeared (mosquittolocal)
2018.11.26 08:53:14 5: mosquittolocal: received CONNACK (0)(5)
2018.11.26 08:53:14 1: mosquittolocal: Connection refused, not authorized
2018.11.26 08:53:14 5: SW: e000


Wie gesagt, an meiner ursprünglichen config habeich nichts verändert!
Aufgrund dieser Meldungen habe ich das mosquittolocal device komplett gelöscht und neu angelegt. Anschließend funktioniert wieder alles (also tls verschlüsselte Verbindung, Benutzername + Passwort).
Auch nach Neustart des Docker-Dämons scheint es jetzt wieder stabil zu laufen.

Eine Idee?

rudolfkoenig

Ich habe MQTT2_DEBUG jetzt umgebaut, damit bei verbose 5 alles was gesendet wird, protokolliert wird.
Waere nett, wenn du das bei mosquitto auch aktivieren koenntest, und das Log beider Seiten hier anhaengst.

HomeAlone

Zitat von: rudolfkoenig am 26 November 2018, 10:05:38
Ich habe MQTT2_DEBUG jetzt umgebaut, damit bei verbose 5 alles was gesendet wird, protokolliert wird.
Waere nett, wenn du das bei mosquitto auch aktivieren koenntest, und das Log beider Seiten hier anhaengst.
Hallo Rudi,
ich bin erst morgen wieder daheim und werde es dann testen.

HomeAlone

Zitat von: rudolfkoenig am 26 November 2018, 10:05:38
Ich habe MQTT2_DEBUG jetzt umgebaut, damit bei verbose 5 alles was gesendet wird, protokolliert wird.
Waere nett, wenn du das bei mosquitto auch aktivieren koenntest, und das Log beider Seiten hier anhaengst.

"Glücklicherweise" konnte ich heute morgen nach dem Update recht fix das Problem protokollieren:
Ich habe aktiv nichts gepublished, die Instabilität (disconnect / connect / ...) tritt also auch auf, wenn man nichts published.

Sicherheitshalber noch mal die configs:

MQTT2_CLIENT:
defmod mosquittolocal MQTT2_CLIENT smartgulp2:8883
attr mosquittolocal SSL 1
attr mosquittolocal room MQTT,Zentralen
attr mosquittolocal username fhem
attr mosquittolocal verbose 5

setstate mosquittolocal opened
setstate mosquittolocal 2018-11-28 09:14:29 state opened

wobei man in der Übersichtseite des Devices den Status immer von opened auf disconnected und dann wieder auf opened wechseln sieht.

MQTT_GENERIC_BRIDGE:
defmod mqttGenericBridge MQTT_GENERIC_BRIDGE mqtt room=ZWave,room=EnOcean,room=HomeMatic
attr mqttGenericBridge IODev mosquittolocal
attr mqttGenericBridge globalPublish *:topic={"fhempub/$device/$reading"}
attr mqttGenericBridge globalTypeExclude *:power\
*:energy
attr mqttGenericBridge icon mqtt_device
attr mqttGenericBridge room MQTT,Zentralen

setstate mqttGenericBridge 2018-11-28 08:27:15 device-count 0
setstate mqttGenericBridge 2018-11-28 08:27:14 incoming-count 0
setstate mqttGenericBridge 2018-11-28 10:07:27 outgoing-count 50
setstate mqttGenericBridge 2018-11-28 10:07:27 transmission-state outgoing publish sent
setstate mqttGenericBridge 2018-11-28 08:27:14 updated-reading-count 0
setstate mqttGenericBridge 2018-11-28 08:27:14 updated-set-count 0




Das Logfile von fhem (gekürzt um Teile von anderen Komponenten):
2018.11.28 08:20:17 5: mosquittolocal: keepalive 30
2018.11.28 08:20:17 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:20:17 5: mosquittolocal: received PINGRESP
2018.11.28 08:20:41 2: HMCCURPCPROC: [d_rpcBidCos_RF] Received no events from interface CB2001178072 for 600 seconds
2018.11.28 08:20:41 5: mosquittolocal: sending  PUBLISH 0N(0)(25)fhempub/d_rpcBidCos_RF/Noevents from interface CB2001178072 for 600 seconds
2018.11.28 08:20:41 5: mosquittolocal: received PUBLISH (0)(25)fhempub/d_rpcBidCos_RF/Noevents from interface CB2001178072 for 600 seconds
2018.11.28 08:20:41 5: mosquittolocal: dispatch mosquittolocal:fhempub/d_rpcBidCos_RF/No:events from interface CB2001178072 for 600 seconds
2018.11.28 08:20:47 5: mosquittolocal: keepalive 30
2018.11.28 08:20:47 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:20:47 5: mosquittolocal: received PINGRESP
2018.11.28 08:21:17 5: mosquittolocal: keepalive 30
2018.11.28 08:21:17 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:21:17 5: mosquittolocal: received PINGRESP
2018.11.28 08:21:47 5: mosquittolocal: keepalive 30
2018.11.28 08:21:47 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:21:47 5: mosquittolocal: received PINGRESP
2018.11.28 08:22:17 5: mosquittolocal: keepalive 30
2018.11.28 08:22:17 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:22:17 5: mosquittolocal: received PINGRESP
2018.11.28 08:22:47 5: mosquittolocal: keepalive 30
2018.11.28 08:22:47 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:22:47 5: mosquittolocal: received PINGRESP
2018.11.28 08:23:17 5: mosquittolocal: keepalive 30
2018.11.28 08:23:17 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:23:17 5: mosquittolocal: received PINGRESP
2018.11.28 08:23:47 5: mosquittolocal: keepalive 30
2018.11.28 08:23:47 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:23:47 5: mosquittolocal: received PINGRESP
2018.11.28 08:24:17 5: mosquittolocal: keepalive 30
2018.11.28 08:24:17 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:24:17 5: mosquittolocal: received PINGRESP
2018.11.28 08:24:47 5: mosquittolocal: keepalive 30
2018.11.28 08:24:47 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:24:47 5: mosquittolocal: received PINGRESP
2018.11.28 08:25:18 5: mosquittolocal: keepalive 30
2018.11.28 08:25:18 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:25:18 5: mosquittolocal: received PINGRESP
2018.11.28 08:25:48 5: mosquittolocal: keepalive 30
2018.11.28 08:25:48 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:25:48 5: mosquittolocal: received PINGRESP
2018.11.28 08:26:18 5: mosquittolocal: keepalive 30
2018.11.28 08:26:18 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:26:18 5: mosquittolocal: received PINGRESP
2018.11.28 08:26:48 5: mosquittolocal: keepalive 30
2018.11.28 08:26:48 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:26:48 5: mosquittolocal: received PINGRESP
2018.11.28 08:27:07 0: Server shutdown
2018.11.28 08:27:07 5: mosquittolocal: sending  PUBLISH 0(25)(0)(19)fhempub/d_ccu/statebusy
2018.11.28 08:27:07 1: HMCCURPCPROC: [d_rpcBidCos_RF] Stopping RPC server CB2001178072
2018.11.28 08:27:07 5: mosquittolocal: sending  PUBLISH 0"(0)(28)fhempub/d_rpcBidCos_RF/statebusy
2018.11.28 08:27:07 1: HMCCURPCPROC: [d_rpcBidCos_RF] Deregistering RPC server http://192.168.178.XX:XX/XX with ID CB2001178072 at http://192.168.178.XX:XX
2018.11.28 08:27:07 5: mosquittolocal: sending  PUBLISH 0-(0)(31)fhempub/d_rpcBidCos_RF/rpcstatederegistered
2018.11.28 08:27:07 1: HMCCURPCPROC: [d_rpcBidCos_RF] Callback for RPC server CB2001178072 deregistered
2018.11.28 08:27:07 5: mosquittolocal: sending  PUBLISH 0)(0)(31)fhempub/d_rpcBidCos_RF/rpcstatestopping
2018.11.28 08:27:07 2: HMCCURPCPROC: [d_rpcBidCos_RF] Sending signal INT to RPC server process CB2001178072 with PID=14197
2018.11.28 08:27:07 2: CCURPC: [d_rpcBidCos_RF] CB2001178072 received signal INT
2018.11.28 08:27:07 1: CCURPC: [d_rpcBidCos_RF] RPC server CB2001178072 stopped handling connections. PID=14197
2018.11.28 08:27:07 2: CCURPC: [d_rpcBidCos_RF] Number of I/O errors = 0
2018.11.28 08:27:08 2: HMCCURPCPROC: [d_rpcBidCos_RF] Found no running processes. Cleaning up ...
2018.11.28 08:27:08 1: HMCCURPCPROC: [d_rpcBidCos_RF] Housekeeping called. Cleaning up RPC environment
2018.11.28 08:27:08 5: mosquittolocal: sending  PUBLISH 0)(0)(31)fhempub/d_rpcBidCos_RF/rpcstateinactive
2018.11.28 08:27:08 1: HMCCURPCPROC: [d_rpcBidCos_RF] RPC server process CB2001178072 not runnning
2018.11.28 08:27:08 5: mosquittolocal: sending  PUBLISH 0 (0)(22)fhempub/d_ccu/rpcstateinactive
2018.11.28 08:27:08 1: HMCCU: [d_ccu] All RPC servers inactive
2018.11.28 08:27:08 5: mosquittolocal: sending  PUBLISH 0#(0)(17)fhempub/d_ccu/RPCserver inactive
2018.11.28 08:27:08 5: mosquittolocal: sending  PUBLISH 0(23)(0)(19)fhempub/d_ccu/stateOK
2018.11.28 08:27:08 2: HMCCURPCPROC: [d_rpcBidCos_RF] Stop I/O handling
2018.11.28 08:27:08 5: mosquittolocal: sending  PUBLISH 0 (0)(28)fhempub/d_rpcBidCos_RF/stateOK
2018.11.28 08:27:08 5: mosquittolocal: sending  PUBLISH 08(0)(26)fhempub/d_rpcBidCos_RF/RPCserver CB2001178072 stopped
2018.11.28 08:27:08 5: mosquittolocal: sending  DISCONNECT (224)(0)
2018.11.28 08:27:08 5: SW: e000
2018.11.28 08:27:09 1: Including fhem.cfg
[...]
2018.11.28 08:27:15 0: Server started with 89 defined entities (fhem.pl:17779/2018-11-18 perl:5.024001 os:linux user:fhem pid:16813)
2018.11.28 08:27:15 3: Opening mosquittolocal device smartgulp2:8883
2018.11.28 08:27:15 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:27:15 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:27:15 2: ZWDongle_ProcessSendStack: no ACK, resending message 0107000301020100f9
2018.11.28 08:27:15 5: mosquittolocal: sending  CONNECT (16)D(0)(6)MQIsdp(3)(194)(0)(30)(0)(14)mosquittolocal(0)(4)fhem(0) SECRETPASSWORDGEAENDERT
2018.11.28 08:27:15 3: mosquittolocal device opened
2018.11.28 08:27:15 5: mosquittolocal: received CONNACK (0)(0)
2018.11.28 08:27:15 5: mosquittolocal: sending  SUBSCRIBE (128)(6)(0)(4)(0)(1)#(0)
2018.11.28 08:27:15 5: mosquittolocal: received SUBACK (0)(4)(0)
2018.11.28 08:27:27 2: HMCCURPCPROC: [d_rpcBidCos_RF] RPC server process started for interface BidCos-RF with PID=16817
2018.11.28 08:27:27 2: CCURPC: [d_rpcBidCos_RF] Initializing RPC server CB2001178072 for interface BidCos-RF
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0)(0)(31)fhempub/d_rpcBidCos_RF/rpcstatestarting
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0"(0)(28)fhempub/d_rpcBidCos_RF/statebusy
2018.11.28 08:27:27 1: HMCCURPCPROC: [d_rpcBidCos_RF] RPC server starting
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0(25)(0)(19)fhempub/d_ccu/statebusy
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0,(0)(26)fhempub/d_rpcBidCos_RF/RPCserver starting
2018.11.28 08:27:27 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:27:27 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:27:27 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:27:27 5: mosquittolocal: sending  CONNECT (16)D(0)(6)MQIsdp(3)(194)(0)(30)(0)(14)mosquittolocal(0)(4)fhem(0) SECRETPASSWORTGEAENDERT
2018.11.28 08:27:27 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:27:27 2: HMCCURPCPROC: [d_rpcBidCos_RF] Callback server CB2001178072 created. Listening on port 7411
2018.11.28 08:27:27 2: CCURPC: [d_rpcBidCos_RF] CB2001178072 accepting connections. PID=16817
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0((0)(31)fhempub/d_rpcBidCos_RF/rpcstateworking
2018.11.28 08:27:27 2: HMCCURPCPROC: [d_rpcBidCos_RF] RPC server CB2001178072 enters server loop
2018.11.28 08:27:27 2: HMCCURPCPROC: [d_rpcBidCos_RF] Registering callback http://192.168.178.XX:XX/XX of type A with ID CB2001178072 at http://192.168.178.XX:XX
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0((0)(31)fhempub/d_rpcBidCos_RF/rpcstaterunning
2018.11.28 08:27:27 1: HMCCURPCPROC: [d_rpcBidCos_RF] RPC server CB2001178072 running
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0(31)(0)(22)fhempub/d_ccu/rpcstaterunning
2018.11.28 08:27:27 1: HMCCU: [d_ccu] All RPC servers running
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0"(0)(17)fhempub/d_ccu/RPCserver running
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0:(0)3fhempub/HM_wz_Rolladentaster/0.DEVICE_IN_BOOTLOADERfalse
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0((0)$fhempub/HM_wz_Rolladentaster/batteryok
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0-(0)*fhempub/HM_wz_Rolladentaster/0.RSSI_DEVICE1
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 04(0)-fhempub/HM_wz_Rolladentaster/0.STICKY_UNREACHfalse
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0+(0)&fhempub/HM_wz_Rolladentaster/0.AES_KEYoff
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 04(0)-fhempub/HM_wz_Rolladentaster/0.UPDATE_PENDINGfalse
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0,(0)%fhempub/HM_wz_Rolladentaster/activityalive
2018.11.28 08:27:27 2: CCURPC: [d_rpcBidCos_RF] CB2001178072 NewDevice received 68 device and channel specifications
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 04(0)-fhempub/HM_wz_Rolladentaster/0.CONFIG_PENDINGfalse
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0+(0)(fhempub/HM_wz_Rolladentaster/0.RSSI_PEER1
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 01(0)$fhempub/HM_wz_Rolladentaster/hmstateInitialized
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 01(0)*fhempub/HM_RCV_50_BidCoS_RF/0.INSTALL_MODEfalse
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 00(0)#fhempub/HM_RCV_50_BidCoS_RF/hmstateInitialized
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 09(0)2fhempub/HM_sz_Zentraltaster/0.DEVICE_IN_BOOTLOADERfalse
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 03(0),fhempub/HM_sz_Zentraltaster/0.STICKY_UNREACHfalse
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0,(0))fhempub/HM_sz_Zentraltaster/0.RSSI_DEVICE1
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0'(0)#fhempub/HM_sz_Zentraltaster/batteryok
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 03(0),fhempub/HM_sz_Zentraltaster/0.CONFIG_PENDINGfalse
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0*(0)%fhempub/HM_sz_Zentraltaster/0.AES_KEYoff
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 03(0),fhempub/HM_sz_Zentraltaster/0.UPDATE_PENDINGfalse
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0+(0)$fhempub/HM_sz_Zentraltaster/activityalive
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0*(0)'fhempub/HM_sz_Zentraltaster/0.RSSI_PEER1
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 00(0)#fhempub/HM_sz_Zentraltaster/hmstateInitialized
2018.11.28 08:27:27 2: HMCCU: [d_ccu] Updated devices. Success=3 Failed=0
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0(23)(0)(19)fhempub/d_ccu/stateOK
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 0 (0)(28)fhempub/d_rpcBidCos_RF/stateOK
2018.11.28 08:27:27 5: mosquittolocal: sending  PUBLISH 08(0)(26)fhempub/d_rpcBidCos_RF/RPCserver CB2001178072 running
2018.11.28 08:27:27 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:27:27 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:27:27 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:27:27 5: mosquittolocal: sending  SUBSCRIBE (128)(6)(0)(4)(0)(1)#(0)
2018.11.28 08:27:27 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:27:27 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:27:27 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:27:27 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:27:27 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:27:57 5: mosquittolocal: keepalive 30
2018.11.28 08:27:57 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:27:57 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:27:57 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:27:57 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:27:57 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:28:27 5: mosquittolocal: keepalive 30
2018.11.28 08:28:27 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:28:27 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:28:27 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:28:27 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:28:27 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:28:50 5: mosquittolocal: sending  PUBLISH 0-(0)(22)fhempub/ku_Rollade/CMDZW_APPLICATION_UPDATE
2018.11.28 08:28:50 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:28:50 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:28:50 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:28:50 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:28:56 5: mosquittolocal: sending  PUBLISH 0-(0)(22)fhempub/ku_Rollade/CMDZW_APPLICATION_UPDATE
2018.11.28 08:28:56 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:28:56 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:28:56 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:28:56 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:28:57 5: mosquittolocal: keepalive 30
2018.11.28 08:28:57 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:28:57 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:28:57 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:28:57 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:28:57 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:29:27 5: mosquittolocal: keepalive 30
2018.11.28 08:29:27 5: mosquittolocal: sending  PINGREQ (192)(0)
2018.11.28 08:29:27 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:29:27 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:29:27 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:29:27 1: smartgulp2:8883 reappeared (mosquittolocal)




Das Event-Log von fhem:
2018.11.28 08:20:17 5 : mosquittolocal: keepalive 30
2018.11.28 08:20:17 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:20:17 5 : mosquittolocal: received PINGRESP
2018.11.28 08:20:41 2 : HMCCURPCPROC: [d_rpcBidCos_RF] Received no events from interface CB2001178072 for 600 seconds
2018.11.28 08:20:41 5 : mosquittolocal: sending PUBLISH 0N(0)(25)fhempub/d_rpcBidCos_RF/Noevents from interface CB2001178072 for 600 seconds
2018.11.28 08:20:41 5 : mosquittolocal: received PUBLISH (0)(25)fhempub/d_rpcBidCos_RF/Noevents from interface CB2001178072 for 600 seconds
2018.11.28 08:20:41 5 : mosquittolocal: dispatch mosquittolocal:fhempub/d_rpcBidCos_RF/No:events from interface CB2001178072 for 600 seconds
2018.11.28 08:20:47 5 : mosquittolocal: keepalive 30
2018.11.28 08:20:47 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:20:47 5 : mosquittolocal: received PINGRESP
2018.11.28 08:21:17 5 : mosquittolocal: keepalive 30
2018.11.28 08:21:17 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:21:17 5 : mosquittolocal: received PINGRESP
2018.11.28 08:21:47 5 : mosquittolocal: keepalive 30
2018.11.28 08:21:47 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:21:47 5 : mosquittolocal: received PINGRESP
2018.11.28 08:22:17 5 : mosquittolocal: keepalive 30
2018.11.28 08:22:17 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:22:17 5 : mosquittolocal: received PINGRESP
2018.11.28 08:22:47 5 : mosquittolocal: keepalive 30
2018.11.28 08:22:47 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:22:47 5 : mosquittolocal: received PINGRESP
2018.11.28 08:23:17 5 : mosquittolocal: keepalive 30
2018.11.28 08:23:17 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:23:17 5 : mosquittolocal: received PINGRESP
2018.11.28 08:23:47 5 : mosquittolocal: keepalive 30
2018.11.28 08:23:47 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:23:47 5 : mosquittolocal: received PINGRESP
2018.11.28 08:24:17 5 : mosquittolocal: keepalive 30
2018.11.28 08:24:17 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:24:17 5 : mosquittolocal: received PINGRESP
2018.11.28 08:24:47 5 : mosquittolocal: keepalive 30
2018.11.28 08:24:47 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:24:47 5 : mosquittolocal: received PINGRESP
2018.11.28 08:25:18 5 : mosquittolocal: keepalive 30
2018.11.28 08:25:18 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:25:18 5 : mosquittolocal: received PINGRESP
2018.11.28 08:25:48 5 : mosquittolocal: keepalive 30
2018.11.28 08:25:48 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:25:48 5 : mosquittolocal: received PINGRESP
2018.11.28 08:26:18 5 : mosquittolocal: keepalive 30
2018.11.28 08:26:18 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:26:18 5 : mosquittolocal: received PINGRESP
2018.11.28 08:26:48 5 : mosquittolocal: keepalive 30
2018.11.28 08:26:48 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:26:48 5 : mosquittolocal: received PINGRESP
2018.11.28 08:27:15 5 : mosquittolocal: received SUBACK (0)(4)(0)
2018.11.28 08:27:27 2 : HMCCURPCPROC: [d_rpcBidCos_RF] RPC server process started for interface BidCos-RF with PID=16817
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0)(0)(31)fhempub/d_rpcBidCos_RF/rpcstatestarting
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0"(0)(28)fhempub/d_rpcBidCos_RF/statebusy
2018.11.28 08:27:27 1 : HMCCURPCPROC: [d_rpcBidCos_RF] RPC server starting
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0(25)(0)(19)fhempub/d_ccu/statebusy
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0,(0)(26)fhempub/d_rpcBidCos_RF/RPCserver starting
2018.11.28 08:27:27 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:27:27 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:27:27 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:27:27 5 : mosquittolocal: sending CONNECT (16)D(0)(6)MQIsdp(3)(194)(0)(30)(0)(14)mosquittolocal(0)(4)fhem(0) SECRETPASSWORDGEAENDERT
2018.11.28 08:27:27 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0((0)(31)fhempub/d_rpcBidCos_RF/rpcstateworking
2018.11.28 08:27:27 2 : HMCCURPCPROC: [d_rpcBidCos_RF] RPC server CB2001178072 enters server loop
2018.11.28 08:27:27 2 : HMCCURPCPROC: [d_rpcBidCos_RF] Registering callback http://192.168.178.XX:XX/XX of type A with ID CB2001178072 at http://192.168.178.XX:XX
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0((0)(31)fhempub/d_rpcBidCos_RF/rpcstaterunning
2018.11.28 08:27:27 1 : HMCCURPCPROC: [d_rpcBidCos_RF] RPC server CB2001178072 running
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0(31)(0)(22)fhempub/d_ccu/rpcstaterunning
2018.11.28 08:27:27 1 : HMCCU: [d_ccu] All RPC servers running
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0"(0)(17)fhempub/d_ccu/RPCserver running
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0:(0)3fhempub/HM_wz_Rolladentaster/0.DEVICE_IN_BOOTLOADERfalse
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0((0)$fhempub/HM_wz_Rolladentaster/batteryok
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0-(0)*fhempub/HM_wz_Rolladentaster/0.RSSI_DEVICE1
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 04(0)-fhempub/HM_wz_Rolladentaster/0.STICKY_UNREACHfalse
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0+(0)&fhempub/HM_wz_Rolladentaster/0.AES_KEYoff
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 04(0)-fhempub/HM_wz_Rolladentaster/0.UPDATE_PENDINGfalse
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0,(0)%fhempub/HM_wz_Rolladentaster/activityalive
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 04(0)-fhempub/HM_wz_Rolladentaster/0.CONFIG_PENDINGfalse
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0+(0)(fhempub/HM_wz_Rolladentaster/0.RSSI_PEER1
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 01(0)$fhempub/HM_wz_Rolladentaster/hmstateInitialized
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 01(0)*fhempub/HM_RCV_50_BidCoS_RF/0.INSTALL_MODEfalse
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 00(0)#fhempub/HM_RCV_50_BidCoS_RF/hmstateInitialized
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 09(0)2fhempub/HM_sz_Zentraltaster/0.DEVICE_IN_BOOTLOADERfalse
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 03(0),fhempub/HM_sz_Zentraltaster/0.STICKY_UNREACHfalse
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0,(0))fhempub/HM_sz_Zentraltaster/0.RSSI_DEVICE1
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0'(0)#fhempub/HM_sz_Zentraltaster/batteryok
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 03(0),fhempub/HM_sz_Zentraltaster/0.CONFIG_PENDINGfalse
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0*(0)%fhempub/HM_sz_Zentraltaster/0.AES_KEYoff
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 03(0),fhempub/HM_sz_Zentraltaster/0.UPDATE_PENDINGfalse
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0+(0)$fhempub/HM_sz_Zentraltaster/activityalive
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0*(0)'fhempub/HM_sz_Zentraltaster/0.RSSI_PEER1
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 00(0)#fhempub/HM_sz_Zentraltaster/hmstateInitialized
2018.11.28 08:27:27 2 : HMCCU: [d_ccu] Updated devices. Success=3 Failed=0
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0(23)(0)(19)fhempub/d_ccu/stateOK
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 0 (0)(28)fhempub/d_rpcBidCos_RF/stateOK
2018.11.28 08:27:27 5 : mosquittolocal: sending PUBLISH 08(0)(26)fhempub/d_rpcBidCos_RF/RPCserver CB2001178072 running
2018.11.28 08:27:27 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:27:27 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:27:27 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:27:27 5 : mosquittolocal: sending SUBSCRIBE (128)(6)(0)(4)(0)(1)#(0)
2018.11.28 08:27:27 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:27:27 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:27:27 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:27:27 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:27:27 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:27:57 5 : mosquittolocal: keepalive 30
2018.11.28 08:27:57 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:27:57 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:27:57 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:27:57 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:27:57 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:28:27 5 : mosquittolocal: keepalive 30
2018.11.28 08:28:27 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:28:27 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:28:27 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:28:27 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:28:27 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:28:50 5 : mosquittolocal: sending PUBLISH 0-(0)(22)fhempub/ku_Rollade/CMDZW_APPLICATION_UPDATE
2018.11.28 08:28:50 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:28:50 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:28:50 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:28:50 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:28:56 5 : mosquittolocal: sending PUBLISH 0-(0)(22)fhempub/ku_Rollade/CMDZW_APPLICATION_UPDATE
2018.11.28 08:28:56 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:28:56 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:28:56 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:28:56 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:28:57 5 : mosquittolocal: keepalive 30
2018.11.28 08:28:57 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:28:57 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 08:28:57 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 08:28:57 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 08:28:57 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 08:29:27 5 : mosquittolocal: keepalive 30
2018.11.28 08:29:27 5 : mosquittolocal: sending PINGREQ (192)(0)
2018.11.28 08:29:27 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)


Für den korrekten Abschnitt des Mosquitto-Logfiles noch den Timestamp berechnet: (aus Bequemlichkeit hier, damit ich den Wert gleich beim Fensterwechsel besser finde. :) )
pi@smartgulp2:~ $ date -d '2018-11-28 08:20:17' +%s
1543389617
pi@smartgulp2:~ $ date -d '2018-11-28 08:29:27' +%s
1543390167


Das zugehörige Logfile von Mosquitto (Logging ist auf max mittels: log_type all):
1543389551: Received PINGREQ from mqtt_10d8a6c9.f36389
1543389551: Sending PINGRESP to mqtt_10d8a6c9.f36389
1543389557: Received PINGREQ from mosquittolocal
1543389557: Sending PINGRESP to mosquittolocal
1543389562: Received PINGREQ from MQTT_FX_Client
1543389562: Sending PINGRESP to MQTT_FX_Client
1543389587: Received PINGREQ from mosquittolocal
1543389587: Sending PINGRESP to mosquittolocal
1543389611: Received PINGREQ from mqtt_10d8a6c9.f36389
1543389611: Sending PINGRESP to mqtt_10d8a6c9.f36389
1543390197: Socket error on client <unknown>, disconnecting.
1543390197: New connection from 127.0.0.1 on port 8883.
1543390212: Received PINGREQ from mqtt_10d8a6c9.f36389
1543390212: Sending PINGRESP to mqtt_10d8a6c9.f36389
1543390222: Received PINGREQ from MQTT_FX_Client
1543390222: Sending PINGRESP to MQTT_FX_Client
1543390227: Socket error on client <unknown>, disconnecting.
1543390227: New connection from 127.0.0.1 on port 8883.
1543390257: Socket error on client <unknown>, disconnecting.
1543390257: New connection from 127.0.0.1 on port 8883.
1543390272: Received PINGREQ from mqtt_10d8a6c9.f36389
1543390272: Sending PINGRESP to mqtt_10d8a6c9.f36389
1543390282: Received PINGREQ from MQTT_FX_Client
1543390282: Sending PINGRESP to MQTT_FX_Client
1543390287: Socket error on client <unknown>, disconnecting.
1543390287: New connection from 127.0.0.1 on port 8883.
1543390317: Socket error on client <unknown>, disconnecting.


Nach Neustart des Mosquitto Servers ('2018-11-28 09:43:59' / LTS: 1543394639 kommen folgenden Nachrichten:

fhem Logfile:
2018.11.28 09:43:30 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 09:43:59 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 09:43:59 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:43:59 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:43:59 4: HttpUtils: smartgulp2: Connection refused
2018.11.28 09:44:04 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:44:04 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:44:05 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 09:45:34 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 09:45:34 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:45:34 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:45:34 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 09:47:04 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 09:47:04 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:47:04 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:47:04 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 09:47:27 2: HMCCURPCPROC: [d_rpcBidCos_RF] Received no events from interface CB2001178072 for 600 seconds
2018.11.28 09:47:27 5: mosquittolocal: sending  PUBLISH 0N(0)(25)fhempub/d_rpcBidCos_RF/Noevents from interface CB2001178072 for 600 seconds
2018.11.28 09:47:27 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 09:47:27 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:47:27 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:47:27 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 09:48:56 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 09:48:56 5: HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:48:56 4: IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:48:56 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 09:50:26 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 09:50:26 5: HttpUtils url=https://smartgulp2:8883/


fhem Eventlog:
2018.11.28 09:43:30 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 09:43:59 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 09:43:59 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:43:59 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:43:59 4 : HttpUtils: smartgulp2: Connection refused
2018.11.28 09:44:04 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:44:04 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:44:05 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 09:45:34 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 09:45:34 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:45:34 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:45:34 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 09:47:04 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 09:47:04 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:47:04 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:47:04 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 09:47:27 2 : HMCCURPCPROC: [d_rpcBidCos_RF] Received no events from interface CB2001178072 for 600 seconds
2018.11.28 09:47:27 5 : mosquittolocal: sending PUBLISH 0N(0)(25)fhempub/d_rpcBidCos_RF/Noevents from interface CB2001178072 for 600 seconds
2018.11.28 09:47:27 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 09:47:27 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:47:27 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:47:27 1 : smartgulp2:8883 reappeared (mosquittolocal)
2018.11.28 09:48:56 1 : smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.11.28 09:48:56 5 : HttpUtils url=https://smartgulp2:8883/
2018.11.28 09:48:56 4 : IP: smartgulp2 -> 127.0.1.1
2018.11.28 09:48:56 1 : smartgulp2:8883 reappeared (mosquittolocal)



Mosquitto:
1543394639: mosquitto version 1.4.10 (build date Wed, 17 Oct 2018 19:03:03 +0200) starting
1543394639: Config loaded from /etc/mosquitto/mosquitto.conf.
1543394639: Opening ipv4 listen socket on port 1883.
1543394639: Opening ipv6 listen socket on port 1883.
1543394639: Opening ipv4 listen socket on port 8883.
1543394639: Opening ipv6 listen socket on port 8883.
1543394645: New connection from 127.0.0.1 on port 8883.
1543394654: New connection from 172.18.0.2 on port 8883.
1543394654: New client connected from 172.18.0.2 as mqtt_10d8a6c9.f36389 (c1, k60, u'fhem').
1543394654: Sending CONNACK to mqtt_10d8a6c9.f36389 (0, 0)
1543394654: Received SUBSCRIBE from mqtt_10d8a6c9.f36389
1543394654:     fhempub/ku_Fenstergriff/state (QoS 2)
1543394654: mqtt_10d8a6c9.f36389 2 fhempub/ku_Fenstergriff/state
1543394654:     fhempub/az_Licht/# (QoS 2)
1543394654: mqtt_10d8a6c9.f36389 2 fhempub/az_Licht/#
1543394654: Sending SUBACK to mqtt_10d8a6c9.f36389
1543394714: Received PINGREQ from mqtt_10d8a6c9.f36389
1543394714: Sending PINGRESP to mqtt_10d8a6c9.f36389
1543394734: Client <unknown> has exceeded timeout, disconnecting.



Zum Vergleich auch noch mal das Connecten des MQTT.fx clients und Subscribe auf das Topic "#":
Mosquitto-Log:
1543394799: New connection from 192.168.178.102 on port 8883.
1543394799: New client connected from 192.168.178.102 as MQTT_FX_Client (c1, k60, u'fhem').
1543394799: Sending CONNACK to MQTT_FX_Client (0, 0)
1543394807: Received SUBSCRIBE from MQTT_FX_Client
1543394807:     # (QoS 0)
1543394807: MQTT_FX_Client 0 #
1543394807: Sending SUBACK to MQTT_FX_Client


Ich hoffe, das hilft bei der Fehlersuche. Schon mal vielen, vielen Dank im Voraus für Deinen Einsatz!

rudolfkoenig

Ich kann Einiges nicht erklaeren:
- Wieso bricht die Verbindung um 08:27:27 ab.
- Warum wird nach dem Verbindungsaufbau sofort ein PINGREQ gesendet? Die erste Meldung nach IP:... muss "sending CONNECT" sein, fuer alles Andere is der Verbindungsabbruch der anderen Seite korrekt. Uebrigens bei mir kommt nach IP erst CONNECT+SUBSCRIBE, und PINGREQ nach 30 Sekunden.
- Wieso wird der erneute Verbindungsaufbau nur einmal alle 30 Sekunden versucht? Bei mir wird es einmal sofort, und dann alle 5 Sekunden versucht. Ist FHEM aktuell bzw. ungepatcht?
- In den mosquitto-log finde ich keine passenden Meldungen (hoffentlich sind die beiden Zeitsynchronisiert):
1543390047 == 2018.11.28 08:27:27 => Erster Abbruch in FHEM, keine Zeile in mosquitto
1543390136 == 2018.11.28 08:28:56 => Abbruch in FHEM, keine Zeile in mosquitto
1543390197 == 2018.11.28 08:29:57 => Fehler in mosquitto, FHEM-Log endet vorher.
Ich habe die Vermutung, dass der mosquitto log nicht weiterhilft, weil nur "Socket error" meldet, egal warum.

Ich habe jetzt eine extra Pruefung eingebaut, damit Nachrichten (wie PINGREQ) nur dann gesendet werden, falls die Verbindung mit CONNECT/SUBSCRIBE komplett aufgebaut ist. Vorher werden alle anderen Nachrichten ignoriert und auf verbose 5 als Solches protokolliert. Ist mehr Symptom behandeln, als Ursache fixen, aber vlt. kommen wir damit weiter. Waere nett, wenn Du es testen koenntest.

Weiterhin gibt es ein keepaliveTimeout Attribut, die Voreinstellung ist (wie bisher) 30 Sekunden.

HomeAlone

Zitat von: rudolfkoenig am 28 November 2018, 13:02:30
Ich kann Einiges nicht erklaeren:
- Wieso bricht die Verbindung um 08:27:27 ab.

Der Absturz scheint zu erfolgen, nachdem versucht wird von meinen HomeMatic 6fach Tastern die Statusinfos zu publishen. Vielleicht ein Überlauf von einem Puffer, da alles in derselben Sekunde zu passieren scheint? Macht es Sinn, dass ich testhalber die HM-Geräte aus dem fhem-Publishing der MQTT_GENERIC_BRIDGE rausnehmen?

Zitat von: rudolfkoenig am 28 November 2018, 13:02:30
- Warum wird nach dem Verbindungsaufbau sofort ein PINGREQ gesendet? Die erste Meldung nach IP:... muss "sending CONNECT" sein, fuer alles Andere is der Verbindungsabbruch der anderen Seite korrekt. Uebrigens bei mir kommt nach IP erst CONNECT+SUBSCRIBE, und PINGREQ nach 30 Sekunden.

Kann ich leider auch nicht erklären.

Zitat von: rudolfkoenig am 28 November 2018, 13:02:30
- Wieso wird der erneute Verbindungsaufbau nur einmal alle 30 Sekunden versucht? Bei mir wird es einmal sofort, und dann alle 5 Sekunden versucht. Ist FHEM aktuell bzw. ungepatcht?


FHEM ist aktuell und ungepatched.

Hier die Ausgabe von version:
Latest Revision: 17863

File                      Rev   Last Change

fhem.pl                   17779 2018-11-18 17:49:14Z rudolfkoenig
98_autocreate.pm          17684 2018-11-05 15:52:53Z rudolfkoenig
10_EnOcean.pm             17796 2018-11-20 05:31:33Z klaus.schauer
91_eventTypes.pm          14888 2017-08-13 12:07:12Z rudolfkoenig
01_FHEMWEB.pm             17750 2018-11-15 11:27:54Z rudolfkoenig
92_FileLog.pm             17181 2018-08-20 17:23:26Z rudolfkoenig
88_HMCCU.pm               17824 2018-11-23 08:31:13Z zap
88_HMCCUDEV.pm            17672 2018-11-04 12:40:18Z zap
88_HMCCURPCPROC.pm        17824 2018-11-23 08:31:13Z zap
00_MQTT.pm                17362 2018-09-17 12:57:29Z hexenmeister
00_MQTT2_CLIENT.pm        17848 2018-11-26 09:04:02Z rudolfkoenig
10_MQTT_GENERIC_BRIDGE.pm 17841 2018-11-25 15:06:01Z hexenmeister
91_notify.pm              17225 2018-08-29 12:34:29Z rudolfkoenig
98_structure.pm           16865 2018-06-14 07:21:25Z rudolfkoenig
99_SUNRISE_EL.pm          16632 2018-04-17 19:00:21Z rudolfkoenig
98_SVG.pm                 17779 2018-11-18 17:49:14Z rudolfkoenig
00_TCM.pm                 17688 2018-11-05 18:01:41Z klaus.schauer
98_telnet.pm              17529 2018-10-14 12:57:06Z rudolfkoenig
99_Utils.pm               15713 2017-12-28 11:01:02Z rudolfkoenig
98_version.pm             15140 2017-09-26 09:20:09Z markusbloch
10_ZWave.pm               17186 2018-08-20 20:10:55Z rudolfkoenig
00_ZWDongle.pm            17186 2018-08-20 20:10:55Z rudolfkoenig

AttrTemplate.pm           17782 2018-11-18 20:18:15Z rudolfkoenig
Blocking.pm               17553 2018-10-17 15:56:35Z rudolfkoenig
DevIo.pm                  17702 2018-11-07 19:02:28Z rudolfkoenig
GPUtils.pm                 6653 2014-10-02 11:59:37Z ntruchsess
HMCCUConf.pm              17824 2018-11-23 08:31:13Z zap
HttpUtils.pm              17831 2018-11-24 15:09:17Z rudolfkoenig
RTypes.pm                 10476 2016-01-12 21:03:33Z borisneubert
SetExtensions.pm          17774 2018-11-18 08:13:48Z rudolfkoenig
SubProcess.pm             14334 2017-05-20 23:11:06Z neubert
TcpServerUtils.pm         17529 2018-10-14 12:57:06Z rudolfkoenig
ZWLib.pm                  17186 2018-08-20 20:10:55Z rudolfkoenig

fhemweb.js                 17826 2018-11-23 10:40:33Z rudolfkoenig


Zitat von: rudolfkoenig am 28 November 2018, 13:02:30
- In den mosquitto-log finde ich keine passenden Meldungen (hoffentlich sind die beiden Zeitsynchronisiert):

Die beiden laufen ja aktuell auf demselben System, aber auch dann: auf allen meinen raspis läuft timesyncd (seit Jessy Ersatz zu ntpd):

pi@smartgulp2:~ $ timedatectl
      Local time: Wed 2018-11-28 15:07:30 CET
  Universal time: Wed 2018-11-28 14:07:30 UTC
        RTC time: n/a
       Time zone: Europe/Berlin (CET, +0100)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no


Zitat von: rudolfkoenig am 28 November 2018, 13:02:30
1543390047 == 2018.11.28 08:27:27 => Erster Abbruch in FHEM, keine Zeile in mosquitto
1543390136 == 2018.11.28 08:28:56 => Abbruch in FHEM, keine Zeile in mosquitto
1543390197 == 2018.11.28 08:29:57 => Fehler in mosquitto, FHEM-Log endet vorher.
Ich habe die Vermutung, dass der mosquitto log nicht weiterhilft, weil nur "Socket error" meldet, egal warum.

Ich recherchiere mal, wie man Mosquitto noch mehr Log entlocken kann, als mit log_type all.

Zitat von: rudolfkoenig am 28 November 2018, 13:02:30

Ich habe jetzt eine extra Pruefung eingebaut, damit Nachrichten (wie PINGREQ) nur dann gesendet werden, falls die Verbindung mit CONNECT/SUBSCRIBE komplett aufgebaut ist. Vorher werden alle anderen Nachrichten ignoriert und auf verbose 5 als Solches protokolliert. Ist mehr Symptom behandeln, als Ursache fixen, aber vlt. kommen wir damit weiter. Waere nett, wenn Du es testen koenntest.

Mache ich - vermutlich komme ich aber erst morgen früh wieder dazu.

Zitat von: rudolfkoenig am 28 November 2018, 13:02:30
Weiterhin gibt es ein keepaliveTimeout Attribut, die Voreinstellung ist (wie bisher) 30 Sekunden.

OK, würde ich erst einmal - es sei denn Du sagst es macht Sinn den Wert zu verändern - so belassen.


rudolfkoenig

ZitatMache ich - vermutlich komme ich aber erst morgen früh wieder dazu.
Sorry, habe gerade gesehen, dass ich gestern das Einchecken verpennt habe: ich habe es gerade (samt fhemupdate) nachgeholt.

ZitatDer Absturz scheint zu erfolgen, nachdem versucht wird von meinen HomeMatic 6fach Tastern die Statusinfos zu publishen. Vielleicht ein Überlauf von einem Puffer, da alles in derselben Sekunde zu passieren scheint?
Ich habe jetzt ein dummy angelegt, was mit einem aus einem Forumsbeitrag "geklauten" JSON und json2reading 71 Readings auf einem Ruck aktualisiert. Ein MQTT_GENERIC_BRIDGE schickt die Daten an mosquitto (die ist per MQTT2_CLIENT und SSL angebunden). Ich habe nach mehreren Versuchen keine Probleme gesehen, mosquitto schickt alles brav zurueck, was wiederum das generische MQTT2_DEVICE erneut als FHEM Event zur Verfuegung stellt. Alles in allem viel Verkehr, und kein Verbindungsabbruch.

ZitatMacht es Sinn, dass ich testhalber die HM-Geräte aus dem fhem-Publishing der MQTT_GENERIC_BRIDGE rausnehmen?
Da ich ja offensichtlich nicht weiss, was die Ursache ist, macht vmtl. alles Sinn. :)

HomeAlone

Mir ist gerade aufgefallen, dass - nachdem ich das Passwort für den Benutzer zur Anmeldung am Mosquitto im MQTT2_CLIENT erneut eingegeben habe - (mit demselben Passwort wie vorher), die connects und reconnects aufhören und die Verbindung stabil bleibt.
Das Passwort ist definitiv dasselbe, welches ich vorher verwendet hatte - lief ja auch zu Beginn.
Könnte es da bei der Speicherung ein Problem geben? Ich verwende Sonderzeichen und die Länge ist < 64 Zeichen).

Habe noch nicht die neue Version drauf. Aktuell in Verwendung:
00_MQTT.pm                17362 2018-09-17 12:57:29Z hexenmeister
00_MQTT2_CLIENT.pm        17867 2018-11-29 09:55:51Z rudolfkoenig
10_MQTT_GENERIC_BRIDGE.pm 17841 2018-11-25 15:06:01Z hexenmeister


Wobei ich mich gerade frage, warum 00_MQTT.pm verwendet wird - ich habe kein normales MQTT-Device definiert (gerade noch mal im Raum Everything gecheckt). Wird vermutlich von 10_MQTT_GENERIC_BRIDGE.pm benötigt?

rudolfkoenig

ZitatWird vermutlich von 10_MQTT_GENERIC_BRIDGE.pm benötigt?
Ja, da steht "main::LoadModule("MQTT");"

ZitatKönnte es da bei der Speicherung ein Problem geben?
Klar, allerdings sollte das beim Vergleich der Debug-CONNECT Zeilen einfach feststellbar sein.

hexenmeister

Die MQTT_GENERIC_BRIDGE wurde ursprünglich für MQTT-Modul entwickelt. Die MQTT2*-Unterstützung kam erst neulich dazu. Ich muss überlegen, wie ich es am besten dynamisch machen kann. Also zunächst die IODev-Type bestimmen und dann die (und nur die) benötigten Module laden. Muss allerdings alles durchkämen und sicherstellen, dass keine subs aus MQTT-Modul verwendet werden. Da werden jedoch derzeit auch allgemeingültige Routinen aufgerufen, die nichts mit IO zu tun haben. Also eine Art 'Frühjahresputz' ist angesagt.
Maintainer: MQTT_GENERIC_BRIDGE, SYSMON, SMARTMON, systemd_watchdog, MQTT, MQTT_DEVICE, MQTT_BRIDGE
Contrib: dev_proxy

HomeAlone

Zitat von: rudolfkoenig am 29 November 2018, 11:26:27
Sorry, habe gerade gesehen, dass ich gestern das Einchecken verpennt habe: ich habe es gerade (samt fhemupdate) nachgeholt.
Ich habe jetzt ein dummy angelegt, was mit einem aus einem Forumsbeitrag "geklauten" JSON und json2reading 71 Readings auf einem Ruck aktualisiert. Ein MQTT_GENERIC_BRIDGE schickt die Daten an mosquitto (die ist per MQTT2_CLIENT und SSL angebunden). Ich habe nach mehreren Versuchen keine Probleme gesehen, mosquitto schickt alles brav zurueck, was wiederum das generische MQTT2_DEVICE erneut als FHEM Event zur Verfuegung stellt. Alles in allem viel Verkehr, und kein Verbindungsabbruch.
Da ich ja offensichtlich nicht weiss, was die Ursache ist, macht vmtl. alles Sinn. :)

Ich hatte MQTT2_CLIENT jetzt ein paar Tage stabil laufen. Habe zwar in der Zwischenzeit nicht wirklich etwas gemacht (da mich die Grippe dahingerafft hat), aber vorher war der CLIENT auch ohne mein Hinzutun (nur nach Update) in den connect/disconnect Zyklus gegangen. Die Updates habe ich täglich durchgeführt, um das zu überprüfen, diese waren aber ohne Einfluss, das Modul lief stabil weiter.

Jetzt wollte ich mich gerade daran machen, mit dem toJSON zu experimentieren, um auch korrekten JSON-Code mit dem MQTT2_CLIENT (und wenn das funktioniert, mit der MQTT_GENERIC_BRIDGE) versenden zu können.

Ein einfaches Publish Beispiel funktionierten:
set mosquitolocal publish fhempub/test
ohne den MQTT_CLIENT zum Absturz zu bringen.

Da Node Red aber - zu Recht - über das fehlerhafte JSON-Objekt meckert
ZitatUnexpected end of JSON input
wollte ich den Payload JSON-konform übergeben:

set mosquitolocal publish fhempub/test {toJSON({ 'state' => 'OFF'})}

Das hat meinen MQTT2_CLIENT ins Nirvana - disconnect/connect Orgie - geschickt. Auch ein Neustart von fhem behebt das nicht - der MQTT2_CLIENT befindet sich in der Dauer (dis)connect Schleife.

Hier das Log zu obiger Eingabe:
2018.12.04 09:07:53 5: mosquittolocal: keepalive 30
2018.12.04 09:07:53 5: mosquittolocal: sending PINGREQ (192)(0)
2018.12.04 09:07:53 5: mosquittolocal: received PINGRESP
2018.12.04 09:08:01 5: mosquittolocal: sending PUBLISH 0(14)(0)(12)fhempub/test
2018.12.04 09:08:01 5: mosquittolocal: received PUBLISH (0)(12)fhempub/test
2018.12.04 09:08:01 5: mosquittolocal: dispatch mosquittolocal:fhempub/test:
2018.12.04 09:08:23 5: mosquittolocal: keepalive 30
2018.12.04 09:08:23 5: mosquittolocal: sending PINGREQ (192)(0)
2018.12.04 09:08:23 5: mosquittolocal: received PINGRESP
2018.12.04 09:08:33 5: mosquittolocal: discarding DISCONNECT (224)(0)
2018.12.04 09:08:33 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.12.04 09:08:33 5: HttpUtils url=https://smartgulp2:8883/
2018.12.04 09:08:33 4: IP: smartgulp2 -> 127.0.1.1
2018.12.04 09:08:33 5: mosquittolocal: sending CONNECT (16)0(0)(6)MQIsdp(3)(194)(0)(30)(0)(14)mosquittolocal(0)(4)fhem(0)(12)fhempub/test
2018.12.04 09:08:33 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.12.04 09:08:33 5: mosquittolocal: received CONNACK (0)(5)
2018.12.04 09:08:33 1: mosquittolocal: Connection refused, not authorized
2018.12.04 09:08:33 5: mosquittolocal: discarding DISCONNECT (224)(0)
2018.12.04 09:08:33 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.12.04 09:08:33 5: HttpUtils url=https://smartgulp2:8883/
2018.12.04 09:08:33 4: IP: smartgulp2 -> 127.0.1.1
2018.12.04 09:08:33 5: mosquittolocal: sending CONNECT (16)0(0)(6)MQIsdp(3)(194)(0)(30)(0)(14)mosquittolocal(0)(4)fhem(0)(12)fhempub/test
2018.12.04 09:08:33 1: smartgulp2:8883 reappeared (mosquittolocal)
2018.12.04 09:08:33 5: mosquittolocal: received CONNACK (0)(5)
2018.12.04 09:08:33 1: mosquittolocal: Connection refused, not authorized
2018.12.04 09:08:33 5: mosquittolocal: discarding DISCONNECT (224)(0)
2018.12.04 09:08:33 1: smartgulp2:8883 disconnected, waiting to reappear (mosquittolocal)
2018.12.04 09:08:33 5: HttpUtils url=https://smartgulp2:8883/
2018.12.04 09:08:33 4: IP: smartgulp2 -> 127.0.1.1
2018.12.04 09:08:33 5: mosquittolocal: sending CONNECT (16)0(0)(6)MQIsdp(3)(194)(0)(30)(0)(14)mosquittolocal(0)(4)fhem(0)(12)fhempub/test


Ich denke, das sollte nicht passieren, dass ein Publish den MQTT2_CLIENT unbrauchbar macht.

Nach Neuanlegen des Devices und einem
set mosquitolocal publish fhempub/test { "state":"OFF"}
wird dieses korrekt von Node-Red interpretiert.

Ist es überhaupt möglich, dem publish Perl-Code zu übergeben (siehe mein fehlgeschlagenes Beispiel)?


rudolfkoenig

#104
Zitatset mosquitolocal publish fhempub/test {toJSON({ 'state' => 'OFF'})}
Netter Versuch, aber set publish in MQTT2_CLIENT interpretiert {} nicht als Perl Ausdruck, sondern sendet es unveraendert an den Server.
Sowas ist mW auch nirgendwo dokumentiert, wenn doch, bitte sagen.

Ich habe versucht die Endlosschleife nachzustellen:
- mosquitto mit SSL und aktivierten Benutzer/Passwort gestartet
- MQTT2_CLIENT passend konfiguriert.
- geprueft, dass beim falschen Passwort "Connection refused, not authorized" kommt, danach korrektes Passwort wieder gesetzt
- das erwaehnte set abgesetzt.

Mosquitto liefert das topic zurueck, wg. autocreate erweitert FHEM das angelegte MQTT2_DEVICE, das ein reading mit dem Namen test und mit dem Wert {toJSON({ 'state' => 'OFF'})} kriegt.
=> Works as designed.

Bin bereit weiter zu debuggen, wenn ich das Problem nachstellen kann.

Btw: die Perl Auswertung kann man mittels den global (d.h. fuer alle sets) verfuegbaren Set-Magic errreichen:set mosquitolocal publish fhempub/test {( toJSON({'state'=>'OFF'}) )}

Man achte auf {(...)}