mqtt2sql
mqtt2sql copied to clipboard
no messages received
Discussed in https://github.com/curzon01/mqtt2sql/discussions/36
Originally posted by DerDoubleD October 10, 2025 Please help me again.
The script appears to start normally and continues to run until I stop it. But it seems that no messages are being received from MQTT. I checked it with MQTTfx, and messages are being sent to the correct topic.
2025-10-10 18:52:31: mqtt2sql.py[34852] v3.0.4 start
2025-10-10 18:52:31: MQTT server: 127.0.0.1:1883 keepalive 60
2025-10-10 18:52:31: user: None
2025-10-10 18:52:31: topics: wetterstation/#
2025-10-10 18:52:31: exclude: None
2025-10-10 18:52:31: SQL type: MySQL
2025-10-10 18:52:31: server: 127.0.0.1:3306 [max 50 connections]
2025-10-10 18:52:31: db: mbcbwetter
2025-10-10 18:52:31: table: mqtt
2025-10-10 18:52:31: user: mbcbwetter
2025-10-10 18:52:31: timezone: UTC
2025-10-10 18:52:31: Log file: /opt/testmqtt2sql/mqtt2sql/log_mqtt2sql.log
2025-10-10 18:52:31: Debug level: 1
2025-10-10 18:52:31: Verbose level: 1
also a paho_mqtt script on the same server delivers results
import paho.mqtt.client as paho
def on_subscribe(client, userdata, mid, granted_qos):
print("Subscribed: "+str(mid)+" "+str(granted_qos))
def on_message(client, userdata, msg):
print(msg.topic+" "+str(msg.qos)+" "+str(msg.payload))
client = paho.Client()
client.on_subscribe = on_subscribe
client.on_message = on_message
client.connect('localhost', 1883)
client.subscribe('wetterstation/#', qos=1)
client.loop_forever()
client = paho.Client()
Subscribed: 1 (1,)
wetterstation 0 b'60\n\n\n\n'
wetterstation 0 b'60\n\n\n\n'
wetterstation 0 b'60\n\n\n\n'
wetterstation 0 b'60\n\n\n\n'
How could I debug better to further narrow down my error?