nest_tutorial
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
nest_tutorial [2017/01/03 22:57] – dwallace | nest_tutorial [2017/02/09 13:46] (current) – dwallace | ||
---|---|---|---|
Line 7: | Line 7: | ||
**Keywords: | **Keywords: | ||
\\ | \\ | ||
+ | \\ \\ | ||
+ | {{ youtube> | ||
+ | \\ \\ | ||
- | {{ VIDEO }} | + | This tutorial is the first part of a series of tutorials on Smart Home development. |
- | + | ||
- | This tutorial serves as a starting point for Nest development using Android. Nest development can also be done with iOS and Web, but we will not cover these in this tutorial. For more info on those, see the [[https:// | + | |
===== Overview ===== | ===== Overview ===== | ||
- | The Nest API utilizes a single JSON document to store all of the data about one " | + | The [[https:// |
In order to interface with the Nest API, we need to utilize the [[https:// | In order to interface with the Nest API, we need to utilize the [[https:// | ||
Line 30: | Line 31: | ||
Once you have downloaded the necessary tools and SDKs, we will need to set-up a Nest client for our app to use for authentication and permissions. To do this, first make a [[https:// | Once you have downloaded the necessary tools and SDKs, we will need to set-up a Nest client for our app to use for authentication and permissions. To do this, first make a [[https:// | ||
- | Now, we will create our Nest client. To do this, we will head to the [[https:// | + | Now, we will create our Nest client. To do this, we will head to the [[https:// |
- | \\ | + | \\ \\ |
- | {{ dylanw: | + | {{ dylanw: |
\\ | \\ | ||
Line 38: | Line 39: | ||
Next, we will need to provide the permissions for our app to use. To do this, we will simply add the necessary permissions on the product page. For testing purposes, it is best to give all permissions to ensure that everything is working. Your permissions section should end up looking like this: | Next, we will need to provide the permissions for our app to use. To do this, we will simply add the necessary permissions on the product page. For testing purposes, it is best to give all permissions to ensure that everything is working. Your permissions section should end up looking like this: | ||
- | \\ | + | \\ \\ |
- | {{ dylanw: | + | {{ dylanw: |
\\ | \\ | ||
Line 51: | Line 52: | ||
Once, you have successfully imported the project, we need to make some changes to the Constants file. This can be found under java/ | Once, you have successfully imported the project, we need to make some changes to the Constants file. This can be found under java/ | ||
- | \\ | + | \\ \\ |
- | {{ dylanw: | + | {{ dylanw: |
\\ | \\ | ||
Line 63: | Line 64: | ||
In order to deploy to a physical device, we have to ensure that both Developer Mode is turned-on, and that USB Debugging is turned-on. To enable Developer Mode, go to Settings > About device and tap the Build Number field 7 times. This will ensure that Developer Mode is turned on. To enable USB debugging, plug in your device to your computer, and Media Device Options card in the Notifications bar. Disable and re-enable the device as a Media Device, and then it will prompt you to enable USB Debugging. Check to " | In order to deploy to a physical device, we have to ensure that both Developer Mode is turned-on, and that USB Debugging is turned-on. To enable Developer Mode, go to Settings > About device and tap the Build Number field 7 times. This will ensure that Developer Mode is turned on. To enable USB debugging, plug in your device to your computer, and Media Device Options card in the Notifications bar. Disable and re-enable the device as a Media Device, and then it will prompt you to enable USB Debugging. Check to " | ||
- | Now we can deploy the app to our device. To do this simply press the Run button. It will ask you to choose which device to run on, so choose the device you just enabled. It may prompt you to install the same version of Android as your device to enable Instant Run. Do this, and wait for the install to finish. Once, you have done this, press run again, and Android Studio will build the project and deploy it onto your device for you to use. | + | Now we can deploy the app to our device. To do this simply press the Run button. It will ask you to choose which device to run on, so choose the device you just enabled. It may prompt you to install the same version of Android as your device to enable Instant Run. Do this, and wait for the install to finish. Once, you have done this, press Run, and Android Studio will build the project and deploy it onto your device for you to use. |
+ | |||
+ | ===== Testing ===== | ||
+ | |||
+ | In order to test our app that we have created, we need some Nest devices to interface with. If you already have Nest devices, then you are welcome to use those for testing. However, for most it is easier to utilize the Nest Home Simulator to emulate virtual Nest devices for testing. | ||
+ | |||
+ | To do this, we must first install the [[https:// | ||
+ | \\ \\ | ||
+ | {{ dylanw: | ||
+ | \\ | ||
+ | |||
+ | Here, we can add virtual Nest devices and even virtual " | ||
+ | |||
+ | Once you have setup the Nest Home Simulator, and your app is deployed, you should be ready to start testing the app! | ||
+ | |||
+ | Now that you know the process, go through the [[https:// | ||
+ | |||
+ | |||
+ | For questions, clarifications, |
nest_tutorial.1483513079.txt.gz · Last modified: 2017/01/03 22:57 by dwallace