Add test code for using message pack with python mqtt
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import paho.mqtt.client as mqtt
|
||||
import time
|
||||
import ssl
|
||||
import umsgpack
|
||||
|
||||
connected = False
|
||||
|
||||
@@ -38,6 +39,7 @@ pub = input("Enter something to publish: ")
|
||||
|
||||
while pub != 'q':
|
||||
if(connected):
|
||||
|
||||
mqttc.publish('hello/test', pub)
|
||||
pub = input("Enter something to publish: ")
|
||||
print('Message is: ' + pub)
|
||||
|
||||
Reference in New Issue
Block a user