def on_message(client, userdata, msg): print("MQTT Data Received...") print("MQTT Topic: " + msg.topic) print("Data: " + str(msg.payload)) try: Sensor(msg.payload) except: print("Error insert database!!")
def on_message(client, userdata, msg): # This is the Master Call for saving MQTT Data into DB # For details of "sensor_Data_Handler" function please refer "sensor_data_to_db.py" print("MQTT Data Received...") print("MQTT Topic: " + msg.topic) print("Data: " + str(msg.payload)) try: Sensor(msg.payload) except: print("Error insert database!!")
def on_message(client, userdata, msg): print("MQTT DATA RECEVICED...") print("MQTT Topic: " + msg.topic) print("Data: " + str(msg.payload)) Sensor(msg.payload)
def on_message(client, userdata, msg): print("MQTT Data Received...") print("MQTT Topic: " + msg.topic) print("Data: " + str(msg.payload)) Sensor(msg.payload)