-
-
Save michaelklishin/51a40e9560391b89ad0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import paho.mqtt.client as mqtt | |
def on_connect(client, userdata, flags, rc): | |
print("Connected with result code "+str(rc)) | |
client.subscribe("$SYS/#") | |
client = mqtt.Client() | |
client.on_connect = on_connect | |
# only CA certificate | |
client.tls_set("/Users/antares/Tools/rabbitmq/tls/ca_certificate.pem") | |
# disables peer verification | |
client.tls_insecure_set(True) | |
client.connect("localhost", 8883, 60) | |
client.loop_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment