Spaces:
Sleeping
Sleeping
Commit ·
37f4cc2
1
Parent(s): f9e2396
updated mqtt over ws
Browse files59 unmodified lines6061626363646518 unmodified lines848586888759 unmodified linesclient = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2,protocol=mqtt.MQTTv5,transport='websockets')client.on_message = on_messageclient.on_connect = on_connectclient.ws_set_options(path="/mqtt", headers=None)client.connect(MQTT_BROKER, 8000, 60)
# Start MQTT loop in a separate thread18 unmodified lines line_plot = gr.LinePlot(query_influxdb_gr, label="InfluxDB", x="time", y="current", every=300)
# Launch the appapp.launch(share=True)app.launch()gradio/app.py+1-2