Changes for page Through MQTT to upload data
Last modified by Xiaoling on 2022/09/02 18:11
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 6 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -236,18 +236,30 @@ 236 236 237 237 238 238 ))) 239 -1. [[ ~[~[image:https://wiki.dragino.com/images/thumb/9/98/MQTT_Sketch_1.png/400px-MQTT_Sketch_1.png~|~|height="261" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_Sketch_1.png]](((239 +1. [[image:image-20220531141842-33.png]]((( 240 240 Open the Sketch [[MQTT_Client>>url:https://github.com/dragino/Arduino-Profile-Examples/tree/master/libraries/Dragino/examples/IoTServer/ThingSpeak/MQTT_Client]]. (Board:Arduino/Genuino Uno.Port:Serial ports.)and upload. 241 + 242 + 243 + 241 241 ))) 242 -1. [[ ~[~[image:https://wiki.dragino.com/images/thumb/3/3d/MQTT_Sketch3.png/400px-MQTT_Sketch3.png~|~|height="371" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_Sketch3.png]](((245 +1. [[image:image-20220531141927-34.png]]((( 243 243 Open Serial monitor. 247 + 248 + 249 + 244 244 ))) 245 245 1. Go to IoT Server to check the result. 246 246 1. ((( 247 -[[~[~[image:https://wiki.dragino.com/images/thumb/4/43/MQTT_result_1.png/400px-MQTT_result_1.png~|~|alt="MQTT result 1.png" height="181" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_result_1.png]] 253 +[[image:image-20220531142023-35.png]] 254 + 255 + 256 + 248 248 ))) 249 249 1. ((( 250 -[[~[~[image:https://wiki.dragino.com/images/thumb/7/70/MQTT_result_2.png/400px-MQTT_result_2.png~|~|alt="MQTT result 2.png" height="190" width="400"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_result_2.png]] 259 +[[image:image-20220531142155-36.png]] 260 + 261 + 262 + 251 251 ))) 252 252 253 253 = 5. FAQ = ... ... @@ -258,18 +258,25 @@ 258 258 259 259 For example: for ThingSpeak, a MQTT publish command is: 260 260 261 -{{{mosquitto_pub -h mqtt.thingspeak.com -p 1883 -u dragino -P QZXTAKE88V3S7O2J -i dragino_Client -t channels/200893/publish/B9Z0R25QNVEBKIFY -m "field1=34&field2=89&status=MQTTPUBLISH" 262 -}}} 273 +(% class="box infomessage" %) 274 +((( 275 +**mosquitto_pub -h mqtt.thingspeak.com -p 1883 -u dragino -P QZXTAKE88V3S7O2J -i dragino_Client -t channels/200893/publish/B9Z0R25QNVEBKIFY -m "field1=34&field2=89&status=MQTTPUBLISH"** 276 +))) 263 263 264 264 What now we need to put in the LG01 is how to combine this command. 265 265 266 266 1. LG01 web console -> Sensor -> MQTT 267 267 1. Choose general Server 268 -1. [[ ~[~[image:https://wiki.dragino.com/images/thumb/e/ea/MQTT_Configure1.png/600px-MQTT_Configure1.png~|~|height="367" width="600"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_Configure1.png]](((282 +1. [[image:image-20220531142342-37.png]]((( 269 269 Refer to your server to fill in. 284 + 285 + 286 + 270 270 ))) 271 -1. [[ ~[~[image:https://wiki.dragino.com/images/0/07/MQTT_Configure2.png~|~|height="93" width="538"~]~]>>url:https://wiki.dragino.com/index.php/File:MQTT_Configure2.png]](((288 +1. [[image:image-20220531142447-38.png]]((( 272 272 Ex:ThingSpeak Server 290 + 291 + 273 273 ))) 274 274 275 275 According to MQTT commands: mosquitto_pub, we need to put
- image-20220531141842-33.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +39.2 KB - Content
- image-20220531141927-34.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +26.8 KB - Content
- image-20220531142023-35.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +34.5 KB - Content
- image-20220531142155-36.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +42.9 KB - Content
- image-20220531142342-37.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +27.4 KB - Content
- image-20220531142447-38.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoling - Size
-
... ... @@ -1,0 +1,1 @@ 1 +4.7 KB - Content