Nest issues

Watou, thank you!!! BTW UI 6 is official from what I was told by Vera, they are shipping all new units with it. I used your patch, but I guess because I had updated to 6 I have not gotten any of the other updates you have created. Either way from what I have seen the patch worked! Thanks!

How do I edit the xml and re upload on ui 6 i cant figure it out.

I use special characters in my password for Nest. When entering the password for my nest account it seems to cut off the password at the character following an @ symbol. ex Pass = Ch@ng3m3 would cut off at Ch@n …

There is a known issue with the plugin not handling certain special characters in passwords properly. My apologies. If possible, please change your nest.com password to work around this issue for now.

When the official API is available, this code will change completely. I appreciate your patience in the meantime.

Regards,

watou

Is there any listing of the special characters that aren’t handled correctly?

Thanks

No, but the plugin uses the code from CGILua (doc: http://keplerproject.github.io/cgilua/reference.html#urlcode src: cgilua/urlcode.lua at 454aecd93ab9edc0eb0922163bfec92ff9c86da4 · lunarmodules/cgilua · GitHub) and either the plugin is calling the encodetable function incorrectly ( vera-nest/I_Nest1.xml at master · watou/vera-nest · GitHub ), or the [tt]encodetable[/tt] function is being overly aggressive in what it encodes, which is confusing the server’s parser. I think it’s the latter. You could change your copy of I_Nest1.xml to use something simpler like below and let us know if it is reliable for all supported password characters:

[code]–[[
URL encoding (from Roberto Ierusalimschy’s book “Programming in Lua” 2nd ed.)
]]–
local function escape(s)
s = string.gsub(s, “[&=+%%%c]”, function(c) return string.format(“%%%02X”, string.byte(c)) end)
s = string.gsub(s, " ", “+”)
return s
end

local function stringify(t)
local b = {}
for k,v in pairs(t) do
b[#b + 1] = (k … “=” … escape(v))
end
return table.concat(b, “&”)
end[/code]

watou

Hi Watou,

Is there any chance to get the thermostat online status (which is visible on nest web site)? Just to be sure when I send a request to the thermostat it will be processes soon or not (later?). Does nest “api” expose this value?

Thank you,
Dmitry

PS. Thanks for the plugin a lot!

You’re very welcome, Dmitry. The thermostat device has a LastUpdate variable that is the last time (expressed as a timestamp in seconds) that the thermostat reported to nest.com. If you subtract it from the current timestamp and it exceeds some value you choose, you could say that the thermostat is not connected. I do not know how the native apps and web interface decide if a thermostat is not online; hopefully the official API will make that explicit.

Separately, the connection status between the plugin and nest.com can be learned, to a degree, from the “status” variable on the main plugin device, being either “1” for having a believed good connection, or “0” for not having a connection.

Regards,
watou

Thank you for the info, watou

Tried to monitor 2 devices today and found that even the second one had latter refresh time it was offline but first one was online. A bit weird :slight_smile:

While I love nest I hate it…)

[quote=“dmitryos, post:69, topic:180170”]Thank you for the info, watou

Tried to monitor 2 devices today and found that even the second one had latter refresh time it was offline but first one was online. A bit weird :slight_smile:

While I love nest I hate it…)[/quote]

I’ve wondered at times why my Nest was considered offline briefly, but it’s all pretty opaque. If you go to the thermostat and choose Settings → Technical Info → Wifi, do you ping and signal strength numbers look OK? I get about 200-500 ms ping time and 70% signal strength in my setup, and it’s never a problem. Any chance your wifi access point is too far from the thermostat or it’s on the same channel as a neighboring access point?

Thank you for helping me!

I checked the status and it showed initially about 2000 ms and in the evening 9 653 546 786 ms still being online in the web. I even installed a separate router with only G protocol. But still have drops occasionally.

Checked the channel. Have another one wifi on the same channel. Will change it and see if it helps.

I use asus RT-N12 router with DD-WRT firmware. Wondering which access point do you use for thermostat connection?

Thank you,
Dmitry

[quote=“dmitryos, post:71, topic:180170”]Thank you for helping me!

I checked the status and it showed initially about 2000 ms and in the evening 9 653 546 786 ms still being online in the web. I even installed a separate router with only G protocol. But still have drops occasionally.

Checked the channel. Have another one wifi on the same channel. Will change it and see if it helps.

I use asus RT-N12 router with DD-WRT firmware. Wondering which access point do you use for thermostat connection?[/quote]

I have DD-WRT here but I would suggest resolving the possible wifi channel conflict. Your ping turnaround time doesn’t sound good, but it might be due to any number of factors. The server that your thermostat talks to is dynamic and somewhere in the cloud so it’s a bit difficult to offer concrete steps to test the path.

Looks like now we have official Nest API today - https://developer.nest.com/documentation

Already discussion on this here:

http://forum.micasaverde.com/index.php/topic,10508.msg181941.html#msg181941

  • Garrett