Last modified by Mengting Qiu on 2025/03/08 11:33
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -386,17 +386,16 @@ 386 386 387 387 === 3.6.1 Configure ThingsBoard === 388 388 389 -=== =3.6.1.1 Create Device ====389 +=== 1.1.1 Create Device === 390 390 391 391 Create a New Device in [[ThingsBoard>>url:https://thingsboard.cloud/]]. 392 392 393 393 [[image:image-20230802112413-32.png]] 394 394 395 +=== 1.1.2 Create Uplink & Downlink Converter === 395 395 396 - ==== 3.6.1.2 CreateUplink& DownlinkConverter====397 +Uplink Converter 397 397 398 -(% style="color:blue" %)**Uplink Converter** 399 - 400 400 The purpose of the decoder function is to parse the incoming data and metadata to a format that ThingsBoard can consume. deviceName and deviceType are required, while attributes and telemetry are optional. Attributes and telemetry are flat key-value objects. Nested objects are not supported. 401 401 402 402 To create an uplink converter go to the Integrations center -> Data converters page and click “plus” button. Name it “MQTT Uplink Converter” and select type Uplink. Use debug mode for now. ... ... @@ -404,17 +404,16 @@ 404 404 [[image:image-20230802112413-33.png]] 405 405 406 406 407 - (% style="color:blue" %)**Downlink Converter**406 +Downlink Converter 408 408 409 409 The Downlink converter transforming outgoing RPC message and then the Integration sends it to external MQTT broke 410 410 411 411 [[image:image-20230802112413-34.png]] 412 412 413 - (% style="color:red" %)**Note:Our device payload is already human readable data. Therefore, users do not need to write decoders. Simply create by default.**412 +Note:Our device payload is already human readable data. Therefore, users do not need to write decoders. Simply create by default. 414 414 414 +=== 1.1.3 MQTT Integration Setup === 415 415 416 -==== 3.6.1.3 MQTT Integration Setup ==== 417 - 418 418 Go to the Integrations center -> Integrations page and click “plus” icon to add a new integration. Name it “MQTT Integration”, select type MQTT; 419 419 420 420 [[image:image-20230802112413-35.png]] ... ... @@ -434,32 +434,30 @@ 434 434 435 435 [[image:image-20230802112413-38.png]] 436 436 435 +== 1.2 Simulate with MQTT.fx == 437 437 438 -=== 3.6.2 Simulate with MQTT.fx === 439 - 440 440 [[image:image-20230802112413-39.png]] 441 441 442 442 [[image:image-20230802112413-40.png]] 443 443 441 +== 1.3 Configure NB-IoT Sensor == 444 444 445 - === 3.6.3Configure NB-IoT Sensor ===443 +AT Commands 446 446 447 - (%style="color:blue" %)**ATCommands**445 +AT+PRO=3,3 ~/~/ Use MQTT to connect to ThingsBoard. 448 448 449 - (% style="color:#037691" %)**AT+PRO=3,3(%%)~/~/UseMQTT to connectto ThingsBoard.447 +AT+SUBTOPIC=device name ~-~-> 只需要 Device Name 吗?对的 450 450 451 - (% style="color:#037691" %)**AT+SUBTOPIC=device name** (%%)~-~-> 只需要 Device Name 吗?对的449 +AT+PUBTOPIC=device name ~-~-> 只需要 Device Name 吗?对的 452 452 453 -(% style="color:#037691" %)**AT+PUBTOPIC=device name** (%%) ~-~-> 只需要 Device Name 吗?对的 454 454 455 - 456 456 Users do not need to fill in the client, username, and password. But the configuration information of the device requires setting the client, username, and password, which can be entered freely. (软件自动填充为 Device Name 吧).这边不用提示了,客户不需要输入。(大部分客户还是会自己去设置这个的,提高安全性) 457 457 458 - (% style="color:blue" %)**CLIENT :“Any value”**454 +CLIENT :“Any value” 459 459 460 - (% style="color:blue" %)**User Name:“Any value”**456 +User Name:“Any value” 461 461 462 - (% style="color:blue" %)**Password:“Any value”**458 +Password:“Any value” 463 463 464 464 465 465 Test Uplink by click the button for 1 second ... ... @@ -471,11 +471,10 @@ 471 471 [[image:image-20230802112413-43.png]] 472 472 473 473 474 -= =3.7 [[Tago.io>>url:https://admin.tago.io/]] (via MQTT) ==470 += 7. [[Tago.io>>url:https://admin.tago.io/]] (via MQTT) = 475 475 476 -== =3.7.1 Create device & Get Credentials ===472 +== 5.1 Create device & Get Credentials == 477 477 478 - 479 479 We use MQTT Connection to send data to [[Tago.io>>url:https://admin.tago.io/]]. We need to Create Device and Get MQTT Credentials first. 480 480 481 481 [[image:image-20230802112413-44.png]] ... ... @@ -482,6 +482,7 @@ 482 482 483 483 [[image:image-20230802112413-45.png]] 484 484 480 += = 485 485 486 486 Go to the Device section and create a device. Then, go to the section tokens and copy your device-token. 487 487 ... ... @@ -490,30 +490,20 @@ 490 490 491 491 On the Connection Profile window, set the following information: (这边加一个截图) 492 492 493 -* (% style="color:blue" %)**Profile Name: “Any name”** 489 +* Profile Name: “Any name” 490 +* Broker Address: mqtt.tago.io 491 +* Broker Port: 1883 492 +* Client ID: “Any value” 494 494 495 -* (% style="color:blue" %)**Broker Address: mqtt.tago.io** 496 - 497 -* (% style="color:blue" %)**Broker Port: 1883** 498 - 499 -* (% style="color:blue" %)**Client ID: “Any value”** 500 - 501 501 On the section User credentials, set the following information:(这边加一个截图) 502 502 503 -* **User Name: “Any value”** (%%) Tago validates your user by the token only 496 +* User Name: “Any value” Tago validates your user by the token only 497 +* Password: “Your device token” 498 +* PUBTOPIC: “Any value” 499 +* SUBTOPIC: “Any value” 504 504 505 - ***Password:“Your devicetoken”**501 +== 5.2 Simulate with MQTT.fx == 506 506 507 -* **PUBTOPIC: “Any value”** 508 - 509 -* **SUBTOPIC: “Any value”** 510 - 511 - 512 - 513 - 514 -=== 3.7.2 Simulate with MQTT.fx === 515 - 516 - 517 517 [[image:image-20230802112413-47.png]] 518 518 519 519 [[image:image-20230802112413-48.png]] ... ... @@ -522,40 +522,30 @@ 522 522 523 523 [[image:image-20230802112413-49.png]] 524 524 511 +== 1.4. tago data == 525 525 526 -=== 3.7.3 tago data === 527 527 528 - 529 529 [[image:image-20230802112413-50.png]] 530 530 531 531 [[image:image-20230802112413-51.png]] 532 532 518 +== 1.4. TLS mode == 533 533 534 - === 3.7.4TLS mode===520 +Users can choose to use SSL/TLS mode. 535 535 522 +On the SSL/TLS section, check the option Enable SSL/TLS, and click OK. 536 536 537 - Userscanchoose touse(% style="color:blue" %)**SSL/TLS**(%%)mode.524 +The device needs to enable the TLS mode and set the AT+TLSMOD=1,0 command. 538 538 539 -On the SSL/TLS section, check the option **Enable SSL/TLS**, and click OK. 526 +* Profile Name: “Any name” 527 +* Broker Address: mqtt.tago.io 528 +* Broker Port: 8883 529 +* Client ID: “Any value” 530 +* User Name: “Any value” Tago validates your user by the token only 531 +* Password: “Your device token” 532 +* PUBTOPIC: “Any value” 533 +* SUBTOPIC: “Any value” 540 540 541 -The device needs to enable the TLS mode and set the (% style="color:blue" %)**AT+TLSMOD=1,0**(%%) command. 542 - 543 -* (% style="color:blue" %)**Profile Name: “Any name”** 544 - 545 -* (% style="color:blue" %)**Broker Address: mqtt.tago.io** 546 - 547 -* (% style="color:blue" %)**Broker Port: 8883** 548 - 549 -* (% style="color:blue" %)**Client ID: “Any value”** 550 - 551 -* (% style="color:blue" %)**User Name: “Any value”** (%%) Tago validates your user by the token only 552 - 553 -* (% style="color:blue" %)**Password: “Your device token”** 554 - 555 -* (% style="color:blue" %)**PUBTOPIC: “Any value”** 556 - 557 -* (% style="color:blue" %)**SUBTOPIC: “Any value”** 558 - 559 559 [[image:image-20230802112413-52.png]] 560 560 561 561