MQTT: Python Tutorials
Install pip install paho-mqtt Contoh sederhana import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on_connect(client, userdata, flags, rc): print("Connected with result code "+str(rc)) # Subscribing in on_connect() means that if we lose the connection and # reconnect then subscriptions will be renewed. client.subscribe("$SYS/#") #
| Penerbit | Taratsa |
|---|---|
| Tahun | 2017-05-21 |
| Bahasa | ind |
| Pengenal | bookid: urn:uuid:6c296bed-8516-50e1-aaeb-517a8a861620 |
Tentang teks
171 kata · sekitar 1 menit baca · lebih panjang dari 21% buku di pustaka ini