Skip to content Skip to sidebar Skip to footer

(error Module) Python Mqtt_listen_sensor_data.py

I'm trying to store my MQTT data in SQLITE database on raspberry. What am I doing wrong to get the error below? CODE: import paho.mqtt.client as mqtt from store_Sensor_Data_to_DB i

Solution 1:

The Paho Python client takes a host & port not a URL for it's connect method.

connect(host, port=1883, keepalive=60, bind_address="")

So you should edit broker definition at the top of the script.

MQTT_Broker = "localhost"

Post a Comment for "(error Module) Python Mqtt_listen_sensor_data.py"