

Nest is launching an API - jamest
https://nest.com/developer/

======
nostromo
App idea for someone: make a simple alarm.

I have a few Nest devices, and they all do motion detection. If I'm away for a
few days, I'd love an alert if my Nests detect someone in the house. It could
alert me to check a security camera, and then to call the police.

It could do fancy stuff, like only alert me if I'm not at home by checking my
phone's location. Or perhaps you could set off the fire alarm to try and ward
off intruders.

I imagine alarm systems are on Nest's roadmap. I'd be worried if I was ADT.

~~~
vicaya
Nest is reinventing home automation badly, IMO.

You can already do all that and more with plethora of Z-Wave devices with
Vera* without any external services.

~~~
dangrossman
One z-wave motion sensor and the cheapest Vera hub would cost $200-250.
Getting more out of the Nest he already owns costs $0.

~~~
vicaya
A motion/temperature sensor from Monoprice: $30.

A VeraLite-G (eBay make an offer): $135.

A Z-Wave thermostat (2-gig CT100 that can display humidity on the main
display): $80 (I got a couple for $62 on sale)

No dependency on Google to control your home: priceless.

Disclosure: I use MasterCard sometimes.

~~~
watty
Are you trying to say that those parts are equivalent to a Nest? That's like
saying some wheels, an engine, 4 doors == BMW.

~~~
joezydeco
He's saying it's functionally equivalent. engine + 4 doors + wheels = working
car.

I owned a BMW once and you literally could not tinker with the car yourself.
The engine was a sealed black box. Kind of like the Nest.

