22.214.171.124 Packet Tracer – Control IoT Devices (Answers)
Instructor Note: Red font color or gray highlights indicate text that appears in the Instructor copy only.
In this activity, you have just installed various IoT devices around the house and wish to configure them as a home security system.
- Configure the Home Gateway to use a Motion Sensor
- Test and reset security features
- Set the air conditioning
Step 1: Configure Home Gateway to use a Motion Sensor.
a. From the Desktop tab on Tablet, click Web Browser.
b. Type in the IP address of the home gateway 192.168.25.1 and press Enter.
c. Login to Home Gateway. When asked for username and password, use admin for both. This is the default.
d. Click Conditions after logging in. Add a new rule and name it MotionDetectorOn.
e. From the pull down menu under If: choose Motion Detector. To the right of that menu, select on and to the right again, select true.
f. From the pull down menu under Then set: choose Security Camera. To the right of that menu, select on and to the right again, select true.
g. Add another Action. From the second pull down menu under Then set: choose Smart Door. To the right of that menu, select Lock and to the right again, select Lock.
h. Add another Action. From the third pull down menu under Then set: choose Smart Lamp. To the right of that menu, select Status and to the right again, select Dim.
i. Click OK to save this Action and return to the Conditions page.
j. Add another rule named MotionDetectorOff.
k. From the pull down menu under If: choose Motion Detector. To the right of that menu, select on and to the right again, select false.
l. From the pull down menu under Then set: choose Security Camera. To the right of that menu, select on and to the right again, select false.
m. Click OK to save this Action and return to the Conditions page.
Step 2: Test and reset security features.
a. From the Browser on Tablet, return to the home page of the Home Gateway at http://192.168.25.1/home.html.
b. Click the arrows to the left of the Smart Door, Smart Lamp, Motion Detector, and Security Camera to open their interfaces.
c. With the website visible, hold down the Alt key and click the Motion Detector.
What is happening on the website, and in the Logical Interface of Packet Tracer?
The light on the motion detector turned on, the light on the security camera turned on, the door locked, the lamp turned to dim setting, and the website showed a video.
d. When the motion detector turns off, so does the security camera. Unfortunately, you have managed to lock yourself out of the house.
How can you easily unlock the door?
Unlock the door using the Unlock button on the Home Gateway home page.
e. Alt-click the unlocked Smart Door to open it.
f. Alt-click the Switch to turn the dim Smart Lamp fully on. Alt-click the Switch again to turn the Smart Lamp off. The Smart Lamp can also be controlled remotely through the Home Gateway home page.
g. Examine the Python script which manages the Smart Lamp under the Programming tab of the MCU.
Step 3: Set the air conditioning.
a. While you were outside, a cold front moved in. Alt-click the Temperature Control to cool the house, twice, to heat the house, and three times to automatically cool or heat to a comfortable temperature.
b. Open the Temperature Control Programming tab from the Advanced menu to examine the Java script that controls the unit.
c. The Home Gateway home page, Temperature Control and Temperature Meter display different numbers.
What line of code in the Temperature Meter could be responsible for this discrepancy?
Line 38 in the temperature meter code converts from Celsius to Fahrenheit.