Skip to main content

Simple Nest thermostat API wrapper and CLI script

Project description

Description

This is an unofficial API wrapper and CLI script for controlling the Nest® Learning Thermostat™.

Command Line Usage

nestctl [-h] [-v] [-e email] [-p password] [-l {c,f}] [--no-cache]
  (--away {on,off,toggle,get} | --get-temp {current,target,both} | --set-temp int | --show {raw,devices,structures,serials} | --describe {device,structure,serial} | --info)

actions:

--away <on,off,toggle,get>

set/get away mode

--get-temp <opt>

get current/target temperature

--set-temp <int>

set target temperature

--show <raw,devices,structures,serials>

show information

--describe <device,structure,serial>

describe item

--info

show condensed status info

optional arguments:

-h, --help

show this help message and exit

-v, --version

show program’s version number and exit

-e, --email <email>

nest.com email address

-p, --password <password>

nest.com password

-l, --scale <c,f>

temperature scale, [c]elsius/[f]ahrenheit. default f

--no-cache

dont use cache, default false

API Reference

Basic example:

from pynest import *

cache_file  = '/tmp/cache.tmp'
credentials = ('email@addr.com', 'password')

nest = PyNest(auth=credentials, cache=cache_file)

print(nest.devices)

License

Copyright © 2013 Derek Nicol
Nest® is a registered trademark of Nest Labs, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.

Project details


Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page