IoT Resources Library
Including IoT development kits, implementation reference documents, and the newest advances of the internet of things. To help more developers do more flexible applications on their IoT projects.
A Guide on connecting Dusun’s gateway and
smart devices through smartphone Apps
Many IoT sensors are hardware resource-constrained, operated at low power mode and have no setup interfaces. These IoT sensors or devices are often transfer sampled data and setup data to and from cloud platforms via an IoT Gateway. An IoT gateway bridges the communication gap between IoT devices, sensors, equipment, systems, and the cloud. Then a smartphone IoT application may be a convenient and fast way to connect and set up these devices. Dusun’s Gateways support many IoT cloud platforms and corresponding smartphone applications. Many IoT smart devices including Dusun’s smart home sensors can be connected and operated through these Apps. This guide will show how to connect Dusun’s Gateway and smart devices.
1. Flashing Gateway
There are many cloud platforms which provide services for customers to connect their IoT devices. A way to connect the devices to these cloud platforms is through Dusun’s Gateway. Dusun’s gateway integrates with a specific program which can connect a specific cloud platform.
If customers want to connect a specific platform which they choose with Dusun’s gateway, they should flash a specific firmware corresponding to the platform into the gateway. The following steps show how to flash the gateway with a firmware which customers can request from Dusun.
![Guide On Connecting Hub And Devices 1 System configuration](https://www.dusuniot.com/wp-content/uploads/2022/06/System_configuration.jpg)
Figure 1. gateway→PC connection diagram
Connect the gateway to the PC and power up, according to figure 2;
Open a web browser on PC, Input Gateway IP Address: 192.168.66.1;Enter the username and Password (Username: root Password: root), login to the gateway(Figure2)
Enter the “Backup/flash” menu (figure 3), upload a new firmware image to replace the running firmware(figure 4).
![Guide On Connecting Hub And Devices 2 authorization required](https://www.dusuniot.com/wp-content/uploads/2022/06/authorization_required.png)
Figure 2. Login interface
![Guide On Connecting Hub And Devices 3 Figure 3 Backup Flash firmware menu](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_3_Backup_Flash_firmware_menu.png)
Figure 3. Backup/Flash firmware menu
![Guide On Connecting Hub And Devices 4 Figure 4 Flash firmware operations](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_4_Flash_firmware_operations.png)
Figure 4. Flash firmware operations
2.Connecting devices with Apps
After flashing the gateway with image corresponding to a specific platform, IoT devices can be registered and controlled through an App which is provided by the platform vendors. We will show you how to connecting Dusun gateways and smart sensors to Tuya platform with Tuya App in the following part.
-
Device registration with Tuya App.
1) Flash the gateway with the image corresponding to Tuya platform.
2) Download and install Tuya App. Go to the Android app market or app store, search for “Tuya smart”, download and install it on the phone.
![Guide On Connecting Hub And Devices 5 Figure 5 Connect status of the gateway 1](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_5_Connect_status_of_the_gateway-1.png)
A
![Guide On Connecting Hub And Devices 6 Figure 5 Connect status of the gateway B](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_5_Connect_status_of_the_gateway-B.png)
B
Figure 5. Connect status of the gateway
![Guide On Connecting Hub And Devices 7 Figure 6 adding gateway procedure on the](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_6_adding_gateway_procedure_on_the.png)
![Guide On Connecting Hub And Devices 8 Figure 6 adding gateway procedure on the 1](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_6_adding_gateway_procedure_on_the-1.png)
![Guide On Connecting Hub And Devices 9 Figure 6 adding gateway procedure on the 2](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_6_adding_gateway_procedure_on_the-2.png)
![Guide On Connecting Hub And Devices 10 Figure 6 adding gateway procedure on the 3](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_6_adding_gateway_procedure_on_the-3.png)
![Guide On Connecting Hub And Devices 11 Figure 6 adding gateway procedure on the 4](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_6_adding_gateway_procedure_on_the-4.png)
Figure 6. Adding gateway procedure on the App
3) Add Gateway on the App.
Power on the gateway, connect it to the internet by inserting the Ethernet cable to the WAN port (Figure 5-A). Connect the mobile phone to the same network, the gateway green light, and the red light will be on (Figure 5-B). Open the Tuya APP, click” Add Devices” on the home page (figure 6-A); choose “others”, click’ Gateway(ZigBee)’ (Figure6-B); then jump to the add device page as figure6-C, Click: ‘confirm CONFIG IND on (green) ‘, start connect gateway (figure6-D); wait 2-3 minutes to find the gateway, then click the connecting button (figure 6-F). If the gateway red light is off and the green light is on, the gateway is added successfully (Figure 7).
![Guide On Connecting Hub And Devices 12 Figure 7 The gateway status after being](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_7_The_gateway_status_after_being_.png)
Figure 7. The gateway status after being added
![Guide On Connecting Hub And Devices 13 Figure 8 Adding sensor interface on the](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_8_Adding_sensor_interface_on_the_.png)
![Guide On Connecting Hub And Devices 14 Figure 8 Adding sensor interface on the 1](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_8_Adding_sensor_interface_on_the_-1.png)
![Guide On Connecting Hub And Devices 15 Figure 8 Adding sensor interface on the 2](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_8_Adding_sensor_interface_on_the_-2.png)
Figure 8. Adding a sensor interface on the Tuya App
4) Add and configure Dusun Lock on the App.
At first, click on the “Manage added devices” of the gateway; Click “Security & sensors”; then click “Lock (Zigbee)” (figure 8). Secondly, click the “Confirm indicator is flashing” button and then wake up the door lock (figure 9-A), the door lock starts to pair with the gateway.
After the pairing procedure is done, the lock is added. Click “done” (Figure 9-B), the door lock details page will be shown. We can configure the lock and check its status on the page. If one wants to add a passcode to the lock, one can enter a 6-digit password in the input passcode box and click the send button on the right side of the input box (Figure 10-A). If the passcode is sent successfully and the door lock receives the password, the input box will display “success” (Figure 10-B). Deleting password and change password can also be done similarly(Figure 11/12. Other configuration including setting seed, getting the dynamic password and others can be done also easily.
![Guide On Connecting Hub And Devices 16 Figure 9 A](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_9-A.png)
![Guide On Connecting Hub And Devices 17 Figure 9 B](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_9-B.png)
Figure 9.
![Guide On Connecting Hub And Devices 18 Figure 10 Adding password to the lock A](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_10_Adding_password_to_the_lock-A_.png)
![Guide On Connecting Hub And Devices 19 Figure 10 Adding password to the lock B](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_10_Adding_password_to_the_lock-B_.png)
Figure 10. Adding password to the lock
![Guide On Connecting Hub And Devices 20 Figure 11 Deleting password in the lock](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_11_Deleting_password_in_the_lock-.png)
![Guide On Connecting Hub And Devices 21 Figure 11 Deleting password in the lock 1](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_11_Deleting_password_in_the_lock-1.png)
![Guide On Connecting Hub And Devices 22 DM 20220628113916 001](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628113916_001.png)
Figure 12. Changing password of the lock
5) Add a PIR Motion sensor and check its status.
At first, click “Manage added devices” of the gateway, then click “Add Sub-Device” to enter the Add Sub-Device page, select “PIR Sensor”, enter the Add Device page (figure 13). Secondly, power on the sensor, poke the pairing hole for 3s and confirm that the indicator light below the device is flashing (Figure 14).
If the pairing is successful, the ‘Add Device Success’ page will be shown. Enter the motion sensor details page, one can check the power of the PIR and whether an object is detected to move (0 is not detected, 1 is detected, as shown in Figure 15)
![Guide On Connecting Hub And Devices 23 DM 20220628114656 001](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628114656_001.png)
![Guide On Connecting Hub And Devices 24 DM 20220628114656 002](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628114656_002.png)
![Guide On Connecting Hub And Devices 25 DM 20220628114656 003](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628114656_003.png)
![Guide On Connecting Hub And Devices 26 DM 20220628114656 004](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628114656_004.png)
![Guide On Connecting Hub And Devices 27 DM 20220628114656 005](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628114656_005.png)
Figure 14 Power on the sensor and pair it with gateway
![Guide On Connecting Hub And Devices 28 DM 20220628115139 008](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628115139_008.png)
![Guide On Connecting Hub And Devices 29 DM 20220628115248 001](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628115248_001.png)
![Guide On Connecting Hub And Devices 30 DM 20220628115248 002](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628115248_002.png)
Figure 15 Check the status of PIR sensor
6) Add and check a temperature and humidity sensor.
At first, click “Manage added devices” of the gateway, then click “Add Sub-Device” to enter the Add Sub-Device page, select ” Temperature and Humidity Sensor “, enter the Add Device page (figure 16). Secondly, power on the sensor, poke the pairing hole for 3s and confirm that the indicator light below the device is flashing (Figure 17). If the pairing is successful, the ‘Add Device Success’ page will be shown. Enter the sensor details page, one can check the data sensor reported including temperature, humidity and battery level (Figure 18)
![Guide On Connecting Hub And Devices 31 DM 20220628115523 001](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628115523_001.png)
![Guide On Connecting Hub And Devices 32 Figure 16 temperature and humidity senso](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_16_temperature_and_humidity_senso.png)
![Guide On Connecting Hub And Devices 33 Figure 16 temperature and humidity senso 1](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_16_temperature_and_humidity_senso-1.png)
Figure 16 temperature and humidity sensor adding interface
![Guide On Connecting Hub And Devices 34 Figure 17 Poking the pairing hole of the 1](https://www.dusuniot.com/wp-content/uploads/2022/06/Figure_17_Poking_the_pairing_hole_of_the-1.png)
Figure 17 Poking the pairing hole of the temperature sensor
![Guide On Connecting Hub And Devices 35 DM 20220628131311 001](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628131311_001.png)
![Guide On Connecting Hub And Devices 36 DM 20220628131311 002](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628131311_002.png)
Figure 18 The temperature and humidity sensor status
7) Add and check a water leakage sensor.
Similar to the temperature and humidity sensor, one can add a water leakage sensor to the App. After adding successful, one can check the status of the water leakage sensor. (Figure 19).
![Guide On Connecting Hub And Devices 37 DM 20220628132456 001](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628132456_001.png)
![Guide On Connecting Hub And Devices 38 DM 20220628132456 003](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628132456_003.png)
![Guide On Connecting Hub And Devices 39 DM 20220628132456 002](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628132456_002.png)
![Guide On Connecting Hub And Devices 40 DM 20220628132456 004](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628132456_004.png)
8) Add and check a door contact sensor.
Similar to the PIR sensor, one can add a door contact sensor to the App (Figure 20/21). After adding successful, one can check the status of the Door status that sensor reported. (Figure 22).
![Guide On Connecting Hub And Devices 41 DM 20220628132456 005](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628132456_005.png)
![Guide On Connecting Hub And Devices 42 DM 20220628132456 006](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628132456_006.png)
![Guide On Connecting Hub And Devices 43 DM 20220628132456 007](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628132456_007.png)
Figure 20 Door sensor adding interface
![Guide On Connecting Hub And Devices 44 DM 20220628132456 008](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628132456_008.png)
![Guide On Connecting Hub And Devices 45 DM 20220628132456 009](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628132456_009.png)
Figure 21 Door sensor pairing
![Guide On Connecting Hub And Devices 46 DM 20220628132456 010](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628132456_010.png)
![Guide On Connecting Hub And Devices 47 DM 20220628132456 011](https://www.dusuniot.com/wp-content/uploads/2022/06/DM_20220628132456_011.png)
Figure 22 Door sensor data reported
Ask for More IoT Resources
Talk to our experts in IoT.
Speed up the process in your IoT projects.