Last active
August 29, 2015 14:20
-
-
Save tsailiming/8a17745b9b0c4aa6d37f to your computer and use it in GitHub Desktop.
Simple paho mqtt client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/python | |
import paho.mqtt.publish as publish | |
from paho.mqtt.client import MQTTv311 | |
import time | |
for i in xrange(10): | |
publish.single("testing", time.asctime() + ' hello ' + str(i), hostname="localhost",port=1883,protocol=MQTTv311) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment