4.1.2 Include a New Device
Before we can deploy any IoT application on WuKong, Master must find the devices available to run it. In this section, we show how to use the device management capability in WuKong Master.
Use the Chrome browser to open the Master interface: http://localhost:5000
Click on the Device Management tab and the Discover Node button to check the initial state.
Click the Add Node button to include a new device in Master.
Note: If the message shown is not ready to ADD, press the Stop to complete operation button and try the step again.
Open a terminal and go to the folder where the device program is stored.
cd <path_of_source_code>/wukong-darjeeling/wukong/gateway/udpwkpf/
Run the device program udpdevice_intel_sound.py. This Python program will start the device to receive a node ID from the WuKong gateway, and then the Intel_Sound WuClass on the device.
python udpdevice_intel_sound.py <IP address of gateway> \ <IP address of device program>:<arbitrary port number>
Note: When the device program is started, this device will get a Node ID assigned by the Master.
Click on the Stop to complete operation button.
Click the Discover Nodes button to refresh the device list.
The sensor profile of this device can be seen by clicking the Details button.
The location of the device can be changed as follows.
Add another device program called udpdevice_logic.py by repeating Step 3 to Step 9. After that, the device management list should be as follows.