------
matthew-wegner
Obligatory link to a Python script you can use today:
[https://github.com/smbaker/pynest](https://github.com/smbaker/pynest)

I use this to turn my Nest's away mode on and off when my iPhone leaves my
home wifi (I live alone, and in Phoenix, so this helps my power bill quite a
bit).

~~~
rdeboo
May I ask how you detect that your iPhone leaves the wifi network?

~~~
matthew-wegner
I just ping it continuously. If it doesn't respond inside of some threshold--I
think 5 minutes?--I assume I'm out of the house. On battery, the iPhone checks
wifi pretty regularly, and actually holds a wifi connection when plugged in.

------
dangrossman
This page has been up for a few months I think. Nest has always had an API,
it's just been unofficial. There's plugins to hook it into all the major home
automation hubs/systems, and open source packages for integrating it into your
own code. I used it to make mine voice controlled and to put this together on
a touchscreen --
[http://i.imgur.com/C9yNLkP.jpg](http://i.imgur.com/C9yNLkP.jpg)

~~~
patrickk
That looks amazing. Would you mind sharing any links you have on how to get
started? How did you accomplish the voice control?

------
vicaya
I personally will never buy a Nest or any home automation devices that
_require_ any external service(s) to control and function.

OTOH, I'm probably not part of the target market, as I'm perfectly happy
futzing around with Vera* and VLAN/VPN/SSH tunnels.

~~~
mrb
Nest does _not_ require Internet connectivity. It is optional.
[http://support.nest.com/article/Do-I-need-Wi-Fi-to-use-
Nest](http://support.nest.com/article/Do-I-need-Wi-Fi-to-use-Nest)

~~~
vicaya
If you actually read the link you mentioned, Internet connectivity to Nest
(Google) service _is_ required to make any changes (control) remotely. Why
would people buy a $250 to use as a regular thermostat?

I'm not opposed to Internet connectivity per se but the external
(Nest/Firebase/Google) services requirement for remotely controlling and/or
automation of the devices.

The only appeal of Nest to a hacker is its industrial design, IMO. Apparently
its UX is not that great (humidity display fail) either, while an $80 z-wave
thermostat is much more usable/flexible.

~~~
blueskin_
>Why would people buy a $250 to use as a regular thermostat?

I guess, because the learning feature is still nice.

Myself, I wanted a Nest up until google bought them... no way I'm giving them
sensors in my home.

~~~
TheCraiggers
>Myself, I wanted a Nest up until google bought them... no way I'm giving them
sensors in my home.

Do you have a smartphone that has anything made by Google installed on it? If
so, they already have lots of sensors in your home. Some of which they haven't
tapped into yet, some they have.

If not, do you ever use any of their services from home? What about all the
sites that use Google Analytics? Even with just that, they know where you live
and could easily compile a set of times you're at home, which is just about
the only thing that Nest data gives them. (I personally don't view the
humidity at my home that revealing, privacy-wise.)

I want to stress that I'm not trying to antagonize you or belittle your
stance- I feel privacy is very important, and it makes me happy when others
feel the same. I'm just trying to show you that unless you've taken (what some
would say) extraordinary measures, Google already knows more about you than
what Nest is going to give them.

~~~
blueskin_
I don't run all the spyware services like Google Now, and use CM with Privacy
Guard (considering moving over to XPrivacy though). I block ads and scripts
such as GA.

There's a gap between "not using the internet" and "not at home", which can't
be gained from GA, but can from a motion/temperature sensor.

The truth is, I do consider the measures I take to protect my privacy as
being, while not extraordinary in the common sense, certainly more than
perhaps 96-98% of people. There is a tradeoff between privacy and
functionality in many things, but a hacker can always take what they need from
the anti-privacy side while maintaining far more privacy than other people.

------
zippergz
This was announced in September: [https://nest.com/blog/2013/09/25/calling-
all-developers/](https://nest.com/blog/2013/09/25/calling-all-developers/)

When that happened, I immediately filled out the form asking for more
information. And I have heard not a single peep since then. I've actually been
assuming that since the Google acquisition, this project may have been
shelved. Is there actually a sign of life? The submitted link doesn't seem to
have any new information.

------
johns
Interesting that they choose the Firebase protocol.

~~~
feralmoan
Definitely a lot of overhead keeping sockets alive for this when deltas must
be few+far between. Wonder why they eschewed mqtt or rest... ? I imagine a lot
of integrators are going WTF to a Firebase approach for a thermostat.

------
userbinator
Let's hope their security is good... or we may see headlines like this in the
future:

"Hackers gain control of networked thermostats, thousands hospitalised and
injured"

~~~
thirsteh
I may be cynical, but I think we're only just now entering a world of hurt
where home automation system providers learn about information security the
hard way.

Also, pretty funny:
[http://i.imgur.com/ouoxxoZ.png](http://i.imgur.com/ouoxxoZ.png)

~~~
rossng
Nest, being owned by Google, probably have the best chance of running a secure
infrastructure.

The other companies involved in home automation? Not so much. The kit will
probably be about as secure as most SCADA systems - and that's going to have
some serious consequences one day.

------
granttimmerman
Top of hackernews:

* How not to write an API

* Nest is launching an API

Kidding aside, I'm excited to see interesting uses of Nest's API in the near
future.

------
AaronBBrown
I went with ecobee thermostats (ecobee.com) because it already has a rich API.
It doesn't have motion detection like Nest, but it does have a very useful web
interface and a decent app for iPhone and Android. Since I work from home and
have a stay at home wife with two young children, the motion detection was not
a selling point for me. I wanted something a bit more Cisco router and less
Apple Airport Extreme. I've been very happy with the 3 that I have in my
house. My only complaint (and this is true of all connected thermostats) is
that it relies on the company's infrastructure. If ecobee goes out of
business, I lose much of the utility of the devices, though they don't turn
into bricks.

------
benbojangles
It's because the DIY hobbyist is catching up:
[http://dalybulge.blogspot.co.uk/](http://dalybulge.blogspot.co.uk/)

------
outside1234
Shameless plug: I'm building an open platform to enable you to build amazing
devices without Google in the middle. If you are interested, you can learn
more about it at nitrogen.io or
[https://github.com/nitrogenjs/service](https://github.com/nitrogenjs/service)

~~~
sprobertson
Nice work. I've been hacking something similar together to get my Raspberry
Pis talking, but this seems much more cohesive.

Copy advice: ditch the superlatives in the introduction ("amazing devices") to
make some room for a more pithy description.

------
NPC82
My roommate bought a Nest about 6 months ago and I haven't seen any real
potential or usefulness out of it. It doesn't actually add functionality to my
HVAC system, just more ways to complete what simple function my old thermostat
could do -- with more points of failure.

------
panacea
No thanks. Promising company sold out to Google.

------
sirkneeland
Know that I went out for a run (fusion of location and biometrics data). Turn
the a/c on before I get back. Handy.

~~~
danmatan
Yep, this is the kind of thing I want too. A few scenarios (assuming that one
person is living in a particular place):

I want the thermostat (with knowledge of outside temperature and winds) to
know that my HVAC can increase the temperature by, say, 1C every 30 minutes.

Based on what it knows about my location and biometrics, it can drop to the
minimum to prevent the pipes from freezing or other problems when I'm gone,
and know when my classes/work ends and commute time to turn on the system at
just the right time to be pleasant for my arrival. Maybe detect/realize that
I'm in a, or will be in a, traffic jam, and hold off accordingly.

Integrate it with my alarm clock to cool the bedroom by a few C overnight, but
warm the place up so I'm not chilled when I get out from under the blankets.

Detect that I've gotten out of bed in the middle of the night, and start
blasting heat into the bathroom.

~~~
vicaya
Trivial and cheaper (for more thermostats/sensors) to do with $80 z-wave
thermostats and one Vera* controller with no external service dependency.

Nest is $250 each. Ouch.

~~~
dangrossman
The dozens of hours of programming involved in replicating what Nest does to
address his desires would not be "trivial and cheap". Your suggested
substitute does not learn the heating/cooling efficiency curves of your HVAC
system, does not automatically change the temperature when you go to sleep and
before you wake on an adaptive schedule just by (re-)training it a few times,
and does not turn on the heat when it detects motion. Even manual scheduling
doesn't replicate what Nest does for you there; since Nest learns the
efficiency of your system, it can calculate the number of minutes it must run
to produce the desired temperature change, and turn on the system at the exact
right time _before_ you wake up to reach that temperature on time.

Nest can do all that out of the box, and it doesn't cost $250 for a new one on
eBay, where you're quoting the rest of your prices from. They're $185-200
there BIN, and regularly on Amazon from the Amazon Warehouse Deals seller,
which makes your z-wave stuff the "ouch" purchase. Whatever your opinion on
having the API hosted externally, the product itself has some smart stuff
built in. Looks pretty snazzy too.

For the record, I have a VeraLite and some z-wave stuff too. I'm not a huge
fan. I don't care that Google hosts the API for my thermostat. I do care that
if I'm standing outside my front door and want to open the deadbolt over
z-wave, it takes 15-30 seconds, with a 50% success rate of the command getting
through at all.

~~~
vicaya
I was partially being facetious. This article is about a Rube Goldberg-esque
API and this site is about hackers. I'm just pointing out that it can be done
cheaply with better flexibility and precision by hackers like me. I'm one of
those people who find the Nest algorithm frustrating and want to tinker with
it (with more properly placed sensors etc). It's not really rocket science for
people who understand the basics of control theory.

BTW, what does a deadbolt have anything to do with your Nest/HVAC system? Do
you want to depend on Google to open/close your locks as well? It's _not_
normal to take 15-30 seconds to open a Z-wave deadbolt remotely (it's
immediate if you use the lock keypad) with 50% of success rate: something
(probably the security C/R exchanges) is timing out: the default timeout is 20
seconds. For me, it was 100% (knocking on wood:) with a few seconds latency
for the times I tried, executing a night arrival scene from a phone in a car,
which turned on path/door lights and unlocked the door, because I'd have
groceries/takeouts in my both hands.

I'd tend to agree that Z-Wave devices and a Vera* controller is probably too
much for non-tinkerers to handle in the current state, because average people
can't even handle a wifi printer :). There are people who use Nest as a basic
thermostat, i.e., for the looks only.

The main motivation for me to squawk on this topic is that I don't like the
_trend_ of external services (nothing against Google per se :) owning my data
and now control of my home.

We (hackers/tinkerers) can do better and demand a choice.

~~~
dangrossman
> something (probably the security C/R exchanges) is timing out

Yes, something's definitely timing out. If I watch the Vera UI after sending
the command, it times out and retries several times before giving up. Yet
other times it works, but usually only after at least one retry. The hub isn't
too far from the door, and there's no walls in-between. The unreliability of
z-wave stuff is my biggest problem with it.

The Nest responds pretty much instantly to commands despite them having to go
out to the internet then back. The unofficial APIs provide access to
everything the device and its web/mobile apps can do. Same with my Belkin WeMo
switches and sensors -- you're probably not a fan of WeMo either, but I'm a
fan of them responding instantly and speaking UPnP.

The divide between these products isn't really about "tinkerers vs non-
tinkerers". If that was it, Nest/WeMo/etc would win over the monoprice z-wave
stuff any day. They're much easier to hack with (no extra hardware required,
HTTP APIs, open source libraries readily available) and typically do a lot
more than the generic single-function devices.

The divide you've set up is around privacy and external dependency. The
tradeoffs there aren't the same, and not everyone's going to agree with you on
that either, even hackers with full knowledge. I don't necessarily think self-
hosted and self-supported APIs are a better future. That's a future that would
limit a lot of the cool stuff you can do with these devices to us, instead of
making it available to everyone. Most of the coolest stuff in our homes today
already relies on entrusting a certain amount of control and information to
3rd parties, from your electric company, to your ISP, to the makers of all the
set-top boxes connected to your TV, to the phone in your pocket. All of these
things involve giving up tons of data and control of your home.

I have no problem with "smart thing" makers hosting APIs so long as they
remain trustworthy with that data, and reliable, which is not a huge ask. I'm
a lot more confident Google can run Nest's API reliably and securely than Vera
staying in business and keeping its P.O.S. MiOS functioning.

~~~
vicaya
Well, locks are special beasts due to the security command class, which
requires extra challenge/response round trips. My VeraLite-G (the cheap $135
one) is more than 50ft and a couple of dry walls away from the door and the
overall latency is consistently around 1.4 seconds measured, while sending
commands to the thermostats takes less than 0.2 seconds. It feels instant
enough for me. The commands to the lock is routed through my thermostats and
appliance module. I'm actually pleasantly surprised with how well the Z-wave
mesh network worked. I need two Wifi APs to cover my house, if it were not for
the second AP, the wifi signal at the door would be too weak to function
reliably.

OTOH, I'm too somewhat disappointed at the quality, security and the
development of the MiOS, but we as hackers can at least do something about it.

