You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
462 B
10 lines
462 B
import paho.mqtt.client as mqtt #import the client1
|
|
broker_address="192.168.86.27"
|
|
#broker_address="iot.eclipse.org"
|
|
print("creating new instance")
|
|
client = mqtt.Client("P1") #create new instance
|
|
client.username_pw_set("homeassistant", "oes5gohng9gau1Quei2ohpixashi4Thidoon1shohGai2mae0ru2zaph2vooshai")
|
|
print("connecting to broker")
|
|
client.connect(broker_address) #connect to broker
|
|
username = "butthead three"
|
|
client.publish("mutants", username + "just died")
|