9.6 Test and Install
Now that the Android client is transmitting the URL request via the toggle button interface, we are nearly finished with this project. Test the lock and photo capture mechanism by powering up the Android phone server, making sure all the connections between the phone, IOIO board, and PowerSwitch Tail are connected. Send a request to the Android phone server from the other Android device running the Android Door Lock client. Note that in order to test this request successfully, the client Android device needs to be connected to the same Wi-Fi access point as the Android phone server. Your test rig may look like mine (Figure 43, Testing the Android Door Lock).

Figure 43. Testing the Android Door Lock
The final task is to actually install the lock mechanism in the doorframe. This can be a daunting process if you are not comfortable with boring out wood and properly routing electrical wiring behind drywall. In fact, I strongly recommend that if you intend to permanently install this hardware configuration, contact a reputable carpenter and electrician to assist with the installation. The extra money you spend will be well worth the safety and security of your home, and it will keep your sanity intact.
When installing the lock, keep the Android phone, IOIO board, and PowerSwitch Tail in an easy, accessible location. It should go without saying that you shouldn’t place these in the wall in case you need to service or replace any of these components in the future, not to mention that they could pose a fire hazard if the wiring is not correctly shielded. I suggest obtaining a project box from an electronics supplier. The box should be large enough to fit all the components, with room for expansion should you need to house additional hardware for project enhancements. Always practice safe wiring techniques. Once a circuit is well established, I prefer soldering components in place and then covering the exposed conductive surface, like circuit leads and stripped wiring, with heat shrink tubing to prevent any shorting of the circuit. If you have an electrician assist with the hardware installation, consult with this professional about best practices and recommendations as well.