1 import paho.mqtt.client
as mqtt
8 print(
"Connected with result code "+str(rc))
10 client = mqtt.Client()
11 client.on_connect = on_connect
13 client = mqtt.Client(
"PlotJuggler-test")
15 client.connect(
"127.0.0.1", 1883, 60)
25 "cos": math.cos(time),
30 ret = client.publish(
"plotjuggler/stuff", json.dumps(data), qos=0 )
31 print( ret.is_published() )