Nest Learning Thermostat on sale at Lowe's

I’m very glad you like the plugin, and thank you for sharing your idea on how to control an external humidifier! I have an ultrasonic humidifier in the bedroom that I might control with a simple appliance module using this information about proper indoor humidity levels vs. outdoor temps.

About having it only work in heat mode, maybe comparing the Nest’s current temperature <= (heat setpoint + 5) or similar would be a reliable-enough way of knowing you are trying to heat the house (or checking ModeStatus for HeatOn or AutoChangeOver and also check the calendar?).

I was going to ask people how they were automating using the plugin, but you have already started that off! Thanks! - watou

watou,

I was thinking a bit more about the logic that controls the operation of HUM in heat only… I forgot my furnace has 24VAC from HUM which only energized in heating (I think)… in any event, your Nest Plugin has really helped me out :slight_smile: .

[quote=“bobk, post:100, topic:171456”]

The fact that it will keep circulating cold air after it turns off the compressor probably helped a bit in the summer

I believe many modern (within last 5-10 years) HVAC units do this automatically for both heating and cooling and typically have a jumper on the mainboard to control how long the system runs the blower after turning off the compressor or the gas. You want to make sure that the sum of the internally-set time extension and the Nest-added time extension, if they end up getting added, are not so long that the blower ends up blowing wrong-temp air out.

I’ve also purchased a Nest 2G and installed the plugin - still early days but so far so good.[/quote]
Good to know! I am certainly no expert on the state of art in thermostats. :slight_smile: Please let me know if you see any odd behavior in the 0.8 version of the plugin. guessed pointed out a bad one in the 0.7 version which I believe is resolved properly in 0.8. - watou

The thermostat is just calling heat or cool based on temperature. In the case of heating, it sends 24VAC to “W” on the furnace terminal strip. The humidifier 24VAC power output (HUM) on the furnace terminal strip is energized by the furnace control board, generally only if “W” is energized by the thermostat.

Anyway, if you can write plugins you can easily understand HVAC!

I’ll keep you posted on the Nest plugin and how it behaves. Right now it’s DA BOMB :slight_smile: .

Darn it!!! My code has an error and I can’t seem to find it. >:(

I saw “return true)” and wondered about that closing “)” after true?

That was it. Not sure when I “moved” the closing parenthesis?!?

Thanks… mundane detail failure corrected, LOL.

I’ll edit my previous post now too.

NESTHUM = “urn:micasaverde-com:serviceId:HumiditySensor1”
HUM = luup.variable_get(NESTHUM, “CurrentLevel”, 95)
OUTTEMP = “urn:upnp-org:serviceId:TemperatureSensor1”
TEMP = luup.variable_get(OUTTEMP, “CurrentTemperature”, 67)
HOMEAWAY = “urn:upnp-org:serviceId:SwitchPower1”
HOME = luup.variable_get(HOMEAWAY, “Status”, 93)

if (((tonumber(HUM) < 41)
and (tonumber(TEMP) >19)
and (HOME == “1”))
or((tonumber(HUM) < 36)
and (tonumber(TEMP) >9)
and (HOME == “1”))
or((tonumber(HUM) < 26)
and (tonumber(TEMP) >0)
and (HOME == “1”))
or((tonumber(HUM) < 21)
and (tonumber(TEMP) >-11)
and (HOME == “1”))
or((tonumber(HUM) < 16)
and (tonumber(TEMP) >-21)
and (HOME == “1”)))

then return true
end
return false

I saw “return true)” and wondered about that closing “)” after true?[/quote]
Glad that was it. Here is a briefer way of expressing the same thing:

