Change MQTT example to connect to local network virtual machine.
This commit is contained in:
@@ -22,7 +22,7 @@ def on_disconnect(client, userdata, rc):
|
||||
if rc != 0:
|
||||
print("Unexpected disconnection.")
|
||||
|
||||
mqttc = mqtt.Client(transport="websockets")
|
||||
mqttc = mqtt.Client()
|
||||
|
||||
# mqttc.tls_set_context(context = ssl.create_default_context())
|
||||
|
||||
@@ -30,7 +30,7 @@ mqttc.on_connect = on_connect
|
||||
mqttc.on_disconnect = on_disconnect
|
||||
mqttc.on_message = on_message
|
||||
|
||||
mqttc.connect('iot.eclipse.org', 1883, 60)
|
||||
mqttc.connect('172.16.13.128', 1883, 60)
|
||||
|
||||
mqttc.loop_start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user