Browse Source

12/28/2022

BradDev
Joe DiPrima 3 years ago
parent
commit
00b8ed83ec
  1. 10
      mq.py

10
mq.py

@ -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")
Loading…
Cancel
Save