[code]NESTHUM = “urn:micasaverde-com:serviceId:HumiditySensor1”
OUTTEMP = “urn:upnp-org:serviceId:TemperatureSensor1”
HOMEAWAY = “urn:upnp-org:serviceId:SwitchPower1”
HUM = tonumber(luup.variable_get(NESTHUM, “CurrentLevel”, 95))
TEMP = tonumber(luup.variable_get(OUTTEMP, “CurrentTemperature”, 67))
HOME = (luup.variable_get(HOMEAWAY, “Status”, 93) == “1”)

return (HOME and (((HUM < 41) and (TEMP > 19)) or ((HUM < 36) and (TEMP > 9)) or ((HUM < 26) and (TEMP > 0)) or ((HUM < 16) and (TEMP > -21))))
[/code]

I saw “return true)” and wondered about that closing “)” after true?[/quote]
Glad that was it. Here is a briefer way of expressing the same thing:

[code]NESTHUM = “urn:micasaverde-com:serviceId:HumiditySensor1”
OUTTEMP = “urn:upnp-org:serviceId:TemperatureSensor1”
HOMEAWAY = “urn:upnp-org:serviceId:SwitchPower1”
HUM = tonumber(luup.variable_get(NESTHUM, “CurrentLevel”, 95))
TEMP = tonumber(luup.variable_get(OUTTEMP, “CurrentTemperature”, 67))
HOME = (luup.variable_get(HOMEAWAY, “Status”, 93) == “1”)

return HOME and (((HUM < 41) and (TEMP > 19)) or ((HUM < 36) and (TEMP > 9)) or ((HUM < 26) and (TEMP > 0)) or ((HUM < 16) and (TEMP > -21)))
[/code][/quote]

Much more elegant than the mess I wrote! Thanks for exposing my newbie-ness as well as helping me get better at the code writing! :slight_smile: .

I just now added some parens around the return expression; I think they’re needed. Duh. I am also new to Lua – I bought the “Programming in Lua” book before trying to write the plugin. After that experience I can say that I think Lua is a really neat little scripting language that is powerful and (mostly) really well designed.

Great work on the Nest plugin!

I have been wanting to buy a Nest since the 1st gen came out, but refused until it was supported by Vera. Looks like you beat them to it!

I finally went out and got a 2nd gen unit a couple of days ago, and the plugin works great. Very good work.

Here is one thought: Is there a way that you can add an indication if the Nest hasn’t checked in recently? Unfortunately for me, the Nest isn’t compatible with my high end Cradlepoint router, and its wifi connection times out periodically. Vera’s interface doesn’t currently indicate that it is displaying stale data, which could cause problems if monitoring and controlling the Nest remotely.

I don’t think the Nest people (being of an Apple mindset) have any intent of developing a plugin! Luck for us there are some great minds on here!!!

I never expected NEST to create a Vera plugin. I DID expect Micasaverde to create a plugin. :slight_smile:

Me too!!! The Plugin is working great too. Looks like I’ll have my Nest 1 controlling my humidifier tomorrow once my LFM-20 arrives.

You make an excellent point, and I will change the plugin to at least make it possible to reliably automate a notification if data from the thermostat has not been updated recently (where “recently” is up to the person writing the automation). Since Nest’s UIs will give you a big question mark and say it last heard from the thermostat X minutes ago, it is fair that the same warning information ought to be possible in Vera.

My preference is to use the [tt]urn:micasaverde-com:serviceId:HaDevice1[/tt] variable [tt]LastUpdate[/tt] to hold the timestamp as nest.com reports it – which isn’t based on the same clock as the Vera, but is set from an NTP server so it ought to have a skew that is smaller than the number of minutes that would be considered stale data. But I will have to do some research on whether this is a sufficient solution. Please, anyone, let me know if there is a more elegant approach you can think of.

[Note that this is separate from the issue of connectivity from your Vera to nest.com – the “account” device that is created on plugin installation has a “status” variable that goes to “0” when the plugin detects any comm failure from your Vera to nest.com (but which can take up to a full polling cycle to report). This “status” variable also makes the big “n” on the account device go from green to grey.]

