General:
To use this plugin, a config file "nest.cnf" needs to be populated and placed in
the same directory as the mpm client (i.e. "mpm_sample_client")
generated by IoTivity's build system.

Note: A Nest Thermostat with a non-proxied internet connection is required to use
this plugin. This plugin will NOT provision your thermostat for you. You will need
to perform the set-up steps through the Nest app (this can be found in either the
iOS or Android app store) and your own Nest user account.

What should this file look like?

    See sample "nest.cnf.sample" file with contents as shown
    below(without spaces, tabs or quotes):

    "

        A5TA4W7L
        d.L6y17o9NXdI8D4bISIwS3m7N5B0Em4zGEi8cIsJQWhZPqGxjKOLreuunOUe4utN6oENhV22DeQmkHlNoZtFhJdBvwepEa1P31msLiL8MmXt4X5M1yLX6D03uJXrjpNNGqKTBynCaAHH42Gtv
        d9dd021b-8ca4-4c21-ad81-3b6f3c845cf7
        O1BGktjJergHztgXStzLdNb3G

    "

What is contained in this file?

    It consists of four values:
    1. First line of this file represents a PIN CODE value.
    2. Second line represents the accessToken.
    3. Third line represents API KEY/CLIENT ID value.
    4. Fourth line represents the CLIENT SECRET value.

What is PIN CODE?

    It is a randomly generated 8 digit alphanumeric value
    which can be used to obtain a new access token from
    nest server. Please note that each pin code is valid
    only for one-time usage. The procedure on how to use
    pin code to obtain a new access token is discussed
    below under the heading "Where can I obtain the token
     as shown in the above example".

Where to put this file?
    The placement of the nest.cnf file should be where
    your mpm client is also:

    <iotivity>/out/<TARGET_OS>/<TARGET_ARCH>/<BUILD>/bridging/src/mpm_client

    Example: <iotivity>/out/linux/x86_64/release/bridging/src/mpm_client
        Depending on your build configuration, the path may
        look mildly different.

What is this key or token?

    The Nest mapping requires usage of the Nest
    Developer's API. The usage of this API requires
    that every user/developer has their own HTTP API
    Token.This HTTP API Token allows the
    libnestplugin.so to perform actions within your
    Nest cloud account on your behalf.


Where can I obtain API KEY/CLIENT IB and SECRET as shown in the above examples?

    Please go through the instructions on the below link to
    generate the API KEY/CLIENT ID and  SECRET:

    https://developers.nest.com/documentation/cloud/how-to-auth/


Where can I obtain the token as shown in the above example?

    Use the same username and password you used to set
    up your Nest thermostat at the following address to
    obtain a token and click on "Accept":

    https://home.nest.com/login/oauth2?client_id=<nest_client_id>&state=STATE

    (where nest_client_id is read from nest.cnf file itself appearing in the fourth
     line in the file)

    Copy the 8 letter pincode thus generates and
    paste it in the nest.cnf file and then start
    the plugin. The access token will be obtained
    from the cloud and and stored in nest.cnf in
    the third line of the file. Please note that
    the pin code is for one time use and a new one
    has to be generated everytime access token expires.
    The lifetime of access token is 365 days. Do not
    share this token with anyone. This token can give
    someone complete access to your Nest account. Be careful.

How can I start this plugin?

    Use either binary executable 'mpm_sample_client' to load
    and control this plugin.

    More information on these clients can be found at
    <iotivity>/bridging/src/mpm_client/README.

For proper documentation of this plugin, Mini Plugin
Manager, the client applications, and other plugins, please
perform a query on the "Bridging" or "Bridging Project" at
wiki.iotivity.org.
