<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=MQTT%3A_Python_Tutorials</id>
	<title>MQTT: Python Tutorials - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=MQTT%3A_Python_Tutorials"/>
	<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=MQTT:_Python_Tutorials&amp;action=history"/>
	<updated>2026-04-22T21:56:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://lms.onnocenter.or.id/wiki/index.php?title=MQTT:_Python_Tutorials&amp;diff=48120&amp;oldid=prev</id>
		<title>Onnowpurbo: Created page with &quot;==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....&quot;</title>
		<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=MQTT:_Python_Tutorials&amp;diff=48120&amp;oldid=prev"/>
		<updated>2017-05-21T21:21:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==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....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Install==&lt;br /&gt;
&lt;br /&gt;
 pip install paho-mqtt&lt;br /&gt;
&lt;br /&gt;
==Contoh sederhana==&lt;br /&gt;
&lt;br /&gt;
 import paho.mqtt.client as mqtt&lt;br /&gt;
 &lt;br /&gt;
 # The callback for when the client receives a CONNACK response from the server.&lt;br /&gt;
 def on_connect(client, userdata, flags, rc):&lt;br /&gt;
     print(&amp;quot;Connected with result code &amp;quot;+str(rc))&lt;br /&gt;
 &lt;br /&gt;
     # Subscribing in on_connect() means that if we lose the connection and&lt;br /&gt;
     # reconnect then subscriptions will be renewed.&lt;br /&gt;
     client.subscribe(&amp;quot;$SYS/#&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 # The callback for when a PUBLISH message is received from the server.&lt;br /&gt;
 def on_message(client, userdata, msg):&lt;br /&gt;
     print(msg.topic+&amp;quot; &amp;quot;+str(msg.payload))&lt;br /&gt;
 &lt;br /&gt;
 client = mqtt.Client()&lt;br /&gt;
 client.on_connect = on_connect&lt;br /&gt;
 client.on_message = on_message&lt;br /&gt;
 &lt;br /&gt;
 client.connect(&amp;quot;iot.eclipse.org&amp;quot;, 1883, 60)&lt;br /&gt;
 &lt;br /&gt;
 # Blocking call that processes network traffic, dispatches callbacks and&lt;br /&gt;
 # handles reconnecting.&lt;br /&gt;
 # Other loop*() functions are available that give a threaded interface and a&lt;br /&gt;
 # manual interface.&lt;br /&gt;
 client.loop_forever()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* https://pypi.python.org/pypi/paho-mqtt/1.1&lt;br /&gt;
* http://www.steves-internet-guide.com/into-mqtt-python-client/&lt;br /&gt;
* http://www.steves-internet-guide.com/myscripts/&lt;br /&gt;
* http://www.steves-internet-guide.com/subscribing-topics-mqtt-client/&lt;br /&gt;
* http://www.steves-internet-guide.com/client-connections-python-mqtt/&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>