We have moved at community.getvera.com

Author Topic: Nest issues  (Read 21093 times)

Offline criple15

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: Nest issues
« Reply #60 on: May 21, 2014, 08:06:47 pm »
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!

Offline drewbuchman

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Nest issues
« Reply #61 on: May 26, 2014, 03:00:02 pm »
How do I edit the xml and re upload on ui 6 i cant figure it out.

Offline sgriegel

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Nest issues
« Reply #62 on: June 03, 2014, 02:44:16 pm »
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 ...

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest issues
« Reply #63 on: June 04, 2014, 04:09:07 am »
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


guest15496

  • Guest
Re: Nest issues
« Reply #64 on: June 08, 2014, 06:45:08 pm »
Is there any listing of the special characters that aren't handled correctly?

Thanks

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest issues
« Reply #65 on: June 08, 2014, 10:47:59 pm »
Is there any listing of the special characters that aren't handled correctly?

No, but the plugin uses the code from CGILua (doc: http://keplerproject.github.io/cgilua/reference.html#urlcode src: https://github.com/keplerproject/cgilua/blob/454aecd93ab9edc0eb0922163bfec92ff9c86da4/src/cgilua/urlcode.lua) and either the plugin is calling the encodetable function incorrectly ( https://github.com/watou/vera-nest-thermostat/blob/master/src/I_Nest1.xml#L379 ), or the encodetable 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: [Select]
--[[
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


watou

Offline dmitryos

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Nest issues
« Reply #66 on: June 09, 2014, 08:46:27 am »
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!

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest issues
« Reply #67 on: June 09, 2014, 09:45:49 pm »
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?

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

Offline dmitryos

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Nest issues
« Reply #68 on: June 10, 2014, 10:38:51 am »
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 :)

While I love nest I hate it...)

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest issues
« Reply #69 on: June 10, 2014, 10:57:09 am »
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 :)

While I love nest I hate it...)

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?

Offline dmitryos

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Nest issues
« Reply #70 on: June 11, 2014, 06:34:38 am »
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

Offline watou

  • Moderator
  • Hero Member
  • *****
  • Posts: 889
  • Karma: +44/-12
Re: Nest issues
« Reply #71 on: June 11, 2014, 08:17:59 am »
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?

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.

Offline dmitryos

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Nest issues
« Reply #72 on: June 25, 2014, 03:26:35 am »
Looks like now we have official Nest API today - https://developer.nest.com/documentation

Offline garrettwp

  • Master Member
  • *******
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Nest issues
« Reply #73 on: June 25, 2014, 04:58:40 am »