Add will_set declaration
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
|
import umsgpack
|
||||||
import paho.mqtt.client as mqtt
|
import paho.mqtt.client as mqtt
|
||||||
import time
|
import time
|
||||||
import ssl
|
import ssl
|
||||||
import umsgpack
|
|
||||||
|
|
||||||
connected = False
|
connected = False
|
||||||
|
|
||||||
@@ -35,6 +35,8 @@ mqttc.connect('172.16.13.128', 1883, 60)
|
|||||||
|
|
||||||
mqttc.loop_start()
|
mqttc.loop_start()
|
||||||
|
|
||||||
|
mqttc.will_set("hello/test", "Disconnected", )
|
||||||
|
|
||||||
pub = input("Enter something to publish: ")
|
pub = input("Enter something to publish: ")
|
||||||
|
|
||||||
while pub != 'q':
|
while pub != 'q':
|
||||||
|
|||||||
Reference in New Issue
Block a user