I recently installed a Nest thermostat at home. I can say it’s great, except for the wifi-connection which failed more than 50% of the day. This made my new shiny smart thermostat a dumb one since I couldn’t edit the schedule from my iPhone or api anymore.
After some debugging it turned out that my Telenet Homegateway was the culprit. Nest uses a longtime TCP-connection without a heartbeat to call home at certain intervals. Apparently the Telenet Homegateway is configured to free longterm (let’s say a few hours) inactive devices by removing their IPv4-DHCP lease (IPv6 isn’t affected, but Nest appears to prefer IPv4). Every now and then the thermostat will phone home and reestablish the connection which fixes the issue temporarily.
So the permanent solution? Degrading my Telenet Homegateway to a modem using the DMZ-setup and installing an my old and trusty Airport Extreme as router. In fact any router that will not disable temporarily inactive devices will fix your issue.
By using this setup the Airport Extreme complains about double natting, but that isn’t really an issue. It only checks if it has a RFC1918 IP on its WAN-interface. If it has, it warns the user for possible issues. Because the Homegateway is configured to forward all ports to the Airport Extreme in DMZ, everything will just work fine.