Nest Thermostat Motion Detection

Tags: #<Tag:0x00007f616cf36cc0>


Has anyone been able to find a way to use the Nest motion detection in OH? I’d like to use it as part of my presence detection as it is right next to the front door and you have to walk past it to come in the house but I can’t find any documentation to it on here???

Thanks in advance

EDIT - I’ve just seen a separate thing called Nest Home / Away which is a separate thing from the Thermostat thing. I’ve found a channel hidden in there called ‘away’ so I guess I can use that to determine the Home/Away state in a round about way, ie if Away = OFF then it must be Home!

How did you identify the hidden channel? I was actually just wondering about this last night while looking in the settings for my Nest Protect.

Have you had any luck incorporating the Home/Away channel into your rules?

I suppose hidden isn’t quite the right term, more, very hard to find and not obviously until you find it!

I just happened to be trawling through my list of things on Paper UI and scrolled past my Nest Thermostat thing and before it in the list was a thing called Nest Home/Away which when I went into it said it was:

Nest Structure

The Nest structure defines the house the account has setup on Nest. You will only have more than one structure if you have more than one house

Don’t remember adding or creating it but it was online. I clicked into it but had no Channels (possibly why I hadn’t remembered it), I clicked on ‘Show More’ just on the off chance that something would appear and sure enough 6 different channels appeared, and there is one called ‘Away’

I’ve added an item and linked it to the Away Channel and then added it to my Basic UI. Initially nothing happened but once the Nest state changed manually it appeared. Seems the options are Home or Away, which is exactly what I wanted.

I haven’t used it in anger in a rule yet but will probably be coding something this weekend, now I can see it has populated itself with a value…

Cool. I haven’t added my Nest Protect yet, so I’m not sure what’s available for channels. It has a feature called Pathlight that turns on the light when it detects motion at night, and I wonder if that will also show up.

Just had a play and it does what I said earlier, which is good. The only thing is that the sates are HOME or AWAY so for what I needed it for I had to transform these into ON or OFF states…so here’s how I did it, any recommendations / adaptations welcomed

String GF_HW_TS_Away    "Nest Home / Away"   <fire>   { channel="nest:structure:NestAccount:my_nest_code:away" }
Switch vGF_HW_TS_Away   "Nest Home / Away Variable"   (gMotion)
rule "Change Nest Home / Away to ON / OFF"
    Item GF_HW_TS_Away changed
    if(GF_HW_TS_Away.state == "HOME")
        vGF_HW_TS_Away.sendCommand(ON) // set Home / Away variable to ON
        logInfo(logName, "Home / Away - ON")
        Thread::sleep(5000) // mimic Motion Sensor - stay on for 5 seconds
        vGF_HW_TS_Away.sendCommand(OFF) // set Home / Away variable back to OFF
        logInfo(logName, "Home / Away - ON to OFF")
        vGF_HW_TS_Away.sendCommand(OFF) // set Home / Away variable to OFF
        logInfo(logName, "Home / Away - OFF")

So for me I wanted it that when it returns to HOME, ie it detects motion when it is set to away, so I set that to be the ON state…

Looks straightforward to me. I think the only problem is that the Nest is going to stay in Home mode as long as it thinks you’re home, which means that it won’t trigger every time you walk by it. At least, that’s what I’m interpreting from the website.

Even better would be if we could isolate actual motion sensor as a channel, but I’m doubtful that will be available. They’d rather sell you a Nest Cam.

The Nest Thermostat has IFTTT actions for Home and Away, but the Nest Protect doesn’t. So, I suspect I’m not going to have access to the Home/Away function.


Yes, that’s how I understand it as well. This works for me as I’m only trying to use it as a motion sensor if no one is home, ie we have a potential intruder, so the Nest would be set to Away anyway with no one home.

I agree it’s a shame we can isolate the movement channel but, as you say, I’m sure Nest can monetise that elsewhere.

Actually, it looks like the Away binding comes from the Nest account (“Structure”), in which case maybe I will have access to it.

Something else to play with this weekend!