{"id":3014,"date":"2019-03-11T17:57:01","date_gmt":"2019-03-11T10:57:01","guid":{"rendered":"http:\/\/ton.packetlove.com\/blog\/?p=3014"},"modified":"2021-06-28T16:22:16","modified_gmt":"2021-06-28T09:22:16","slug":"line-bot-node-js-mqtt-esp32-iot-2","status":"publish","type":"post","link":"https:\/\/ton.packetlove.com\/blog\/iot\/line-bot-node-js-mqtt-esp32-iot-2.html","title":{"rendered":"LINE Bot + node.js + MQTT + ESP32 (IoT) \u0e40\u0e1b\u0e34\u0e14\/\u0e1b\u0e34\u0e14 \u0e44\u0e1f (\u0e15\u0e2d\u0e19\u0e17\u0e35\u0e48 2)"},"content":{"rendered":"<p>\u0e2a\u0e27\u0e31\u0e2a\u0e14\u0e35\u0e04\u0e23\u0e31\u0e1a \u0e08\u0e32\u0e01\u0e15\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 \u0e17\u0e35\u0e48\u0e1c\u0e21\u0e1e\u0e39\u0e14\u0e16\u0e36\u0e07\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e15\u0e48\u0e32\u0e07\u0e46 \u0e17\u0e35\u0e48\u0e08\u0e30\u0e43\u0e0a\u0e49\u0e43\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33 \u0e23\u0e30\u0e1a\u0e1a\u0e40\u0e1b\u0e34\u0e14\/\u0e1b\u0e34\u0e14 \u0e44\u0e1f<br \/>\n\u0e27\u0e48\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e43\u0e0a\u0e49\u0e2d\u0e30\u0e44\u0e23\u0e1a\u0e49\u0e32\u0e07 \u0e27\u0e31\u0e19\u0e19\u0e35\u0e49 \u0e08\u0e30\u0e21\u0e32\u0e25\u0e07\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14 \u0e43\u0e19\u0e41\u0e15\u0e48\u0e25\u0e30\u0e2a\u0e48\u0e27\u0e19\u0e01\u0e31\u0e19\u0e04\u0e23\u0e31\u0e1a ..<br \/>\n\u0e2d\u0e48\u0e32\u0e19\u0e15\u0e2d\u0e19\u0e17\u0e35\u0e48 1 \u0e44\u0e14\u0e49\u0e17\u0e35\u0e48 <a href=\"http:\/\/ton.packetlove.com\/blog\/life-style\/line-bot-node-js-mqtt-esp32-iot.html\">LINE Bot + node.js + MQTT + ESP32 (IoT) \u0e40\u0e1b\u0e34\u0e14\/\u0e1b\u0e34\u0e14 \u0e44\u0e1f (\u0e15\u0e2d\u0e19\u0e17\u0e35\u0e48 1)<\/a><\/p>\n<p>\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e04\u0e37\u0e2d \u0e1c\u0e21\u0e08\u0e30\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e2a\u0e31\u0e48\u0e07 \u0e43\u0e2b\u0e49\u0e1a\u0e2d\u0e17 (LINE Messaging API) \u0e2a\u0e31\u0e48\u0e07\u0e40\u0e1b\u0e34\u0e14\/\u0e1b\u0e34\u0e14\u0e44\u0e1f \u0e44\u0e14\u0e49\u0e1c\u0e48\u0e32\u0e19 \u0e01\u0e32\u0e23 chat \u0e14\u0e31\u0e07\u0e20\u0e32\u0e1e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3041\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_on_off-320x640.jpg\" alt=\"\" width=\"320\" height=\"640\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_on_off-320x640.jpg 320w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_on_off-768x1536.jpg 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_on_off-512x1024.jpg 512w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_on_off-50x100.jpg 50w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_on_off.jpg 905w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/p>\n<h2>0.\u0e04\u0e27\u0e32\u0e21\u0e23\u0e39\u0e49\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e21\u0e35 \u0e43\u0e19\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21\u0e19\u0e35\u0e49<\/h2>\n<p>&#8211; \u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Arduino IDE \u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e15\u0e49\u0e19<br \/>\n&#8211; \u0e01\u0e32\u0e23\u0e40\u0e02\u0e35\u0e22\u0e19 node.js \u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e15\u0e49\u0e19<br \/>\n&#8211; \u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 LINE Messaging API \u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e15\u0e49\u0e19<br \/>\n&#8211; \u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Git \u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e15\u0e49\u0e19<\/p>\n<h2>1.\u0e40\u0e15\u0e23\u0e35\u0e22\u0e21\u0e2d\u0e38\u0e1b\u0e01\u0e23\u0e13\u0e4c<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3038\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Node32lite.jpg\" alt=\"\" width=\"533\" height=\"400\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Node32lite.jpg 533w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Node32lite-100x75.jpg 100w\" sizes=\"auto, (max-width: 533px) 100vw, 533px\" \/><br \/>\n\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1a\u0e2d\u0e23\u0e4c\u0e14 ESP32 \u0e17\u0e35\u0e48\u0e1c\u0e21\u0e08\u0e30\u0e43\u0e0a\u0e49\u0e43\u0e19\u0e01\u0e32\u0e23\u0e17\u0e14\u0e25\u0e2d\u0e07\u0e19\u0e35\u0e49 \u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19 Node32 Lite \u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e2b\u0e32\u0e0b\u0e37\u0e49\u0e2d\u0e44\u0e14\u0e49\u0e17\u0e35\u0e48\u0e19\u0e35\u0e48\u0e04\u0e23\u0e31\u0e1a \u0e23\u0e32\u0e04\u0e32 275 \u0e1a\u0e32\u0e17<br \/>\n<a href=\"https:\/\/www.gravitechthai.com\/product-detail.php?WP=pQugZKpmGQAgG2rDqYyc4Uuw\">https:\/\/www.gravitechthai.com\/product-detail.php?WP=pQugZKpmGQAgG2rDqYyc4Uuw<\/a><\/p>\n<p>\u0e1b\u0e25.\u0e2b\u0e23\u0e37\u0e2d\u0e16\u0e49\u0e32\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e19\u0e46 \u0e21\u0e35\u0e1a\u0e2d\u0e23\u0e4c\u0e14\u0e2d\u0e37\u0e48\u0e19\u0e46 \u0e40\u0e0a\u0e48\u0e19 ESP8266, NodeMCU \u0e2d\u0e22\u0e39\u0e48\u0e41\u0e25\u0e49\u0e27 \u0e01\u0e47\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e44\u0e14\u0e49\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e01\u0e31\u0e19\u0e04\u0e23\u0e31\u0e1a<\/p>\n<h2>2.\u0e2a\u0e21\u0e31\u0e04\u0e23\u0e43\u0e0a\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23 LINE Messaging API<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3036\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_api-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_api-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_api-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_api-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_api-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_api.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n<a href=\"https:\/\/developers.line.biz\/en\/services\/messaging-api\/\">LINE Developers<\/a><\/p>\n<p>\u0e15\u0e23\u0e07\u0e2a\u0e48\u0e27\u0e19\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e2a\u0e21\u0e31\u0e04\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 LINE Messaging API \u0e21\u0e35\u0e2b\u0e25\u0e32\u0e22\u0e46 \u0e17\u0e48\u0e32\u0e19\u0e40\u0e02\u0e35\u0e22\u0e19\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21\u0e44\u0e27\u0e49\u0e41\u0e25\u0e49\u0e27 \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e0a\u0e48\u0e19<\/p>\n<p><a href=\"https:\/\/medium.com\/linedevth\/line-bot-101-447e427d62c7\">LINE Bot 101\u200a\u2014\u200a\u0e08\u0e31\u0e1a\u0e21\u0e37\u0e2d\u0e17\u0e33\u0e1a\u0e2d\u0e17<\/a> \u0e02\u0e2d\u0e07\u0e04\u0e38\u0e13 <strong>Sitthi Thiammekha<\/strong> (LINE API Expert)<\/p>\n<p><a href=\"https:\/\/medium.com\/ingkwan\/%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-line-bot-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-node-js-aiml-a-beginners-guide-b7708b0b2440\">\u0e2a\u0e23\u0e49\u0e32\u0e07 LINE Bot \u0e14\u0e49\u0e27\u0e22 Node.js + Messaging API\u200a\u2014\u200aA Beginner\u2019s Guide<\/a> \u0e02\u0e2d\u0e07\u0e04\u0e38\u0e13 <strong>Ingkwan<\/strong><\/p>\n<h2>3.\u0e2a\u0e21\u0e31\u0e04\u0e23\u0e43\u0e0a\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23 Heroku \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a CloudMQTT Server<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3035\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_logo-640x180.png\" alt=\"\" width=\"640\" height=\"180\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_logo-640x180.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_logo-768x216.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_logo-1024x288.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_logo-100x28.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_logo.png 1426w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n<a href=\"https:\/\/www.heroku.com\">Heroku.com<\/a><\/p>\n<p>\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e01\u0e23\u0e2d\u0e01\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e01\u0e32\u0e23\u0e2a\u0e21\u0e31\u0e04\u0e23\u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e23\u0e32\u0e08\u0e30\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48 Dashboard \u0e02\u0e2d\u0e07 Heroku \u0e04\u0e23\u0e31\u0e1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3018\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_01-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_01-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_01-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_01-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_01-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_01.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e17\u0e35\u0e48\u0e2b\u0e19\u0e49\u0e32 Dashboard \u0e40\u0e25\u0e37\u0e2d\u0e01 New &gt; Create new app<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3026\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_02-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_02-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_02-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_02-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_02-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_02.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e15\u0e31\u0e49\u0e07\u0e0a\u0e37\u0e48\u0e2d App \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32 \u0e43\u0e19\u0e17\u0e35\u0e48\u0e19\u0e35\u0e49\u0e1c\u0e21\u0e15\u0e31\u0e49\u0e07\u0e0a\u0e37\u0e48\u0e2d esp32-mqtt<\/p>\n<p>\u0e16\u0e49\u0e32\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e2a\u0e33\u0e40\u0e23\u0e47\u0e08 \u0e40\u0e23\u0e32\u0e08\u0e30\u0e40\u0e02\u0e49\u0e32\u0e2b\u0e19\u0e49\u0e32\u0e41\u0e23\u0e01 \u0e02\u0e2d\u0e07 App \u0e40\u0e23\u0e32\u0e44\u0e14\u0e49\u0e25\u0e30 \u0e2d\u0e22\u0e48\u0e32\u0e07\u0e02\u0e2d\u0e07\u0e1c\u0e21\u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19<br \/>\n<a href=\"https:\/\/esp32-mqtt.herokuapp.com\/\">https:\/\/esp32-mqtt.herokuapp.com\/<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3025\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_03-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_03-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_03-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_03-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_03-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_03.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e17\u0e35\u0e48 Resources \u0e40\u0e25\u0e37\u0e2d\u0e01 Find more add-ons<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3024\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_04-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_04-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_04-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_04-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_04-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_04.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e40\u0e25\u0e37\u0e2d\u0e01 CloudMQTT<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3023\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_05-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_05-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_05-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_05-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_05-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_05.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e40\u0e25\u0e37\u0e2d\u0e01 Install CloudMQTT<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3021\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_07-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_07-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_07-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_07-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_07-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_07.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e40\u0e25\u0e37\u0e2d\u0e01 App \u0e17\u0e35\u0e48\u0e08\u0e30 Install CloudMQTT \u0e43\u0e19\u0e17\u0e35\u0e48\u0e19\u0e35\u0e49 \u0e02\u0e2d\u0e07\u0e1c\u0e21\u0e04\u0e37\u0e2d esp32-mqtt<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3020\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_08-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_08-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_08-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_08-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_08-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_08.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e40\u0e25\u0e37\u0e2d\u0e01 Provision add-on<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3019\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_09-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_09-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_09-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_09-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_09-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_09.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27\u0e08\u0e30\u0e44\u0e14\u0e49\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49 \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e04\u0e25\u0e34\u0e01\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e14\u0e39\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e02\u0e2d\u0e07 CloudMQTT \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e44\u0e14\u0e49\u0e17\u0e35\u0e48 menu \u0e14\u0e49\u0e32\u0e19\u0e25\u0e48\u0e32\u0e07<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3017\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e04\u0e48\u0e32 config CloudMQTT \u0e15\u0e23\u0e07\u0e19\u0e35\u0e49 \u0e40\u0e14\u0e35\u0e4b\u0e22\u0e27\u0e40\u0e23\u0e32\u0e08\u0e30\u0e43\u0e0a\u0e49\u0e01\u0e31\u0e1a webhook \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 node.js \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a<\/p>\n<h2>4.LINE Bot API Code (node.js)<\/h2>\n<p>File \u0e2b\u0e25\u0e31\u0e01\u0e46 \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e08\u0e30\u0e43\u0e0a\u0e49 \u0e43\u0e19\u0e01\u0e32\u0e23 Deploy \u0e02\u0e36\u0e49\u0e19 Heroku App \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32 \u0e21\u0e35 2 file \u0e04\u0e23\u0e31\u0e1a\u0e04\u0e37\u0e2d<br \/>\n&#8211; <strong>Procfile<\/strong> (\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e21\u0e35 .txt) \u0e19\u0e30 \u0e43\u0e0a\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1a\u0e2d\u0e01\u0e27\u0e48\u0e32 \u0e43\u0e2b\u0e49 App \u0e40\u0e23\u0e32\u0e17\u0e33\u0e07\u0e32\u0e19\u0e41\u0e1a\u0e1a\u0e44\u0e2b\u0e19 \u0e40\u0e23\u0e35\u0e22\u0e01 file \u0e44\u0e2b\u0e19<br \/>\n&#8211; <strong>index.js<\/strong> \u0e40\u0e1b\u0e47\u0e19 file \u0e2b\u0e25\u0e31\u0e01 \u0e02\u0e2d\u0e07 LINE Bot API \u0e40\u0e23\u0e32\u0e04\u0e23\u0e31\u0e1a<\/p>\n<p><strong>\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19 \u0e40\u0e23\u0e32\u0e21\u0e32\u0e14\u0e39\u0e17\u0e35\u0e48 code \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 LINE Bot API \u0e01\u0e31\u0e19\u0e04\u0e23\u0e31\u0e1a<\/strong><br \/>\n\u0e2a\u0e48\u0e27\u0e19\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e41\u0e01\u0e49\u0e44\u0e02 \u0e2b\u0e25\u0e31\u0e01\u0e46 \u0e21\u0e35\u0e14\u0e49\u0e27\u0e22\u0e01\u0e31\u0e19 3 \u0e08\u0e38\u0e14\u0e04\u0e23\u0e31\u0e1a\u0e04\u0e37\u0e2d<\/p>\n<p>&#8211; <strong>CH_ACCESS_TOKEN<\/strong> \u0e04\u0e37\u0e2d\u0e04\u0e48\u0e32 \u0e22\u0e32\u0e27\u0e46 \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01 Channel access token (long-lived) \u0e02\u0e2d\u0e07 Messaging API<br \/>\n&#8211; <strong>mqtt_host<\/strong> \u0e04\u0e37\u0e2d\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01 CloudMQTT \u0e1a\u0e19 Heroku<br \/>\n&#8211; <strong>options<\/strong> \u0e04\u0e37\u0e2d\u0e04\u0e48\u0e32\u0e15\u0e48\u0e32\u0e07\u0e46 \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01 CloudMQTT \u0e1a\u0e19 Heroku \u0e40\u0e0a\u0e48\u0e19\u0e01\u0e31\u0e19\u0e04\u0e23\u0e31\u0e1a<\/p>\n<p><strong>Code LINE Bot API<\/strong> \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 node.js \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a Deploy \u0e02\u0e36\u0e49\u0e19 Heroku \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e04\u0e23\u0e31\u0e1a<br \/>\n\u0e43\u0e04\u0e23\u0e17\u0e35\u0e48\u0e40\u0e02\u0e35\u0e22\u0e19 code \u0e04\u0e25\u0e48\u0e2d\u0e07\u0e46 \u0e41\u0e01\u0e49\u0e44\u0e02 \u0e43\u0e2b\u0e49 code \u0e2a\u0e27\u0e22\u0e07\u0e32\u0e21 \u0e01\u0e23\u0e30\u0e0a\u0e31\u0e1a\u0e01\u0e27\u0e48\u0e32\u0e19\u0e35\u0e49\u0e44\u0e14\u0e49\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a \u0e2d\u0e31\u0e19\u0e19\u0e35\u0e49\u0e1c\u0e21\u0e40\u0e02\u0e35\u0e22\u0e19\u0e41\u0e1a\u0e1a\u0e14\u0e48\u0e27\u0e19\u0e46 \u0e21\u0e32\u0e01 \ud83d\ude41<\/p>\n<p><strong>Procfile<\/strong><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>web: node index.js<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>index.js<\/strong><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>var express = require('express')\r\nvar bodyParser = require('body-parser')\r\nvar request = require('request')\r\nvar app = express()\r\n\r\nvar mqtt = require('mqtt');\r\n\r\n\/\/ Your Channel access token (long-lived) \r\nconst CH_ACCESS_TOKEN = '';\r\n\r\n\/\/ MQTT Host\r\nvar mqtt_host = 'mqtt:\/\/m15.cloudmqtt.com';\r\n\r\n\/\/ MQTT Topic\r\nvar mqtt_topic = '\/ESP32';\r\n\r\n\/\/ MQTT Config\r\nvar options = {\r\n    port: 15443,\r\n    host: 'mqtt:\/\/m15.cloudmqtt.com',\r\n    clientId: 'mqttjs_' + Math.random().toString(16).substr(2, 8),\r\n    username: 'mqttuser',\r\n    password: 'mqttpass',\r\n    keepalive: 60,\r\n    reconnectPeriod: 1000,\r\n    protocolId: 'MQIsdp',\r\n    protocolVersion: 3,\r\n    clean: true,\r\n    encoding: 'utf8'\r\n};\r\n\r\n\r\napp.use(bodyParser.json())\r\n\r\napp.set('port', (process.env.PORT || 4000))\r\napp.use(bodyParser.urlencoded({extended: true}))\r\napp.use(bodyParser.json())\r\n\r\napp.post('\/webhook', (req, res) =&gt; {\r\n  var text = req.body.events[0].message.text.toLowerCase()\r\n  var sender = req.body.events[0].source.userId\r\n  var replyToken = req.body.events[0].replyToken\r\n  console.log(text, sender, replyToken)\r\n  console.log(typeof sender, typeof text)\r\n  \/\/ console.log(req.body.events[0])\r\n\r\n  if (text === 'info' || text === '\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19') {\r\n    \/\/ Info\r\n    inFo(sender, text)\r\n  }\r\n  else if (text === '1' || text === '\u0e40\u0e1b\u0e34\u0e14' || text === 'on') {\r\n    \/\/ LED On\r\n    ledOn(sender, text)\r\n  }\r\n  else if (text === '0' || text === '\u0e1b\u0e34\u0e14' || text === 'off') {\r\n    \/\/ LED Off\r\n    ledOff(sender, text)\r\n  }\r\n  else {\r\n    \/\/ Other\r\n    sendText(sender, text);\r\n  }\r\n\r\n  res.sendStatus(200)\r\n})\r\n\r\nfunction sendText (sender, text) {\r\n  let data = {\r\n    to: sender,\r\n    messages: [\r\n      {\r\n        type: 'text',\r\n        text: '\u0e01\u0e23\u0e38\u0e13\u0e32\u0e1e\u0e34\u0e21\u0e1e\u0e4c : info | on | off | \u0e40\u0e1b\u0e34\u0e14 | \u0e1b\u0e34\u0e14 \u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19'\r\n      }\r\n    ]\r\n  }\r\n  request({\r\n    headers: {\r\n      'Content-Type': 'application\/json',\r\n      'Authorization': 'Bearer '+CH_ACCESS_TOKEN+''\r\n    },\r\n    url: 'https:\/\/api.line.me\/v2\/bot\/message\/push',\r\n    method: 'POST',\r\n    body: data,\r\n    json: true\r\n  }, function (err, res, body) {\r\n    if (err) console.log('error')\r\n    if (res) console.log('success')\r\n    if (body) console.log(body)\r\n  })\r\n}\r\n\r\nfunction inFo (sender, text) {\r\n  let data = {\r\n    to: sender,\r\n    messages: [\r\n      {\r\n        type: 'text',\r\n        text: 'uid: '+sender\r\n      }\r\n    ]\r\n  }\r\n  request({\r\n    headers: {\r\n      'Content-Type': 'application\/json',\r\n      'Authorization': 'Bearer '+CH_ACCESS_TOKEN+''\r\n    },\r\n    url: 'https:\/\/api.line.me\/v2\/bot\/message\/push',\r\n    method: 'POST',\r\n    body: data,\r\n    json: true\r\n  }, function (err, res, body) {\r\n    if (err) console.log('error')\r\n    if (res) console.log('success')\r\n    if (body) console.log(body)\r\n  })\r\n}\r\n\r\n\r\nfunction ledOn (sender, text) {\r\n  var client = mqtt.connect(mqtt_host, options);\r\n  client.on('connect', function() { \/\/ When connected\r\n      console.log('MQTT connected');\r\n      \/\/ subscribe to a topic\r\n      client.subscribe(mqtt_topic, function() {\r\n          \/\/ when a message arrives, do something with it\r\n          client.on('message', function(topic, message, packet) {\r\n              console.log(\"Received '\" + message + \"' on '\" + topic + \"'\");\r\n          });\r\n      });\r\n      \r\n\r\n      \/\/ publish a message to a topic\r\n      client.publish(mqtt_topic, 'on', function() {\r\n          console.log(\"Message is published\");\r\n          client.end(); \/\/ Close the connection when published\r\n      });\r\n      \r\n  });\r\n    \r\n\r\n  let data = {\r\n    to: sender,\r\n    messages: [\r\n      {\r\n        type: 'text',\r\n        text: 'LED ON'\r\n      }\r\n    ]\r\n  }\r\n  request({\r\n    headers: {\r\n      'Content-Type': 'application\/json',\r\n      'Authorization': 'Bearer '+CH_ACCESS_TOKEN+''\r\n    },\r\n    url: 'https:\/\/api.line.me\/v2\/bot\/message\/push',\r\n    method: 'POST',\r\n    body: data,\r\n    json: true\r\n  }, function (err, res, body) {\r\n    if (err) console.log('error')\r\n    if (res) console.log('success')\r\n    if (body) console.log(body)\r\n  })\r\n}\r\n\r\nfunction ledOff (sender, text) {\r\n  var client = mqtt.connect(mqtt_host, options);\r\n  client.on('connect', function() { \/\/ When connected\r\n      console.log('MQTT connected');\r\n      \/\/ subscribe to a topic\r\n      client.subscribe(mqtt_topic, function() {\r\n          \/\/ when a message arrives, do something with it\r\n          client.on('message', function(topic, message, packet) {\r\n              console.log(\"Received '\" + message + \"' on '\" + topic + \"'\");\r\n          });\r\n      });\r\n      \r\n\r\n      \/\/ publish a message to a topic\r\n      client.publish(mqtt_topic, 'off', function() {\r\n          console.log(\"Message is published\");\r\n          client.end(); \/\/ Close the connection when published\r\n      });\r\n      \r\n  });\r\n\r\n  let data = {\r\n    to: sender,\r\n    messages: [\r\n      {\r\n        type: 'text',\r\n        text: 'LED OFF'\r\n      }\r\n    ]\r\n  }\r\n  request({\r\n    headers: {\r\n      'Content-Type': 'application\/json',\r\n      'Authorization': 'Bearer '+CH_ACCESS_TOKEN+''\r\n    },\r\n    url: 'https:\/\/api.line.me\/v2\/bot\/message\/push',\r\n    method: 'POST',\r\n    body: data,\r\n    json: true\r\n  }, function (err, res, body) {\r\n    if (err) console.log('error')\r\n    if (res) console.log('success')\r\n    if (body) console.log(body)\r\n  })\r\n}\r\n\r\napp.listen(app.get('port'), function () {\r\n  console.log('run at port', app.get('port'))\r\n})\r\n\r\n<\/code><\/pre>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3078\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_nodejs-640x400.png\" alt=\"\" width=\"640\" height=\"400\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_nodejs-640x400.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_nodejs-768x480.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_nodejs-1024x640.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_nodejs-100x63.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_bot_nodejs.png 1440w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3080\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_ch_access_token-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_ch_access_token-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_ch_access_token-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_ch_access_token-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_ch_access_token-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_ch_access_token.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; CH_ACCESS_TOKEN \u0e04\u0e37\u0e2d\u0e04\u0e48\u0e32\u0e22\u0e32\u0e27\u0e46 \u0e15\u0e23\u0e07\u0e19\u0e35\u0e49\u0e41\u0e2b\u0e25\u0e30\u0e04\u0e23\u0e31\u0e1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3017\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/Cloud_MQTT_10.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; mqtt_host \u0e01\u0e31\u0e1a options \u0e04\u0e37\u0e2d\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01 CloudMQTT \u0e15\u0e23\u0e07\u0e19\u0e35\u0e49\u0e04\u0e23\u0e31\u0e1a<\/p>\n<h2>5.Deploy Webhook API code \u0e02\u0e36\u0e49\u0e19 Heroku<\/h2>\n<p>\u0e08\u0e32\u0e01 Step 3 \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e2a\u0e23\u0e49\u0e32\u0e07 App \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e44\u0e27\u0e49 \u0e2d\u0e22\u0e48\u0e32\u0e07\u0e02\u0e2d\u0e07\u0e1c\u0e21\u0e08\u0e30\u0e0a\u0e37\u0e48\u0e2d <strong>esp32-mqtt<\/strong> \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e40\u0e02\u0e49\u0e32\u0e21\u0e32\u0e17\u0e35\u0e48 <strong>Deploy<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3070\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_deploy-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_deploy-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_deploy-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_deploy-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_deploy-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_deploy.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&#8211; \u0e2d\u0e31\u0e19\u0e14\u0e31\u0e1a\u0e41\u0e23\u0e01\u0e40\u0e25\u0e22 \u0e16\u0e49\u0e32\u0e40\u0e23\u0e32\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e40\u0e04\u0e22\u0e43\u0e0a\u0e49 Heroku \u0e43\u0e2b\u0e49 Download \u0e41\u0e25\u0e30 Install Heroku CLI \u0e01\u0e31\u0e19\u0e01\u0e48\u0e2d\u0e19\u0e17\u0e35\u0e48<br \/>\nDownload and install the <a href=\"https:\/\/devcenter.heroku.com\/articles\/heroku-command-line\">Heroku CLI<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3073\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_terminal_login-640x449.png\" alt=\"\" width=\"640\" height=\"449\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_terminal_login-640x449.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_terminal_login-100x70.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_terminal_login.png 682w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e25\u0e07 Heruku CLI \u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27 \u0e17\u0e35\u0e48 Terminal \u0e1e\u0e34\u0e21\u0e1e\u0e4c heroku login<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3074\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_browser_login-640x437.png\" alt=\"\" width=\"640\" height=\"437\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_browser_login-640x437.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_browser_login-768x525.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_browser_login-1024x700.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_browser_login-100x68.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_browser_login.png 1387w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e15\u0e31\u0e27 Browser \u0e08\u0e30\u0e40\u0e14\u0e49\u0e07\u0e2b\u0e19\u0e49\u0e32 Heroku Login \u0e02\u0e36\u0e49\u0e19\u0e21\u0e32 \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e17\u0e33\u0e01\u0e32\u0e23 Login \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e35\u0e22\u0e1a\u0e23\u0e49\u0e2d\u0e22<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3075\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_login_complete-640x437.png\" alt=\"\" width=\"640\" height=\"437\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_login_complete-640x437.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_login_complete-768x525.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_login_complete-1024x700.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_login_complete-100x68.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_login_complete.png 1387w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e40\u0e21\u0e37\u0e48\u0e2d\u0e40\u0e23\u0e32 Login \u0e2a\u0e33\u0e40\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27 \u0e01\u0e47\u0e08\u0e30\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e16\u0e31\u0e14\u0e44\u0e1b \u0e17\u0e35\u0e48 Terminal (CLI)<\/p>\n<p><strong>\u0e17\u0e33\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07 Git repository<\/strong><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cd my-project\/\r\ngit init\r\nheroku git:remote -a esp32-mqtt<\/code><\/pre>\n<\/div>\n<p><strong>\u0e17\u0e14\u0e25\u0e2d\u0e07 Deploy<\/strong><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>git add .\r\ngit commit -am \"make it better\"\r\ngit push heroku master<\/code><\/pre>\n<\/div>\n<p>\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19 \u0e2a\u0e23\u0e49\u0e32\u0e07 file \u0e08\u0e32\u0e01 <strong>Step 4<\/strong> \u0e04\u0e37\u0e2d <strong>Procfile<\/strong> \u0e01\u0e31\u0e1a <strong>index.js<\/strong> \u0e17\u0e35\u0e48 Directory \u0e17\u0e35\u0e48\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e02\u0e36\u0e49\u0e19 \u0e2d\u0e22\u0e48\u0e32\u0e07\u0e02\u0e2d\u0e07\u0e1c\u0e21\u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19 <strong>esp32-mqtt<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3094\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/esp32_mqtt_dir-640x398.png\" alt=\"\" width=\"640\" height=\"398\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/esp32_mqtt_dir-640x398.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/esp32_mqtt_dir-768x477.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/esp32_mqtt_dir-100x62.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/esp32_mqtt_dir.png 882w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19 <strong>install module<\/strong> \u0e17\u0e35\u0e48\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19 \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e43\u0e0a\u0e49\u0e43\u0e19\u0e01\u0e32\u0e23\u0e40\u0e02\u0e35\u0e22\u0e19 App \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32 \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>npm init\r\nnpm install express --save\r\nnpm install request --save\r\nnpm install mqtt --save<\/code><\/pre>\n<\/div>\n<p>\u0e40\u0e23\u0e32\u0e08\u0e30\u0e44\u0e14\u0e49 file \u0e15\u0e48\u0e32\u0e07\u0e46 \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e02\u0e49\u0e32\u0e21\u0e32 \u0e43\u0e19 directory \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3100\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/npm_install_module-640x398.png\" alt=\"\" width=\"640\" height=\"398\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/npm_install_module-640x398.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/npm_install_module-768x477.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/npm_install_module-100x62.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/npm_install_module.png 882w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u0e17\u0e14\u0e25\u0e2d\u0e07 run Wehhook API \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e40\u0e02\u0e35\u0e22\u0e19 \u0e14\u0e49\u0e27\u0e22 node.js \u0e04\u0e48\u0e32 default \u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19 port 4000<br \/>\n<strong>node index.js<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3095\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/test_run_node-640x443.png\" alt=\"\" width=\"640\" height=\"443\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/test_run_node-640x443.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/test_run_node-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/test_run_node.png 682w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u0e40\u0e02\u0e49\u0e32\u0e1c\u0e48\u0e32\u0e19 localhost:4000 \u0e08\u0e30\u0e44\u0e14\u0e49\u0e14\u0e31\u0e07\u0e23\u0e39\u0e1b Error \u0e44\u0e21\u0e48\u0e40\u0e1b\u0e47\u0e19\u0e44\u0e23\u0e04\u0e23\u0e31\u0e1a \u0e16\u0e37\u0e2d\u0e27\u0e48\u0e32\u0e17\u0e33\u0e07\u0e32\u0e19\u0e44\u0e14\u0e49\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e1e\u0e23\u0e32\u0e30\u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e23\u0e31\u0e1a GET<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3096\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/localhost_4000-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/localhost_4000-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/localhost_4000-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/localhost_4000-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/localhost_4000-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/localhost_4000.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u0e17\u0e33\u0e01\u0e32\u0e23 Deploy code \u0e08\u0e23\u0e34\u0e07 \u0e02\u0e36\u0e49\u0e19 Heroku<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>git add .\r\ngit commit -am \"add Procfile index.js\"\r\ngit push heroku master<\/code><\/pre>\n<\/div>\n<p>\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e25\u0e2d\u0e07\u0e40\u0e02\u0e49\u0e32 App \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e1c\u0e48\u0e32\u0e19 URL \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e17\u0e33\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e44\u0e27\u0e49 \u0e2d\u0e22\u0e48\u0e32\u0e07\u0e02\u0e2d\u0e07\u0e1c\u0e21\u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19<br \/>\n<a href=\"https:\/\/esp32-mqtt.herokuapp.com\/\">https:\/\/esp32-mqtt.herokuapp.com\/<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3101\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_app_complete-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_app_complete-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_app_complete-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_app_complete-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_app_complete-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/heroku_app_complete.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e30\u0e08\u0e30\u0e44\u0e14\u0e49\u0e41\u0e1a\u0e1a\u0e19\u0e35\u0e49 \u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e15\u0e01\u0e43\u0e08\u0e04\u0e23\u0e31\u0e1a \u0e40\u0e1e\u0e23\u0e32\u0e30\u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e23\u0e31\u0e1a GET<br \/>\n\u0e41\u0e15\u0e48\u0e16\u0e49\u0e32\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49 \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e25\u0e2d\u0e07\u0e43\u0e0a\u0e49 CLI \u0e14\u0e39 logs \u0e27\u0e48\u0e32\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14\u0e15\u0e23\u0e07\u0e44\u0e2b\u0e19<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>heroku logs --tail<\/code><\/pre>\n<\/div>\n<p>\u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27\u0e04\u0e23\u0e31\u0e1a <strong>LINE Bot API (webhook)<\/strong> \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32 \u0e1a\u0e19 Heroku .. \ud83d\ude42<\/p>\n<h2>6.Config Webhook API \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e40\u0e02\u0e49\u0e32\u0e01\u0e31\u0e1a LINE Messaging API<\/h2>\n<p>\u0e21\u0e32\u0e16\u0e36\u0e07\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e2a\u0e38\u0e14\u0e17\u0e49\u0e32\u0e22\u0e43\u0e19\u0e2a\u0e48\u0e27\u0e19\u0e02\u0e2d\u0e07 Webhook API \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e01\u0e31\u0e19\u0e41\u0e25\u0e49\u0e27\u0e04\u0e23\u0e31\u0e1a \u0e19\u0e31\u0e48\u0e19\u0e04\u0e37\u0e2d \u0e01\u0e32\u0e23\u0e1c\u0e39\u0e01\u0e01\u0e31\u0e1a LINE Messaging API<\/p>\n<p>&#8211; \u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e41\u0e23\u0e01 \u0e40\u0e23\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e44\u0e1b Use webhooks \u0e43\u0e2b\u0e49 Enabled \u0e41\u0e25\u0e49\u0e27 Save \u0e01\u0e48\u0e2d\u0e19\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a \u0e15\u0e01\u0e21\u0e49\u0e32\u0e15\u0e32\u0e22 \u0e15\u0e23\u0e07\u0e19\u0e35\u0e49\u0e01\u0e31\u0e19\u0e21\u0e32\u0e40\u0e22\u0e2d\u0e30\u0e41\u0e25\u0e49\u0e27 \ud83d\ude41<br \/>\n&#8211; \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19 \u0e43\u0e2a\u0e48 URL \u0e02\u0e2d\u0e07 App \u0e40\u0e23\u0e32 \u0e17\u0e35\u0e48\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01 Heroku \u0e41\u0e25\u0e49\u0e27\u0e15\u0e32\u0e21\u0e14\u0e49\u0e27\u0e22 <strong>\/webhook<\/strong> \u0e04\u0e23\u0e31\u0e1a \u0e2d\u0e22\u0e48\u0e32\u0e07\u0e02\u0e2d\u0e07\u0e1c\u0e21\u0e01\u0e47\u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19<br \/>\n<a href=\"https:\/\/esp32-mqtt.herokuapp.com\/webhook\">https:\/\/esp32-mqtt.herokuapp.com\/webhook<\/a><br \/>\n&#8211; \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19 \u0e01\u0e14 Verify \u0e14\u0e39\u0e04\u0e23\u0e31\u0e1a \u0e16\u0e49\u0e32\u0e44\u0e21\u0e48\u0e21\u0e35\u0e2d\u0e30\u0e44\u0e23\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14 \u0e01\u0e47\u0e08\u0e30 Success \u0e04\u0e23\u0e31\u0e1a \ud83d\ude42<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3103\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_webhook-640x444.png\" alt=\"\" width=\"640\" height=\"444\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_webhook-640x444.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_webhook-768x533.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_webhook-1024x711.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_webhook-100x69.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/line_messaging_webhook.png 1345w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e1b\u0e23\u0e30\u0e21\u0e32\u0e13\u0e19\u0e35\u0e49 \u0e01\u0e47\u0e40\u0e1b\u0e47\u0e19\u0e2d\u0e31\u0e19\u0e27\u0e48\u0e32 \u0e40\u0e23\u0e35\u0e22\u0e1a\u0e23\u0e49\u0e2d\u0e22\u0e41\u0e25\u0e49\u0e27\u0e04\u0e23\u0e31\u0e1a LINE Messaging API \u0e01\u0e31\u0e1a Webhook \u0e1a\u0e19 Heroku \u0e40\u0e23\u0e32\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e44\u0e14\u0e49\u0e41\u0e25\u0e49\u0e27 \ud83d\ude42<\/p>\n<h2>7.\u0e40\u0e02\u0e35\u0e22\u0e19 code Arduino \u0e43\u0e2b\u0e49\u0e01\u0e31\u0e1a Node32 Lite<\/h2>\n<p>\u0e14\u0e39\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e15\u0e34\u0e15\u0e15\u0e31\u0e49\u0e07\u0e1a\u0e2d\u0e23\u0e4c\u0e14\u0e43\u0e2b\u0e21\u0e48\u0e46 (Node32 Lite) \u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e43\u0e19 Arduino IDE \u0e44\u0e14\u0e49\u0e17\u0e35\u0e48\u0e19\u0e35\u0e48\u0e04\u0e23\u0e31\u0e1a<br \/>\n<a href=\"http:\/\/www.ayarafun.com\/2018\/12\/how-to-setup-lamloei-32-lite-with-arduino\/\">http:\/\/www.ayarafun.com\/2018\/12\/how-to-setup-lamloei-32-lite-with-arduino\/<\/a><\/p>\n<p>\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e0a\u0e19\u0e34\u0e14\u0e02\u0e2d\u0e07 Board \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e43\u0e0a\u0e49\u0e43\u0e2b\u0e49\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07 \u0e41\u0e25\u0e49\u0e27\u0e17\u0e33\u0e01\u0e32\u0e23 Verify \u0e41\u0e25\u0e30 Upload Code \u0e42\u0e25\u0e14\u0e04\u0e23\u0e31\u0e1a ..<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3056\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_board_node32s-640x400.png\" alt=\"\" width=\"640\" height=\"400\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_board_node32s-640x400.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_board_node32s-768x480.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_board_node32s-1024x640.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_board_node32s-100x63.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_board_node32s.png 1440w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e43\u0e19\u0e17\u0e35\u0e48\u0e19\u0e35\u0e49\u0e1c\u0e21\u0e43\u0e0a\u0e49\u0e1a\u0e2d\u0e23\u0e4c\u0e14 Node32 Lite \u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e40\u0e1b\u0e47\u0e19 Node32s \u0e23\u0e38\u0e48\u0e19\u0e1e\u0e35\u0e48\u0e21\u0e31\u0e19\u0e04\u0e23\u0e31\u0e1a \ud83d\ude42<\/p>\n<p>\u0e15\u0e31\u0e27 <strong>Arduino IDE<\/strong> \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e17\u0e33\u0e01\u0e32\u0e23 add Library <strong>PubSubClient<\/strong> \u0e01\u0e31\u0e1a <strong>WiFiManager<\/strong> \u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e14\u0e49\u0e27\u0e22\u0e04\u0e23\u0e31\u0e1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3050\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_manage_lib-640x400.png\" alt=\"\" width=\"640\" height=\"400\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_manage_lib-640x400.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_manage_lib-768x480.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_manage_lib-1024x640.png 1024w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_manage_lib-100x63.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_manage_lib.png 1440w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e44\u0e1b\u0e17\u0e35\u0e48 <strong>Tools &gt; Manage Libraries&#8230;<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3051\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_manage_lib_menu.png\" alt=\"\" width=\"357\" height=\"344\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_manage_lib_menu.png 357w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_manage_lib_menu-100x96.png 100w\" sizes=\"auto, (max-width: 357px) 100vw, 357px\" \/><br \/>\n&#8211; <strong>Manage Libraries&#8230;<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3053\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_lib_PubSubClient-640x394.png\" alt=\"\" width=\"640\" height=\"394\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_lib_PubSubClient-640x394.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_lib_PubSubClient-768x473.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_lib_PubSubClient-100x62.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_lib_PubSubClient.png 912w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; Add Lib <strong>PubSubClient<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3052\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_lib_WiFiManager-640x394.png\" alt=\"\" width=\"640\" height=\"394\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_lib_WiFiManager-640x394.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_lib_WiFiManager-768x473.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_lib_WiFiManager-100x62.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_lib_WiFiManager.png 912w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; Add Lib <strong>WiFiManager<\/strong><\/p>\n<h3>\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a code \u0e08\u0e30\u0e21\u0e35 2 \u0e41\u0e1a\u0e1a \u0e04\u0e37\u0e2d<\/h3>\n<p><strong>\u0e41\u0e1a\u0e1a \u0e17\u0e35\u0e48 1 fix SSID \u0e01\u0e31\u0e1a password \u0e44\u0e1b\u0e43\u0e19 code \u0e40\u0e25\u0e22<\/strong> \u0e41\u0e1a\u0e1a\u0e19\u0e35\u0e49\u0e08\u0e30\u0e14\u0e35 \u0e15\u0e23\u0e07\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e21\u0e32 config \u0e43\u0e2b\u0e49\u0e1a\u0e2d\u0e23\u0e4c\u0e14\u0e40\u0e23\u0e32\u0e44\u0e1b\u0e40\u0e01\u0e32\u0e30 WiFi \u0e2d\u0e35\u0e01\u0e23\u0e2d\u0e1a \u0e40\u0e2b\u0e21\u0e32\u0e30\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e17\u0e14\u0e25\u0e2d\u0e07 \u0e2b\u0e23\u0e37\u0e2d\u0e43\u0e0a\u0e49 SSID \u0e40\u0e14\u0e34\u0e21\u0e15\u0e25\u0e2d\u0e14 ..<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3062\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifi_fix_ssid-640x314.png\" alt=\"\" width=\"640\" height=\"314\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifi_fix_ssid-640x314.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifi_fix_ssid-768x377.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifi_fix_ssid-100x49.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifi_fix_ssid.png 954w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e16\u0e49\u0e32\u0e40\u0e23\u0e32\u0e14\u0e39\u0e08\u0e32\u0e01 Serial Monitor \u0e08\u0e30\u0e40\u0e2b\u0e47\u0e19\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e01\u0e32\u0e23 connect \u0e41\u0e1a\u0e1a fix SSID \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n<p><strong>\u0e41\u0e1a\u0e1a \u0e17\u0e35\u0e48 2 \u0e43\u0e0a\u0e49 WiFiManager<\/strong> \u0e04\u0e37\u0e2d\u0e08\u0e30\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16 config \u0e43\u0e2b\u0e49 Node32 Lite \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e44\u0e1b\u0e40\u0e01\u0e32\u0e30 SSID (AP) \u0e15\u0e31\u0e27\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e44\u0e14\u0e49 \u0e2d\u0e31\u0e19\u0e19\u0e35\u0e49\u0e08\u0e30\u0e2a\u0e30\u0e14\u0e27\u0e01 \u0e40\u0e27\u0e25\u0e32\u0e44\u0e1b\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e08\u0e23\u0e34\u0e07 \u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07 Upload code \u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e43\u0e2b\u0e21\u0e48<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3059\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager-640x433.png\" alt=\"\" width=\"640\" height=\"433\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager-640x433.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager-768x519.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager-100x68.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager.png 1012w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23 config \u0e14\u0e49\u0e27\u0e22 WiFiManager \u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01 Upload Code \u0e40\u0e2a\u0e23\u0e47\u0e08 \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e44\u0e1b\u0e40\u0e01\u0e32\u0e30 SSID \u0e0a\u0e37\u0e48\u0e2d ESP32_xxxxxx \u0e08\u0e30\u0e02\u0e36\u0e49\u0e19\u0e2b\u0e19\u0e49\u0e32 menu config \u0e14\u0e31\u0e07\u0e23\u0e39\u0e1b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3058\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager_config_ssid-640x433.png\" alt=\"\" width=\"640\" height=\"433\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager_config_ssid-640x433.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager_config_ssid-768x519.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager_config_ssid-100x68.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager_config_ssid.png 1012w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e40\u0e25\u0e37\u0e2d\u0e01 SSID(AP) \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e08\u0e30\u0e43\u0e2b\u0e49\u0e44\u0e1b\u0e40\u0e01\u0e32\u0e30 \u0e43\u0e2a\u0e48 password \u0e41\u0e25\u0e49\u0e27\u0e01\u0e14 Save<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3063\" src=\"http:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager_connect-640x314.png\" alt=\"\" width=\"640\" height=\"314\" srcset=\"https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager_connect-640x314.png 640w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager_connect-768x377.png 768w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager_connect-100x49.png 100w, https:\/\/ton.packetlove.com\/blog\/wp-content\/uploads\/2019\/03\/arduino_wifimanager_connect.png 954w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><br \/>\n&#8211; \u0e16\u0e49\u0e32\u0e40\u0e23\u0e32\u0e14\u0e39\u0e08\u0e32\u0e01 Serial Monitor \u0e08\u0e30\u0e40\u0e2b\u0e47\u0e19\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e01\u0e32\u0e23 connect \u0e41\u0e1a\u0e1a\u0e43\u0e0a\u0e49 WiFiManager \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n<h3>\u0e21\u0e32\u0e14\u0e39\u0e43\u0e19\u0e2a\u0e48\u0e27\u0e19\u0e02\u0e2d\u0e07 Code \u0e01\u0e31\u0e19\u0e04\u0e23\u0e31\u0e1a<\/h3>\n<p><strong>Code \u0e41\u0e1a\u0e1a\u0e17\u0e35\u0e48 1 fix SSID \u0e01\u0e31\u0e1a password \u0e43\u0e19 code<\/strong><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\"><code>#include &lt;PubSubClient.h&gt;\r\n#include &lt;WiFi.h&gt;\r\n\r\n\/\/ Update these with values suitable for your network.\r\nconst char* ssid = \"tonofarm.io\"; \/\/ AP Name\r\nconst char* password = \"********\"; \/\/ AP Password\r\n\r\n\/\/ Config MQTT Server\r\n#define mqtt_server \"m15.cloudmqtt.com\"\r\n#define mqtt_port 15443\r\n#define mqtt_user \"mqttuser\"\r\n#define mqtt_password \"mqttpass\"\r\n\r\nWiFiClient espClient;\r\nPubSubClient client(espClient);\r\n\r\nvoid setup() {\r\n  \/\/ Set LED_BUILTIN \r\n  pinMode(LED_BUILTIN, OUTPUT);\r\n\r\n  Serial.begin(115200);\r\n  delay(10);\r\n\r\n  Serial.println();\r\n\r\n  Serial.print(\"Connecting to \");\r\n  Serial.println(ssid);\r\n\r\n  WiFi.begin(ssid, password);\r\n\r\n  while (WiFi.status() != WL_CONNECTED) {\r\n    delay(500);\r\n    Serial.print(\".\");\r\n  }\r\n\r\n  Serial.println(\"\");\r\n  Serial.println(\"WiFi connected\");\r\n  Serial.println(\"IP address: \");\r\n  Serial.println(WiFi.localIP());\r\n\r\n  client.setServer(mqtt_server, mqtt_port);\r\n  client.setCallback(callback);\r\n}\r\n\r\nvoid loop() {\r\n  if (!client.connected()) {\r\n    Serial.print(\"Attempting MQTT connection...\");\r\n    if (client.connect(\"ESP32Client\", mqtt_user, mqtt_password)) {\r\n      Serial.println(\"connected\");\r\n    } else {\r\n      Serial.print(\"failed, rc=\");\r\n      Serial.print(client.state());\r\n      Serial.println(\" try again in 5 seconds\");\r\n      delay(5000);\r\n      return;\r\n    }\r\n  } else {\r\n    \/\/ MQTT Topic \/ESP32\r\n    client.subscribe(\"\/ESP32\");\r\n  }\r\n  client.loop();\r\n}\r\n\r\nvoid callback(char* topic, byte* payload, unsigned int length) {\r\n  Serial.print(\"Message arrived [\");\r\n  Serial.print(topic);\r\n  Serial.print(\"] \");\r\n  String msg = \"\";\r\n  int i = 0;\r\n  while (i &lt; length) msg += (char)payload[i++];\r\n  Serial.println(msg);\r\n  digitalWrite(LED_BUILTIN, (msg == \"on\" ? LOW : HIGH));\r\n}\r\n<\/code><\/pre>\n<\/div>\n<p><strong>Code \u0e41\u0e1a\u0e1a\u0e17\u0e35\u0e48 2 \u0e43\u0e0a\u0e49 WiFiManager \u0e43\u0e19\u0e01\u0e32\u0e23 config<\/strong><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\"><code>#include <FS.h>                   \/\/this needs to be first, or it all crashes and burns...\r\n#include <PubSubClient.h>\r\n#include <WiFi.h>\r\n#include <DNSServer.h>\r\n#include <WiFiManager.h>\r\n\r\n\/\/flag for saving data\r\nbool shouldSaveConfig = false;\r\n\r\n\/\/callback notifying us of the need to save config\r\nvoid saveConfigCallback () {\r\n  Serial.println(\"Should save config\");\r\n  shouldSaveConfig = true;\r\n}\r\n\r\n\/\/ Config MQTT Server\r\n#define mqtt_server \"m15.cloudmqtt.com\"\r\n#define mqtt_port 15443\r\n#define mqtt_user \"mqttuser\"\r\n#define mqtt_password \"mqttpass\"\r\n\r\nWiFiClient espClient;\r\nPubSubClient client(espClient);\r\n\r\nvoid setup() {\r\n  \/\/ Set LED_BUILTIN \r\n  pinMode(LED_BUILTIN, OUTPUT);\r\n\r\n  Serial.begin(115200);\r\n  delay(10);\r\n\r\n  Serial.println();\r\n\r\n  WiFiManager wifiManager;\r\n  wifiManager.autoConnect();\r\n\r\n  client.setServer(mqtt_server, mqtt_port);\r\n  client.setCallback(callback);\r\n}\r\n\r\nvoid loop() {\r\n  if (!client.connected()) {\r\n    Serial.print(\"Attempting MQTT connection...\");\r\n    if (client.connect(\"ESP32Client\", mqtt_user, mqtt_password)) {\r\n      Serial.println(\"connected\");\r\n    } else {\r\n      Serial.print(\"failed, rc=\");\r\n      Serial.print(client.state());\r\n      Serial.println(\" try again in 5 seconds\");\r\n      delay(5000);\r\n      return;\r\n    }\r\n  } else {\r\n    \/\/ MQTT Topic \/ESP32\r\n    client.subscribe(\"\/ESP32\");\r\n  }\r\n  client.loop();\r\n}\r\n\r\nvoid callback(char* topic, byte* payload, unsigned int length) {\r\n  Serial.print(\"Message arrived [\");\r\n  Serial.print(topic);\r\n  Serial.print(\"] \");\r\n  String msg = \"\";\r\n  int i = 0;\r\n  while (i < length) msg += (char)payload[i++];\r\n  Serial.println(msg);\r\n  digitalWrite(LED_BUILTIN, (msg == \"on\" ? LOW : HIGH));\r\n}\r\n<\/code><\/pre>\n<\/div>\n<p>Source Code \u0e43\u0e19 GitHub \u0e15\u0e32\u0e21\u0e19\u0e35\u0e49\u0e40\u0e25\u0e22\u0e04\u0e23\u0e31\u0e1a <a href=\"https:\/\/github.com\/pornpasok\/esp32_line_bot_mqtt\">https:\/\/github.com\/pornpasok\/esp32_line_bot_mqtt<\/a><\/p>\n<h2>8.\u0e40\u0e23\u0e35\u0e22\u0e1a\u0e23\u0e49\u0e2d\u0e22\u0e41\u0e25\u0e49\u0e27 \u0e17\u0e14\u0e2a\u0e2d\u0e1a\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19<\/h2>\n<p>\u0e17\u0e33\u0e01\u0e32\u0e23 Add LINE Bot \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32 \u0e01\u0e48\u0e2d\u0e19\u0e19\u0e30 \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e17\u0e14\u0e25\u0e2d\u0e07\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49\u0e44\u0e14\u0e49\u0e40\u0e25\u0e22<\/p>\n<p>- \u0e16\u0e49\u0e32\u0e40\u0e23\u0e32\u0e1e\u0e34\u0e21\u0e1e\u0e4c On\/on\/\u0e40\u0e1b\u0e34\u0e14\/1 \u0e44\u0e1f LED \u0e17\u0e35\u0e48\u0e15\u0e31\u0e27 Node32 Lite \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e01\u0e47\u0e08\u0e30\u0e15\u0e34\u0e14\u0e04\u0e23\u0e31\u0e1a<br \/>\n- \u0e16\u0e49\u0e32\u0e40\u0e23\u0e32\u0e1e\u0e34\u0e21\u0e1e\u0e4c Off\/off\/\u0e1b\u0e34\u0e14\/0 \u0e44\u0e1f LED \u0e17\u0e35\u0e48\u0e15\u0e31\u0e27 Node32 Lite \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e01\u0e47\u0e08\u0e30\u0e14\u0e31\u0e1a\u0e04\u0e23\u0e31\u0e1a<br \/>\n- \u0e16\u0e49\u0e32\u0e40\u0e23\u0e32\u0e1e\u0e34\u0e21\u0e1e\u0e4c info\/\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19 \u0e1a\u0e2d\u0e17\u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32 \u0e01\u0e47\u0e08\u0e30\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19 UID \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e04\u0e23\u0e31\u0e1a \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e2d\u0e32\u0e44\u0e1b\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e15\u0e48\u0e2d\u0e22\u0e2d\u0e14\u0e2d\u0e37\u0e48\u0e19\u0e46<\/p>\n<p>\u0e1b\u0e25. \u0e40\u0e14\u0e35\u0e4b\u0e22\u0e27\u0e1e\u0e23\u0e38\u0e48\u0e07\u0e19\u0e35\u0e49 \u0e16\u0e48\u0e32\u0e22 Video \u0e21\u0e32\u0e43\u0e2b\u0e49\u0e14\u0e39\u0e01\u0e31\u0e19\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a \u0e27\u0e48\u0e32\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e02\u0e2d\u0e07\u0e21\u0e31\u0e19\u0e40\u0e1b\u0e47\u0e19\u0e22\u0e31\u0e07\u0e44\u0e07 \u0e16\u0e48\u0e32\u0e22\u0e40\u0e2d\u0e07\u0e01\u0e14\u0e40\u0e2d\u0e07 \u0e44\u0e21\u0e48\u0e44\u0e2b\u0e27 \ud83d\ude41<\/p>\n<h2>Next Step ...<\/h2>\n<p>- \u0e15\u0e48\u0e2d\u0e01\u0e31\u0e1a Relay \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e01\u0e31\u0e1a\u0e2d\u0e38\u0e1b\u0e01\u0e23\u0e13\u0e4c\u0e44\u0e1f\u0e1f\u0e49\u0e32\u0e08\u0e23\u0e34\u0e07\u0e04\u0e23\u0e31\u0e1a (\u0e2d\u0e31\u0e19\u0e19\u0e35\u0e49\u0e2d\u0e31\u0e19\u0e15\u0e23\u0e32\u0e22\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a \u0e15\u0e49\u0e2d\u0e07\u0e23\u0e30\u0e27\u0e31\u0e07\u0e14\u0e49\u0e27\u0e22\u0e40\u0e1e\u0e23\u0e32\u0e30\u0e40\u0e25\u0e48\u0e19\u0e01\u0e31\u0e1a\u0e44\u0e1f 220v)<br \/>\n- \u0e15\u0e48\u0e2d\u0e22\u0e2d\u0e14\u0e43\u0e2b\u0e49 LINE Bot \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32 \u0e21\u0e35\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e21\u0e32\u0e01\u0e01\u0e27\u0e48\u0e32\u0e19\u0e35\u0e49\u0e04\u0e23\u0e31\u0e1a \u0e40\u0e0a\u0e48\u0e19 monitor \u0e2b\u0e23\u0e37\u0e2d\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19 \u0e04\u0e48\u0e32\u0e15\u0e48\u0e32\u0e07\u0e46 \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e44\u0e14\u0e49<br \/>\n- \u0e17\u0e33 Box \u0e43\u0e2b\u0e49\u0e14\u0e35 \u0e43\u0e2b\u0e49\u0e2a\u0e27\u0e22\u0e07\u0e32\u0e21 \u0e01\u0e31\u0e19\u0e19\u0e49\u0e33 \u0e15\u0e34\u0e14 Solar Cells \u0e40\u0e2d\u0e32\u0e44\u0e1b\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e08\u0e23\u0e34\u0e07\u0e01\u0e31\u0e19\u0e04\u0e23\u0e31\u0e1a ..<\/p>\n<p>\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e17\u0e48\u0e32\u0e19\u0e43\u0e14 \u0e17\u0e35\u0e48\u0e21\u0e35\u0e02\u0e49\u0e2d\u0e2a\u0e07\u0e2a\u0e31\u0e22 \u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48\u0e40\u0e02\u0e49\u0e32\u0e43\u0e08\u0e15\u0e23\u0e07\u0e2a\u0e48\u0e27\u0e19\u0e44\u0e2b\u0e19 \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16 Post \u0e16\u0e32\u0e21\u0e44\u0e14\u0e49\u0e17\u0e35\u0e48\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21\u0e19\u0e35\u0e49\u0e04\u0e23\u0e31\u0e1a<br \/>\n\u0e2b\u0e23\u0e37\u0e2d Add LINE ID: <strong>pornpasok<\/strong> \u0e40\u0e02\u0e49\u0e32\u0e21\u0e32\u0e2a\u0e2d\u0e1a\u0e16\u0e32\u0e21\u0e01\u0e47\u0e44\u0e14\u0e49\u0e04\u0e23\u0e31\u0e1a \u0e16\u0e49\u0e32\u0e15\u0e2d\u0e1a\u0e44\u0e14\u0e49\u0e1c\u0e21\u0e08\u0e30\u0e15\u0e2d\u0e1a\u0e43\u0e2b\u0e49\u0e19\u0e30\u0e04\u0e23\u0e31\u0e1a \ud83d\ude42<\/p>\n<div class=\"fcbkbttn_buttons_block\" id=\"fcbkbttn_left\"><div class=\"fcbkbttn_like \"><fb:like href=\"https:\/\/ton.packetlove.com\/blog\/iot\/line-bot-node-js-mqtt-esp32-iot-2.html\" action=\"like\" colorscheme=\"light\" layout=\"button_count\"  size=\"small\"><\/fb:like><\/div><div class=\"fb-share-button  \" data-href=\"https:\/\/ton.packetlove.com\/blog\/iot\/line-bot-node-js-mqtt-esp32-iot-2.html\" data-type=\"button_count\" data-size=\"small\"><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>\u0e2a\u0e27\u0e31\u0e2a\u0e14\u0e35\u0e04\u0e23\u0e31\u0e1a \u0e08\u0e32\u0e01\u0e15\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 \u0e17\u0e35\u0e48\u0e1c\u0e21\u0e1e\u0e39\u0e14\u0e16\u0e36\u0e07\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e15\u0e48\u0e32\u0e07\u0e46 \u0e17\u0e35\u0e48\u0e08\u0e30\u0e43\u0e0a\u0e49\u0e43\u0e19\u0e01\u0e32\u0e23\u0e17\u0e33 \u0e23\u0e30\u0e1a\u0e1a\u0e40\u0e1b\u0e34\u0e14\/\u0e1b\u0e34\u0e14 \u0e44\u0e1f \u0e27\u0e48\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e43\u0e0a\u0e49\u0e2d\u0e30\u0e44\u0e23\u0e1a\u0e49\u0e32\u0e07 \u0e27\u0e31\u0e19\u0e19\u0e35\u0e49 \u0e08\u0e30\u0e21\u0e32\u0e25\u0e07\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14 \u0e43\u0e19\u0e41\u0e15\u0e48\u0e25\u0e30\u0e2a\u0e48\u0e27\u0e19\u0e01\u0e31\u0e19\u0e04\u0e23\u0e31\u0e1a .. \u0e2d\u0e48\u0e32\u0e19\u0e15\u0e2d\u0e19\u0e17\u0e35\u0e48 1 \u0e44\u0e14\u0e49\u0e17\u0e35\u0e48 LINE Bot + node.js + MQTT + ESP32 (IoT) \u0e40\u0e1b\u0e34\u0e14\/\u0e1b\u0e34\u0e14 \u0e44\u0e1f (\u0e15\u0e2d\u0e19\u0e17\u0e35\u0e48 1) \u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e04\u0e37\u0e2d \u0e1c\u0e21\u0e08\u0e30\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e2a\u0e31\u0e48\u0e07 \u0e43\u0e2b\u0e49\u0e1a\u0e2d\u0e17 (LINE Messaging API) \u0e2a\u0e31\u0e48\u0e07\u0e40\u0e1b\u0e34\u0e14\/\u0e1b\u0e34\u0e14\u0e44\u0e1f \u0e44\u0e14\u0e49\u0e1c\u0e48\u0e32\u0e19 \u0e01\u0e32\u0e23 chat \u0e14\u0e31\u0e07\u0e20\u0e32\u0e1e 0.\u0e04\u0e27\u0e32\u0e21\u0e23\u0e39\u0e49\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e21\u0e35 \u0e43\u0e19\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21\u0e19\u0e35\u0e49 &#8211; \u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Arduino IDE \u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e15\u0e49\u0e19 &#8211; \u0e01\u0e32\u0e23\u0e40\u0e02\u0e35\u0e22\u0e19 node.js \u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e15\u0e49\u0e19 &#8211; \u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 LINE Messaging API \u0e40\u0e1a\u0e37\u0e49\u0e2d\u0e07\u0e15\u0e49\u0e19 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1049],"tags":[1047,1046,1043,1045],"class_list":["post-3014","post","type-post","status-publish","format-standard","hentry","category-iot","tag-esp32","tag-heroku","tag-linebot","tag-mqtt"],"_links":{"self":[{"href":"https:\/\/ton.packetlove.com\/blog\/wp-json\/wp\/v2\/posts\/3014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ton.packetlove.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ton.packetlove.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ton.packetlove.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ton.packetlove.com\/blog\/wp-json\/wp\/v2\/comments?post=3014"}],"version-history":[{"count":63,"href":"https:\/\/ton.packetlove.com\/blog\/wp-json\/wp\/v2\/posts\/3014\/revisions"}],"predecessor-version":[{"id":3367,"href":"https:\/\/ton.packetlove.com\/blog\/wp-json\/wp\/v2\/posts\/3014\/revisions\/3367"}],"wp:attachment":[{"href":"https:\/\/ton.packetlove.com\/blog\/wp-json\/wp\/v2\/media?parent=3014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ton.packetlove.com\/blog\/wp-json\/wp\/v2\/categories?post=3014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ton.packetlove.com\/blog\/wp-json\/wp\/v2\/tags?post=3014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}