|
|
|
@ -1,10 +0,0 @@ |
|
|
|
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") |