From 137be4f25f470469fd25715c907eabb69616df9c Mon Sep 17 00:00:00 2001 From: Michael Pivato Date: Mon, 14 Jan 2019 12:25:47 +1030 Subject: [PATCH] Add test code for using message pack with python mqtt --- Messaging/clientEx copy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Messaging/clientEx copy.py b/Messaging/clientEx copy.py index ea4d6bd..d91e0c4 100644 --- a/Messaging/clientEx copy.py +++ b/Messaging/clientEx copy.py @@ -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)