And thanks for the kudos – I really appreciate it! I also accept tips! ;D

watou

Sounds like your Vera loses connectivity when the router “times out”. If so, you may be able to use the “Ping Sensor” plugin along with a z-wave duplex outlet to power your router. If Vera doesn’t successfully ping the router, she can hard reboot by killing power for a few seconds. That’s what I did because my FIOS router has a nasty habit of locking up. I caught it in the act last night, but Vera did her thing and I never had to go down to mess with the router (in my basement).

Just a thought.

The incompatibility with my Cradlepoint router has something to do with the way the Nest communicates with the router. The way it was explained to me, the Nest runs off of battery power for the most part, charging its battery via the wiring to the HVAC system. Because of that, it needs to suspend its wifi connection periodically to save battery power. Some routers (mine included) apparently do not allow it to suspend the wifi connection in the way it desires. This causes unnecessary drain on the internal battery. Eventually, as the Nest determines that it cannot suspend its connection as desired, it disconnects from the router completely, and displays an error message on its screen.

Apparently, this is a very common problem for the Nest. They have a web page set up that lists known incompatible routers. Mine wasn’t on the list, because I run a business class router. It’s not normally used in a residential setting, so they hadn’t come across it yet. Here is Nest’s web page that describes the issue: http://support.nest.com/article/Some-Wi-Fi-routers-can-cause-Nest-to-restart-frequently-or-unexpectedly
Here is my router, in case you are curious :slight_smile: http://www.cradlepoint.com/products/branch-office-retail-pos/mbr1400-mission-critical-broadband-router

Not to suggest that your feature request isn’t worthwhile, but is connecting up another known-compatible wifi router and SSID just for the use of Nest an option? MAC filtering to include just the Nest, etc.

[quote=“TheGadgetGuy, post:117, topic:171456”]Here is Nest’s web page that describes the issue: http://support.nest.com/article/Some-Wi-Fi-routers-can-cause-Nest-to-restart-frequently-or-unexpectedly
Here is my router, in case you are curious :slight_smile: http://www.cradlepoint.com/products/branch-office-retail-pos/mbr1400-mission-critical-broadband-router[/quote]

I considered getting one of those Cradlepoint routers; they look pretty interesting for an automated failover to 3g/4g and other things.

But I think you might want to consider adding a second wi-fi AP*, or replacing the Cradlepoint, or replacing the Nest. It looks like your current Nest setup is liable to give you headaches for the foreseeable future.

*I’ve used my Nest with the Vera 3 and Apple Time Machine routers with no issues, if that helps.

The purpose of a Cradlepoint router is the automatic fallback. It is designed for mission critical business applications. Think of it like a UPS battery backup for your internet connection. It can even load balance two WAN connections if you need extra bandwidth. I have an AT&T LTE modem with a static public IP address connected to it for our backup connection. I highly recommend Cradlepoint for any application where you need a good solid connection 24/7.

In my case, the solution to the router incompatibility issue is this. It was ordered last week:

http://www.ampedwireless.com/products/ap20000g.html

Regarding the “feature request” for the Nest plugin: This has nothing to do with folks having incompatible routers. That was not the point. The point is, Vera is going to only indicate the last information it receives from Nest’s server. The Nest solution is inherently less reliable because there are multiple points of failure. Thus the need to know how stale the data being presented is.

With Z-wave thermostats, there is a greater reliability factor because Vera is pinging the T-stat directly. If Vera can’t directly change the temperature of a Z-wave T-stat, it tells you.

Don’t get me wrong. I find the Nest to be a really cool device, and so far, it has been a pretty fun gadget to play with. In my line of work, the devil is in the details. If I am being presented information that is not “real time”, I’d like to know that.

Watou made a great plugin for the Nest, and I think we are all greatly benefiting from his efforts. Keep up the good work!! Thanks to your plugin, I’ll soon be buying a couple more Nests for other zones in my house.