{"id":1360,"date":"2017-09-16T16:38:52","date_gmt":"2017-09-16T07:38:52","guid":{"rendered":"http:\/\/blog.moramcnt.com\/?p=1360"},"modified":"2018-04-04T13:57:15","modified_gmt":"2018-04-04T04:57:15","slug":"%eb%9d%bc%ec%a6%88%eb%b2%a0%eb%a6%ac%ed%8c%8c%ec%9d%b4%ec%97%90-paho-mqtt-%ed%81%b4%eb%9d%bc%ec%9d%b4%ec%96%b8%ed%8a%b8-%ed%85%8c%ec%8a%a4%ed%8a%b8","status":"publish","type":"post","link":"http:\/\/blog.moramcnt.com\/?p=1360","title":{"rendered":"\ub77c\uc988\ubca0\ub9ac\ud30c\uc774\uc5d0 Paho MQTT \ud074\ub77c\uc774\uc5b8\ud2b8 \ud14c\uc2a4\ud2b8"},"content":{"rendered":"<p>1. MQTT \ud074\ub77c\uc774\uc5b8\ud2b8 \uc124\uce58<br \/>\n&#8211; \ub77c\uc988\ubca0\ub9ac\ud30c\uc774\uc5d0\uc11c \uc544\ub798\uc640 \uac19\uc774 \uc785\ub825\ud558\uc5ec mqtt \ud074\ub77c\uc774\uc5b8\ud2b8\ub97c \uc124\uce58\ud55c\ub2e4.<\/p>\n<pre>\r\nsudo pip3 install paho-mqtt\r\n<\/pre>\n<p>2. Publish \ud14c\uc2a4\ud2b8<\/p>\n<pre>\r\nimport paho.mqtt.client as mqtt\r\n\r\nclient = mqtt.Client()\r\nclient.username_pw_set(\"yomile\", \"1234\")\r\nclient.connect(\"192.168.0.9\", 4530, 60)\r\nclient.publish(\"mbizok-client\/iot\/door\/toilet\", \"test\")\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. MQTT \ud074\ub77c\uc774\uc5b8\ud2b8 \uc124\uce58 &#8211; \ub77c\uc988\ubca0\ub9ac\ud30c\uc774\uc5d0\uc11c \uc544\ub798\uc640 \uac19\uc774 \uc785\ub825\ud558\uc5ec mqtt \ud074\ub77c\uc774\uc5b8\ud2b8\ub97c \uc124\uce58\ud55c\ub2e4. sudo pip3 install paho-mqtt 2. Publish \ud14c\uc2a4\ud2b8 import paho.mqtt.client as mqtt client = mqtt.Client() client.username_pw_set(&#8220;yomile&#8221;, &#8220;1234&#8221;) client.connect(&#8220;192.168.0.9&#8221;, 4530, 60) client.publish(&#8220;mbizok-client\/iot\/door\/toilet&#8221;, &#8220;test&#8221;)<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[2,35],"tags":[66,228],"class_list":["post-1360","post","type-post","status-publish","format-standard","hentry","category-2","category-iot","tag-mqtt","tag-python3"],"_links":{"self":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/1360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1360"}],"version-history":[{"count":6,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/1360\/revisions"}],"predecessor-version":[{"id":1693,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/1360\/revisions\/1693"}],"wp:attachment":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1360"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}