--init-file
{
"pre_connect": {
"tinkerforge/register/ip_connection/connected": {"register": true},
"tinkerforge/register/ip_connection/disconnected": {"register": true},
"tinkerforge/register/ip_connection/enumerate": {"register": true}
},
"post_connect": {
"tinkerforge/request/ip_connection/enumerate": "",
"tinkerforge/request/temperature_bricklet/siX/set_temperature_callback_period": {"period":10000},
"tinkerforge/register/temperature_bricklet/siX/temperature": {"register": true}
}
}
SZENARIO1 : start tinkerforge_mqtt, start mosquitto, stop mosquitto, wait, start mosquitto
!!! beim wieder-connecten zum mqtt-broker wird die enumeration NICHT durchgeführt (die befehle f.d. temperature-bricklets aber DOCH !!!
mosquitto log
[rotten@vlap ~]$ mosquitto -v 2>&1 | awk '(($3~"^PUB")||($3~"^SUB")){print;i=1;next}(i>0){i=0;print}'
1608665630: Received SUBSCRIBE from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34
1608665630: tinkerforge/request/# (QoS 0)
1608665630: Sending SUBACK to auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34
1608665630: Received SUBSCRIBE from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34
1608665630: tinkerforge/register/# (QoS 0)
1608665630: Sending SUBACK to auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34
1608665630: Received PUBLISH from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34 (d0, q0, r0, m0, 'tinkerforge/callback/bindings/restart', ... (4 bytes))
1608665630: Received SUBSCRIBE from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34
1608665630: tinkerforge/callback/bindings/restart (QoS 0)
1608665630: Sending SUBACK to auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34
1608665630: Received PUBLISH from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/connected', ... (29 bytes))
1608665630: Received PUBLISH from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (215 bytes))
1608665630: Received PUBLISH from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (215 bytes))
1608665630: Received PUBLISH from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (226 bytes))
1608665630: Received PUBLISH from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (239 bytes))
1608665630: Received PUBLISH from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (233 bytes))
1608665630: Received PUBLISH from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (250 bytes))
1608665634: Received PUBLISH from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34 (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
1608665655: Received PUBLISH from auto-2EDD88C3-26B4-DD9D-C98C-BEE87E941B34 (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
^C
[rotten@vlap ~]$ # ... wait some time
[rotten@vlap ~]$
[rotten@vlap ~]$ mosquitto -v 2>&1 | awk '(($3~"^PUB")||($3~"^SUB")){print;i=1;next}(i>0){i=0;print}'
1608665696: Received SUBSCRIBE from auto-B61BF8CE-693C-6675-FC0E-FA85790E2877
1608665696: tinkerforge/request/# (QoS 0)
1608665696: Sending SUBACK to auto-B61BF8CE-693C-6675-FC0E-FA85790E2877
1608665696: Received SUBSCRIBE from auto-B61BF8CE-693C-6675-FC0E-FA85790E2877
1608665696: tinkerforge/register/# (QoS 0)
1608665696: Sending SUBACK to auto-B61BF8CE-693C-6675-FC0E-FA85790E2877
1608665696: Received SUBSCRIBE from auto-B61BF8CE-693C-6675-FC0E-FA85790E2877
1608665696: tinkerforge/callback/bindings/restart (QoS 0)
1608665696: Sending SUBACK to auto-B61BF8CE-693C-6675-FC0E-FA85790E2877
1608665709: Received PUBLISH from auto-B61BF8CE-693C-6675-FC0E-FA85790E2877 (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
1608665718: Received PUBLISH from auto-B61BF8CE-693C-6675-FC0E-FA85790E2877 (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
1608665732: Received PUBLISH from auto-B61BF8CE-693C-6675-FC0E-FA85790E2877 (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
1608665733: Received PUBLISH from auto-B61BF8CE-693C-6675-FC0E-FA85790E2877 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/disconnected', ... (32 bytes))
1608665733: Received PUBLISH from auto-B61BF8CE-693C-6675-FC0E-FA85790E2877 (d0, q0, r0, m0, 'tinkerforge/callback/bindings/shutdown', ... (4 bytes))
1608665733: Received DISCONNECT from auto-B61BF8CE-693C-6675-FC0E-FA85790E2877
^C
[rotten@vlap ~]$
tinkerforge_mqtt log
[rotten@vlap-wp tf]$ tinkerforge_mqtt --init-file tf-std.json --ipcon-port 44445 --debug
2020-12-22 20:33:35,015 <INFO> MQTT bindings: Starting Tinkerforge MQTT bindings 2.0.12
2020-12-22 20:33:35,015 <DEBUG> MQTT bindings: Configuring connection to MQTT broker at localhost:1883
2020-12-22 20:33:35,015 <DEBUG> MQTT bindings: Connected to MQTT broker at localhost:1883
2020-12-22 20:33:35,017 <INFO> MQTT bindings: Could not connect to MQTT Broker. Will retry.
2020-12-22 20:33:35,018 <DEBUG> paho.mqtt.client: Connection failed, retrying
2020-12-22 20:33:38,022 <INFO> MQTT bindings: Could not connect to MQTT Broker. Will retry.
2020-12-22 20:33:38,023 <DEBUG> paho.mqtt.client: Connection failed, retrying
2020-12-22 20:33:42,026 <INFO> MQTT bindings: Could not connect to MQTT Broker. Will retry.
2020-12-22 20:33:42,026 <DEBUG> paho.mqtt.client: Connection failed, retrying
2020-12-22 20:33:50,029 <DEBUG> paho.mqtt.client: Sending CONNECT (u0, p0, wr0, wq0, wf1, c1, k60) client_id=b''
2020-12-22 20:33:50,029 <DEBUG> paho.mqtt.client: Received CONNACK (0, 0)
2020-12-22 20:33:50,029 <DEBUG> MQTT bindings: Connected to mqtt broker.
2020-12-22 20:33:50,029 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m1) [(b'tinkerforge/request/#', 0)]
2020-12-22 20:33:50,030 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m2) [(b'tinkerforge/register/#', 0)]
2020-12-22 20:33:50,030 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m3), 'b'tinkerforge/callback/bindings/restart'', ... (4 bytes)
2020-12-22 20:33:50,030 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m4) [(b'tinkerforge/callback/bindings/restart', 0)]
2020-12-22 20:33:50,030 <DEBUG> MQTT bindings:
2020-12-22 20:33:50,031 <DEBUG> MQTT bindings: Registered ip connection callback 0 under topic tinkerforge/callback/ip_connection/connected.
2020-12-22 20:33:50,031 <DEBUG> MQTT bindings:
2020-12-22 20:33:50,031 <DEBUG> MQTT bindings: Registered ip connection callback 1 under topic tinkerforge/callback/ip_connection/disconnected.
2020-12-22 20:33:50,031 <DEBUG> MQTT bindings:
2020-12-22 20:33:50,031 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 20:33:50,031 <DEBUG> MQTT bindings: Registered ip connection callback 253 under topic tinkerforge/callback/ip_connection/enumerate.
2020-12-22 20:33:50,032 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 20:33:50,032 <DEBUG> MQTT bindings: Connecting to brickd at localhost:44445
2020-12-22 20:33:50,032 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 20:33:50,034 <DEBUG> MQTT bindings: Connected to Brick Daemon: Connection established after request from user.
2020-12-22 20:33:50,034 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m5), 'b'tinkerforge/callback/ip_connection/connected'', ... (29 bytes)
2020-12-22 20:33:50,034 <DEBUG> MQTT bindings: Connected to brickd at localhost:44445
2020-12-22 20:33:50,035 <DEBUG> MQTT bindings:
2020-12-22 20:33:50,035 <DEBUG> MQTT bindings: Enumerating devices.
2020-12-22 20:33:50,035 <DEBUG> MQTT bindings:
2020-12-22 20:33:50,035 <DEBUG> MQTT bindings: Calling function set_temperature_callback_period for device siX of type temperature_bricklet.
2020-12-22 20:33:50,113 <DEBUG> MQTT bindings: Device connected: 2GYM6W at 0 (Pos 0), Hardware: 1.0.0, Firmware: 2.0.3, Dev ID: 17
2020-12-22 20:33:50,113 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m6), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (215 bytes)
2020-12-22 20:33:50,197 <DEBUG> MQTT bindings: Device available: 2GYM6W at 0 (Pos 0), Hardware: 1.0.0, Firmware: 2.0.3, Dev ID: 17
2020-12-22 20:33:50,198 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m7), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (215 bytes)
2020-12-22 20:33:50,199 <DEBUG> MQTT bindings: Device available: 6CPXd6 at 2GYM6W (Pos 1), Hardware: 1.0.0, Firmware: 2.4.9, Dev ID: 13
2020-12-22 20:33:50,200 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m8), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (226 bytes)
2020-12-22 20:33:50,200 <DEBUG> MQTT bindings: Device available: siX at 6CPXd6 (Pos b), Hardware: 1.1.0, Firmware: 2.0.4, Dev ID: 216
2020-12-22 20:33:50,201 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m9), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (239 bytes)
2020-12-22 20:33:50,202 <DEBUG> MQTT bindings: Device available: qRa at 6CPXd6 (Pos d), Hardware: 1.1.0, Firmware: 2.0.2, Dev ID: 27
2020-12-22 20:33:50,202 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m10), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (233 bytes)
2020-12-22 20:33:50,203 <DEBUG> MQTT bindings: Device available: EBH at 6CPXd6 (Pos a), Hardware: 1.0.0, Firmware: 2.0.3, Dev ID: 289
2020-12-22 20:33:50,203 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m11), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (250 bytes)
2020-12-22 20:33:50,235 <DEBUG> MQTT bindings: Calling function set_temperature_callback_period for device siX of type temperature_bricklet succedded.
2020-12-22 20:33:50,235 <DEBUG> MQTT bindings:
2020-12-22 20:33:50,235 <DEBUG> MQTT bindings: Registered callback temperature for device siX of type temperature_bricklet. Will publish messages to tinkerforge/callback/temperature_bricklet/siX/temperature.
2020-12-22 20:33:54,045 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m12), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
2020-12-22 20:34:15,549 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m13), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
2020-12-22 20:34:26,069 <INFO> MQTT bindings: Could not connect to MQTT Broker. Will retry.
2020-12-22 20:34:26,069 <DEBUG> paho.mqtt.client: Connection failed, retrying
2020-12-22 20:34:28,073 <INFO> MQTT bindings: Could not connect to MQTT Broker. Will retry.
2020-12-22 20:34:28,074 <DEBUG> paho.mqtt.client: Connection failed, retrying
2020-12-22 20:34:32,077 <INFO> MQTT bindings: Could not connect to MQTT Broker. Will retry.
2020-12-22 20:34:32,078 <DEBUG> paho.mqtt.client: Connection failed, retrying
2020-12-22 20:34:40,081 <INFO> MQTT bindings: Could not connect to MQTT Broker. Will retry.
2020-12-22 20:34:40,082 <DEBUG> paho.mqtt.client: Connection failed, retrying
2020-12-22 20:34:56,086 <DEBUG> paho.mqtt.client: Sending CONNECT (u0, p0, wr0, wq0, wf1, c1, k60) client_id=b''
2020-12-22 20:34:56,087 <DEBUG> paho.mqtt.client: Received CONNACK (0, 0)
2020-12-22 20:34:56,087 <DEBUG> MQTT bindings: Connected to mqtt broker.
2020-12-22 20:34:56,087 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m17) [(b'tinkerforge/request/#', 0)]
2020-12-22 20:34:56,088 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m18) [(b'tinkerforge/register/#', 0)]
2020-12-22 20:34:56,088 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m19) [(b'tinkerforge/callback/bindings/restart', 0)]
2020-12-22 20:34:56,089 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 20:34:56,090 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 20:34:56,090 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 20:35:09,105 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m20), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
2020-12-22 20:35:18,973 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m21), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
2020-12-22 20:35:32,555 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m22), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
^C2020-12-22 20:35:33,687 <DEBUG> MQTT bindings: Disconnecting from brickd and mqtt broker.
2020-12-22 20:35:33,788 <DEBUG> MQTT bindings: Disconnected from Brick Daemon: Disconnect was requested by user.
2020-12-22 20:35:33,789 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m23), 'b'tinkerforge/callback/ip_connection/disconnected'', ... (32 bytes)
2020-12-22 20:35:33,790 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m24), 'b'tinkerforge/callback/bindings/shutdown'', ... (4 bytes)
2020-12-22 20:35:33,791 <DEBUG> paho.mqtt.client: Sending DISCONNECT
[rotten@vlap-wp tf]$
SZENARIO2 start mosquitto, start tinkerforge_mqtt, connection zu brickd unterbrechen/wiederherstellen : 1. mal "kurz", 2.mal "lang"
beim wieder-connecten zum brickd wird die enumeration NICHT durchgeführt (die befehle f.d. temperature-bricklets aber DOCH !!!
mosquitto log
[rotten@vlap ~]$ mosquitto -v 2>&1 | awk '(($3~"^PUB")||($3~"^SUB")){print;i=1;next}(i>0){i=0;print}'
1608668265: Received SUBSCRIBE from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838
1608668265: tinkerforge/request/# (QoS 0)
1608668265: Sending SUBACK to auto-5B1E6410-87AF-0E4C-3787-DF2D85582838
1608668265: Received SUBSCRIBE from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838
1608668265: tinkerforge/register/# (QoS 0)
1608668265: Sending SUBACK to auto-5B1E6410-87AF-0E4C-3787-DF2D85582838
1608668265: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/bindings/restart', ... (4 bytes))
1608668265: Received SUBSCRIBE from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838
1608668265: tinkerforge/callback/bindings/restart (QoS 0)
1608668265: Sending SUBACK to auto-5B1E6410-87AF-0E4C-3787-DF2D85582838
1608668265: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/connected', ... (29 bytes))
1608668265: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (215 bytes))
1608668265: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (215 bytes))
1608668265: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (226 bytes))
1608668265: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (239 bytes))
1608668265: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (233 bytes))
1608668265: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (250 bytes))
1608668273: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
1608668283: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
1608668312: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
1608668315: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/disconnected', ... (33 bytes))
1608668326: Received PINGREQ from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838
1608668415: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/connected', ... (36 bytes))
1608668415: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/enumerate', ... (215 bytes))
1608668420: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
1608668446: Received PINGREQ from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838
1608668473: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
1608668483: Received PUBLISH from auto-5B1E6410-87AF-0E4C-3787-DF2D85582838 (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
^C^
[rotten@vlap ~]$ mosquitto -v 2>&1 | awk '(($3~"^PUB")||($3~"^SUB")){print;i=1;next}(i>0){i=0;print}'
1608668528: Received SUBSCRIBE from auto-789C9A36-55FE-8919-8859-89627A21EBCC
1608668528: tinkerforge/request/# (QoS 0)
1608668528: Sending SUBACK to auto-789C9A36-55FE-8919-8859-89627A21EBCC
1608668528: Received SUBSCRIBE from auto-789C9A36-55FE-8919-8859-89627A21EBCC
1608668528: tinkerforge/register/# (QoS 0)
1608668528: Sending SUBACK to auto-789C9A36-55FE-8919-8859-89627A21EBCC
1608668528: Received SUBSCRIBE from auto-789C9A36-55FE-8919-8859-89627A21EBCC
1608668528: tinkerforge/callback/bindings/restart (QoS 0)
1608668528: Sending SUBACK to auto-789C9A36-55FE-8919-8859-89627A21EBCC
1608668534: Received PUBLISH from auto-789C9A36-55FE-8919-8859-89627A21EBCC (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
1608668544: Received PUBLISH from auto-789C9A36-55FE-8919-8859-89627A21EBCC (d0, q0, r0, m0, 'tinkerforge/callback/temperature_bricklet/siX/temperature', ... (21 bytes))
1608668561: Received PUBLISH from auto-789C9A36-55FE-8919-8859-89627A21EBCC (d0, q0, r0, m0, 'tinkerforge/callback/ip_connection/disconnected', ... (32 bytes))
1608668561: Received PUBLISH from auto-789C9A36-55FE-8919-8859-89627A21EBCC (d0, q0, r0, m0, 'tinkerforge/callback/bindings/shutdown', ... (4 bytes))
1608668561: Received DISCONNECT from auto-789C9A36-55FE-8919-8859-89627A21EBCC
^C
[rotten@vlap ~]$
tinkerforge_mqtt log
[rotten@vlap-wp tf]$ tinkerforge_mqtt --init-file tf-std.json --ipcon-port 44445 --debug
2020-12-22 21:17:45,851 <INFO> MQTT bindings: Starting Tinkerforge MQTT bindings 2.0.12
2020-12-22 21:17:45,851 <DEBUG> MQTT bindings: Configuring connection to MQTT broker at localhost:1883
2020-12-22 21:17:45,851 <DEBUG> MQTT bindings: Connected to MQTT broker at localhost:1883
2020-12-22 21:17:45,854 <DEBUG> paho.mqtt.client: Sending CONNECT (u0, p0, wr0, wq0, wf1, c1, k60) client_id=b''
2020-12-22 21:17:45,854 <DEBUG> paho.mqtt.client: Received CONNACK (0, 0)
2020-12-22 21:17:45,854 <DEBUG> MQTT bindings: Connected to mqtt broker.
2020-12-22 21:17:45,854 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m1) [(b'tinkerforge/request/#', 0)]
2020-12-22 21:17:45,854 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m2) [(b'tinkerforge/register/#', 0)]
2020-12-22 21:17:45,855 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m3), 'b'tinkerforge/callback/bindings/restart'', ... (4 bytes)
2020-12-22 21:17:45,855 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m4) [(b'tinkerforge/callback/bindings/restart', 0)]
2020-12-22 21:17:45,855 <DEBUG> MQTT bindings:
2020-12-22 21:17:45,855 <DEBUG> MQTT bindings: Registered ip connection callback 0 under topic tinkerforge/callback/ip_connection/connected.
2020-12-22 21:17:45,855 <DEBUG> MQTT bindings:
2020-12-22 21:17:45,855 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 21:17:45,855 <DEBUG> MQTT bindings: Registered ip connection callback 1 under topic tinkerforge/callback/ip_connection/disconnected.
2020-12-22 21:17:45,855 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 21:17:45,855 <DEBUG> MQTT bindings:
2020-12-22 21:17:45,856 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 21:17:45,856 <DEBUG> MQTT bindings: Registered ip connection callback 253 under topic tinkerforge/callback/ip_connection/enumerate.
2020-12-22 21:17:45,856 <DEBUG> MQTT bindings: Connecting to brickd at localhost:44445
2020-12-22 21:17:45,857 <DEBUG> MQTT bindings: Connected to Brick Daemon: Connection established after request from user.
2020-12-22 21:17:45,857 <DEBUG> MQTT bindings: Connected to brickd at localhost:44445
2020-12-22 21:17:45,857 <DEBUG> MQTT bindings:
2020-12-22 21:17:45,857 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m5), 'b'tinkerforge/callback/ip_connection/connected'', ... (29 bytes)
2020-12-22 21:17:45,857 <DEBUG> MQTT bindings: Enumerating devices.
2020-12-22 21:17:45,857 <DEBUG> MQTT bindings:
2020-12-22 21:17:45,857 <DEBUG> MQTT bindings: Calling function set_temperature_callback_period for device siX of type temperature_bricklet.
2020-12-22 21:17:45,937 <DEBUG> MQTT bindings: Device connected: 2GYM6W at 0 (Pos 0), Hardware: 1.0.0, Firmware: 2.0.3, Dev ID: 17
2020-12-22 21:17:45,938 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m6), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (215 bytes)
2020-12-22 21:17:45,970 <DEBUG> MQTT bindings: Device available: 2GYM6W at 0 (Pos 0), Hardware: 1.0.0, Firmware: 2.0.3, Dev ID: 17
2020-12-22 21:17:45,971 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m7), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (215 bytes)
2020-12-22 21:17:45,972 <DEBUG> MQTT bindings: Device available: 6CPXd6 at 2GYM6W (Pos 1), Hardware: 1.0.0, Firmware: 2.4.9, Dev ID: 13
2020-12-22 21:17:45,972 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m8), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (226 bytes)
2020-12-22 21:17:45,974 <DEBUG> MQTT bindings: Device available: siX at 6CPXd6 (Pos b), Hardware: 1.1.0, Firmware: 2.0.4, Dev ID: 216
2020-12-22 21:17:45,974 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m9), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (239 bytes)
2020-12-22 21:17:45,975 <DEBUG> MQTT bindings: Device available: qRa at 6CPXd6 (Pos d), Hardware: 1.1.0, Firmware: 2.0.2, Dev ID: 27
2020-12-22 21:17:45,975 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m10), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (233 bytes)
2020-12-22 21:17:45,976 <DEBUG> MQTT bindings: Device available: EBH at 6CPXd6 (Pos a), Hardware: 1.0.0, Firmware: 2.0.3, Dev ID: 289
2020-12-22 21:17:45,976 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m11), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (250 bytes)
2020-12-22 21:17:46,011 <DEBUG> MQTT bindings: Calling function set_temperature_callback_period for device siX of type temperature_bricklet succedded.
2020-12-22 21:17:46,012 <DEBUG> MQTT bindings:
2020-12-22 21:17:46,012 <DEBUG> MQTT bindings: Registered callback temperature for device siX of type temperature_bricklet. Will publish messages to tinkerforge/callback/temperature_bricklet/siX/temperature.
2020-12-22 21:17:53,550 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m12), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
2020-12-22 21:18:03,483 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m13), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
2020-12-22 21:18:32,770 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m14), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
2020-12-22 21:18:35,085 <DEBUG> MQTT bindings: Disconnected from Brick Daemon: Disconnect initiated by Brick Daemon or WIFI/Ethernet Extension.
2020-12-22 21:18:35,085 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m15), 'b'tinkerforge/callback/ip_connection/disconnected'', ... (33 bytes)
2020-12-22 21:18:46,098 <DEBUG> paho.mqtt.client: Sending PINGREQ
2020-12-22 21:18:46,099 <DEBUG> paho.mqtt.client: Received PINGRESP
2020-12-22 21:19:46,157 <DEBUG> paho.mqtt.client: Sending PINGREQ
2020-12-22 21:19:46,158 <DEBUG> paho.mqtt.client: Received PINGRESP
2020-12-22 21:20:15,063 <DEBUG> MQTT bindings: Connected to Brick Daemon: Connection after auto-reconnect.
2020-12-22 21:20:15,063 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m16), 'b'tinkerforge/callback/ip_connection/connected'', ... (36 bytes)
2020-12-22 21:20:15,230 <DEBUG> MQTT bindings: Device connected: 2GYM6W at 0 (Pos 0), Hardware: 1.0.0, Firmware: 2.0.3, Dev ID: 17
2020-12-22 21:20:15,230 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m17), 'b'tinkerforge/callback/ip_connection/enumerate'', ... (215 bytes)
2020-12-22 21:20:20,599 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m18), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
2020-12-22 21:20:46,626 <DEBUG> paho.mqtt.client: Sending PINGREQ
2020-12-22 21:20:46,627 <DEBUG> paho.mqtt.client: Received PINGRESP
2020-12-22 21:21:13,540 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m19), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
2020-12-22 21:21:23,475 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m20), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
2020-12-22 21:21:38,205 <INFO> MQTT bindings: Could not connect to MQTT Broker. Will retry.
2020-12-22 21:21:38,205 <DEBUG> paho.mqtt.client: Connection failed, retrying
2020-12-22 21:21:40,208 <INFO> MQTT bindings: Could not connect to MQTT Broker. Will retry.
2020-12-22 21:21:40,209 <DEBUG> paho.mqtt.client: Connection failed, retrying
2020-12-22 21:21:44,211 <INFO> MQTT bindings: Could not connect to MQTT Broker. Will retry.
2020-12-22 21:21:44,211 <DEBUG> paho.mqtt.client: Connection failed, retrying
2020-12-22 21:21:52,214 <INFO> MQTT bindings: Could not connect to MQTT Broker. Will retry.
2020-12-22 21:21:52,215 <DEBUG> paho.mqtt.client: Connection failed, retrying
2020-12-22 21:22:08,219 <DEBUG> paho.mqtt.client: Sending CONNECT (u0, p0, wr0, wq0, wf1, c1, k60) client_id=b''
2020-12-22 21:22:08,220 <DEBUG> paho.mqtt.client: Received CONNACK (0, 0)
2020-12-22 21:22:08,220 <DEBUG> MQTT bindings: Connected to mqtt broker.
2020-12-22 21:22:08,220 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m21) [(b'tinkerforge/request/#', 0)]
2020-12-22 21:22:08,221 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m22) [(b'tinkerforge/register/#', 0)]
2020-12-22 21:22:08,221 <DEBUG> paho.mqtt.client: Sending SUBSCRIBE (d0, m23) [(b'tinkerforge/callback/bindings/restart', 0)]
2020-12-22 21:22:08,222 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 21:22:08,223 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 21:22:08,223 <DEBUG> paho.mqtt.client: Received SUBACK
2020-12-22 21:22:14,267 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m24), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
2020-12-22 21:22:24,404 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m25), 'b'tinkerforge/callback/temperature_bricklet/siX/temperature'', ... (21 bytes)
^C2020-12-22 21:22:41,761 <DEBUG> MQTT bindings: Disconnecting from brickd and mqtt broker.
2020-12-22 21:22:41,863 <DEBUG> MQTT bindings: Disconnected from Brick Daemon: Disconnect was requested by user.
2020-12-22 21:22:41,863 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m26), 'b'tinkerforge/callback/ip_connection/disconnected'', ... (32 bytes)
2020-12-22 21:22:41,864 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m27), 'b'tinkerforge/callback/bindings/shutdown'', ... (4 bytes)
2020-12-22 21:22:41,865 <DEBUG> paho.mqtt.client: Sending DISCONNECT
[rotten@vlap-wp tf]$
ALLGREMEIN :
die funktionelle differenzierung im inti-file (pre_connect, post_connect) ist wirklich eine gute sache !!!
1) ich würde mir hier noch "verbesserungen" bzw sinnvolle "features" wünschen wie pre_reconnect, post_reconnect, post_disconnect, ... das würde manche sachen erheblich vereinfachen, da man damit die zustansmaschine für ein
-> mqtt-topic-translation-gateway (an dem ich gerade arbeite) <-
recht nett über message_callback_add() umsetzen könnte
lg wp