4.2.2 Include a New Device
Use the Chrome browser to open FBP editor: http://localhost:5000
Enter the Device Management page to check the initial state
Click the "Add Nodes" button to start including the IoT board for Master management. You should see the message stating Master is "ready to ADD".
Open another terminal and use SSH command to connect to the IoT board.
ssh root@<IP address of IoT board>
After SSH is established, go to the folder of the Python WuClass on the IoT board.
cd <path_of_source_code>/wukong-darjeeling/wukong/gateway/udpwkpf/
Edit udpwkpf_io_interface.py and configure the device_type definition on line 12. If you use Intel Edison, configure this definition to be DEVICE_TYPE_MRAA. If you use Raspberry Pi, configure it to be DEVICE_TYPE_RPI. This definition will be further explained in the chapter 6.4.
Run the device program udpdevice_blink_led.py. This Python program will start the device to receive a node ID from the WuKong gateway, and then the two WuObjects, Button and Light Actuator, residing on the device.
python udpdevice_blink_led.py <IP address of Gateway> \ <IP address of IoT board>:<arbitrary port number>
Once Master has found the board (displaying the message as shown), stop the inclusion process.
Check the device management list again by clicking the Discover Nodes button.
Modify the device location and press the Set Location button to save it.
Press the Details button to check the sensor profile of the Python device.