question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NEST - Issues with lost internet connectivity

See original GitHub issue

The problem

There are several issues within this report. First the background / timeline

The Nest thermostat is the downstairs thermostat referenced in the logs.

Event 1 - 2022-04-19 03:01:17 Home Power lost - switched over to backup generator. Home assistant / routers on UPS. So this went smoothly.
Event 2 - 2022-04-19 06:58:09 - Internet went out because the cable companies battery backup on the poles had expired.
Event 3 - 2022-04-19 23:38:07 - Power was restored to the cable company - partial internet was restored including VPN between houses.
Event 4 - To restored full internet access required a remote router reboot. Event 5 - 2022-04-20 14:49:41 - Utility Power Restored

Observations:

  1. The climate entity in Home Assistant never went unavailable and continued to show the temperature / state at Event 2. After Event 4, the climate entity did not start updating and required a home assistant restart.
  2. As expected, after Event 2, setpoint command were throwing errors.
  3. After Event 3, the setpoint command were not throwing errors ( 2022-04-20 04:54:59) and were not succeeding. It may be these were going through to Google, but since the NEST was offline they were not fully getting processed.
  4. The Nest App on my phone did show the Nest device was offline.
  5. After Event 4, the Nest API reported that the device was offline (which was correct), but never recovered.

Issues:

  1. When communication to the cloud is lost the Climate Entity should go unavailable. Showing stales data gives the impression stuff is working. We may want timeout / retries here to prevent false positives with short internet glitches.
  2. Integration did not recover when internet access was restored.
  3. Setpoints did not throw errors when they did not succeed 2022-04-20 04:54:59

Considerations:

  1. Integration re-load. There is no way to force a reload of the integration from the configuration panel. This could be a useful capability to allow reset of the integration without having to restart Home Assistant.
  2. Health Sensors. The NEST App shows what devices are online / off line. Could be useful to create binary_sensors for each device and report the status.
  3. Attributes in the climate entity to indicate the last time data was received. This way an alert could be generated if no data is received in some timeframe.

ha_3.log

What version of Home Assistant Core has the issue?

2022.3.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

NEST

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nest/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Included above

Additional information

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:34 (31 by maintainers)

github_iconTop GitHub Comments

1reaction
PeteRagercommented, Sep 18, 2022

I have the code and tests written. Hardest part was getting the tests to run, eventually used the devcontainer which worked perfectly.

I now need to do integration testing to verify it works when the thermostat is offline and goes back online, etc. I’m not able to do that until week of 26th. Once I do that I’ll generate a pull request. The fundamental change is to climate_sdm.py adding this piece of code:

    @property
    def available(self) -> bool:
        if ConnectivityTrait.NAME in self._device.traits:
            trait: ConnectivityTrait = self._device.traits[ConnectivityTrait.NAME]
            if trait.status == CONNECTIVITY_TRAIT_OFFLINE:
                return False
        return super().available
1reaction
PeteRagercommented, Jun 2, 2022

I restored power to the NEST today, within 1 minute, I started getting new data into Home Assistant. So the integration does recover from the situation. Hence, it looks like its just the detection on the device going offline that is needed.

I downloaded a new diagnostic file about 6 hours after restoration.

It still shows this, but also all the temperatures are incorrect. Is this a capture from integration startup?

            "sdm.devices.traits.Connectivity": {
              "status": "OFFLINE"
            },

nest_diagnostics_power_restore.txt

The other test I will run is what happens when I prevent the integration from having Internet, as we’d also may want it to become unavailable if the cloud is unreachable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nest thermostat is offline - Google Support
1. Reset the network · 2. Reconnect your thermostat to Wi-Fi · 3. Reconnect your thermostat to the app.
Read more >
Nest thermostat won't connect to Wi-Fi? Try these fixes first
First, reset your Nest thermostat's network settings by navigating to Settings > Reset > Network. · Next, restart the Nest thermostat itself by ......
Read more >
Nest thermostat offline? 4 ways to fix it - CNET
The first thing to try, probably not surprisingly, is turning the thermostat off, then turning it on again. To do this, press the...
Read more >
Some Nest thermostats can no longer connect to the internet ...
The issue, which began popping up on Nest forums as early as last November and racking up more than 200 responses, is known...
Read more >
Nest Keeps Going Offline – What To Do - Tech Junkie
Nest and Wi-Fi Interaction · Upgrading the Nest App · Find out If There Are Battery Issues · Restart the Thermostat · Restart...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found