home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.41k stars 30.3k forks source link

Google Nest - Setting temperature turns Thermostat off #82552

Closed duncan9562 closed 1 year ago

duncan9562 commented 1 year ago

The problem

Hi guys,

I've been using the Nest integration for some time with no issues.

Back in October I went through the OAuth re-authentication and since then the Thermostat shows in Home Assistant but, when I set the temperature in the UI from 9oC to 10oC or any other modification, the thermostat completely turns off (heat mode is set to off in HA and the Nest app).

I have enabled logging and I can see the API call going out to Google, but then I can see the state gets updated to the Thermostat being 'off' and I cannot figure out why.

Request sent to Google to change temperature to 10oC:

2022-11-22 22:12:21.115 DEBUG (MainThread) [google_nest_sdm.auth] request[post]=https://smartdevicemanagement.googleapis.com/v1/enterprises/***executeCommand
2022-11-22 22:12:21.116 DEBUG (MainThread) [google_nest_sdm.auth] request[post json]={'command': 'sdm.devices.commands.ThermostatTemperatureSetpoint.SetHeat', 'params': {'heatCelsius': 10.0}}

Response that comes back from Google:

2022-11-22 22:12:25.245 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Processing 1 received message(s), currently on hold 0 (bytes 0).
2022-11-22 22:12:25.282 DEBUG (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Released held message, scheduling callback for it, still on hold 0 (bytes 0).
2022-11-22 22:12:25.288 DEBUG (MainThread) [google_nest_sdm.event] EventMessage raw_data={'eventId': '***', 'timestamp': '2022-11-22T22:12:22.788Z', 'resourceUpdate': {'name': 'enterprises/***', 'traits': {'sdm.devices.traits.ThermostatMode': {'mode': 'OFF', 'availableModes': ['HEAT', 'OFF']}, 'sdm.devices.traits.ThermostatEco': {'availableModes': ['OFF', 'MANUAL_ECO'], 'mode': 'OFF', 'heatCelsius': 9.00972, 'coolCelsius': 24.44444}, 'sdm.devices.traits.ThermostatTemperatureSetpoint': {}}}, 'userId': '***', 'resourceGroup': ['enterprises/***']}

The state history for the Nest device also shows:

Turned off triggered by service climate.set_temperature

I have been through 4 new projects with Google, updates to HA and everything I can think of.

I have spoken to Google via their support team and they stated that the Nest App was working fine and had no idea what an API was, so chances are I wasn't talking to the right person! If this needs their input could you please point me in the direction of how to contact them :)

Really appreciate your efforts with this and thank you in advance!

What version of Home Assistant Core has the issue?

Home Assistant 2022.11.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Nest

Link to integration documentation on our website

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

Diagnostics information

config_entry-nest-8c5e5e0dff7e756bccede840da184d68.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration (nest) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `nest` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign nest` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


nest documentation nest source (message by IssueLinks)

allenporter commented 1 year ago

The command to the server seems correct to me (and you seem to also agree) so this is pretty clearly a bug on the nest API side. I have a way to contact the nest API team to report issues like this, though they are a little hard to investigate given I don't have a way to give them your personal information unless I can reproduce it myself.

progrmr commented 1 year ago

I've noticed the same problem with my Nest thermostat. An automation that attempts to adjust temperature, instead it turns the HVAC mode to OFF. The automation was only setting a new temperature, not changing HVAC mode. I tried various changes (temp or mode) from the device info panel and discovered that I can manually change HVAC mode from there but any temperature adjustment changes the mode to OFF. I can gather more data or logs if that might help.


Turned off triggered by service climate.set_temperature
21:23:11 - 29 seconds ago - Gary Morris
allenporter commented 1 year ago

It's interesting that home assistant says there was a Turned off triggered by service climate.set_temperature which implies to me it was in fact a command to turn it off and not an API bug. Do you also have similar request capturing the API calls? (Turning on debugging for google_nest_sdm.auth and google_nest_sdm.event will give us a trace like the original)

progrmr commented 1 year ago

I just noticed this morning that the Alexa Skill has the same bug. I have an Echo Dot and via Alexa app it is setup with the Google Nest Skill (not going through HA at all). When I asked Alexa to change the temperature this morning, the HVAC mode changed to OFF. I was able to set temperature using the Nest app, so that still works at least.

duncan9562 commented 1 year ago

Thanks for the replies on this and apologies for not responding sooner!

I've also just replicated the issue in the Alex App - thanks @progrmr for pointing that out.

Seems that this isn't Home Assistant that's at fault, but @allenporter would this be enough for you to report this to Google? Sounds like it could be affecting quite a few users, not just Home Assistant!

Thanks again 😄

allenporter commented 1 year ago

Can you elaborate on the Alexa app thing? You're saying Alexa is also integrated with sdm and sees the same behavior?

progrmr commented 1 year ago

Can you elaborate on the Alexa app thing? You're saying Alexa is also integrated with sdm and sees the same behavior?

sdm? The problem is with the Alexa app with the Google Nest Skill enabled. Asking Alexa to change the thermostat's temperature setting incorrectly changes the HVAC mode to off.

allenporter commented 1 year ago

Did both of you already have Alexa app integrated?

Since I'm not able to reproduce this myself it's a bit odd for me to report so I'm wondering if having Alexa enabled is part of the puzzle.

duncan9562 commented 1 year ago

I didn't have the Alexa skill enabled when I first noticed the problem.

Apologies, I should have asked if there was a way to report this to Google as it's affecting Alexa and Home Assistant so definitely doesn't sound like an HA issue. I have tried with their support team but got nowhere 😢

Wilco89 commented 1 year ago

@allenporter this problem is here for a month now. Already did post this problem few weeks back, and yeah still no solutions for this problem, when I change temperature the thermostat is set to off.

Here:

80565

allenporter commented 1 year ago

Sure, the original issue was nest was down. The second issue is the one here about turning off.

But just to be clear neither of these are home assistant bugs, so I just want to set your expectations about my ability to help you.

Arie046 commented 1 year ago

Same issue here for a few months now. Setup the whole integration again, but no solution.

Wilco89 commented 1 year ago

Sure, the original issue was nest was down. The second issue is the one here about turning off.

But just to be clear neither of these are home assistant bugs, so I just want to set your expectations about my ability to help you.

It's maybe not related to HA, but how can we all help you/get Google to work on it again. It's winter here. And we all want to automate instead of do it manually every single day.

markkeny commented 1 year ago

The only way I have got this to "work", ie have the heating come on (as it is winter) is to diable the integration in Home Assistant and then Nest works as it should. Anything I can do to help to get this working again, then please do let me know.

duncan9562 commented 1 year ago

I've tried to speak to Google Nest support about this and the solutions they have come up with are:

I've offered to send them logs (as above) from HA showing the request for temperature increase and the response back but they just tell me "This is Google support - we can't help with adding Alexa skills".

It's maybe not related to HA, but how can we all help you/get Google to work on it again. It's winter here. And we all want to automate instead of do it manually every single day.

My thoughts exactly. Completely appreciate this is not an HA issue but if anyone has a decent contact / contact method I'm happy to raise it that way!!

Wilco89 commented 1 year ago

I've tried to speak to Google Nest support about this and the solutions they have come up with are:

  • disable the integrations
  • offer me docs on how to add the Alexa skill

I've offered to send them logs (as above) from HA showing the request for temperature increase and the response back but they just tell me "This is Google support - we can't help with adding Alexa skills".

It's maybe not related to HA, but how can we all help you/get Google to work on it again. It's winter here. And we all want to automate instead of do it manually every single day.

My thoughts exactly. Completely appreciate this is not an HA issue but if anyone has a decent contact / contact method I'm happy to raise it that way!!

Can't @balloob try to contact them? And look how we can fix such an expensive device working with HA again?

For now im using switch off an on as a solution, but then I don't have a minimum temperature. I hope the winter won't be any colder😅

allenporter commented 1 year ago

yeah, I have contacts on the team. As i mentioned above, the challenge i have is that i can't reproduce the issue myself. I need a way to give the nest team your personal information and can escalate to the nest API team.

If you make a google doc (share by link only so i can give to the team) that contains your device information details and IDs and captures of the API responses your home assistant is sending and the pubsub API responses that would be ideal. You can share with my email address allen.porter@gmail.com -- this requires knowing how to capture debug logs etc. (This is clearly out of scope of home assistant, where we don't want your personal information!)

I'm happy to do this generally, and have done it many times in the past for nest API bugs and have seen them resolved. (I stopped engaging based on a few folks seeming to not understand this is a volunteer effort for me and having some sort of unreasonable expectations.)

progrmr commented 1 year ago

I'm trying to collect debug API info on this problem now. I've enabled debug logging and then tried to adjust temp. This is what I get in HA's .log file. I haven't time to decipher this now, but will continue working on this later today.

<snipped>
allenporter commented 1 year ago

I've updated your post to remove the data as I don't want to post your data in this issue, but instead in a private google doc shared with the team as I mentioned above. We can keep discussing over email on the thread you started.

code-to-core commented 1 year ago

I am having exactly the same issue with Alexa and with ha. Changing the temperature via either results in the heat being turned off. I have two Nest thermostats and the problem is reproducible on both. It would seem the problem is with SDM. I first noticed the issue about six weeks ago when the thermostat turned off and just found this thread. The two affected Nest thermostats are version Display-2.8 at 5.9.4-5. I have a third thermostat at a different location that works just fine, that is Display-4.8 at Software version 6.2-27. Sounds like an issue between SDM and the Nest version

allenporter commented 1 year ago

@code-to-core see my post above if you'd like to help.

(Adding information to this issue isn't really going to help anything, it needs to go to the sdm API team)

henger commented 1 year ago

I'am also having the same problem. If change the temperature on the card in HA the boiler shuts down. To add a new piece of information Nest is connected to my boiler via OpenTherm not the regular on/off way. I don't know if this is the case for the others in this topic. I'm new to HA but if some tells me what to do I'm willing to create the google docs @allenporter requested.

allenporter commented 1 year ago

@henger Thanks, i have a few users that reported their details that I was able to share with the google nest team, so probably OK for now. I'll let you know if they need more examples.

Will let you folks know if I have any updates.

henger commented 1 year ago

Did you get back any information? It's winter and my automations are not working = wife mad. Nest has to go if no solution is provided :(

progrmr commented 1 year ago

Did you get back any information? It's winter and my automations are not working = wife mad. Nest has to go if no solution is provided :(

I'm not sure what your automations do exactly, but I was able to temporarily work around it by setting up a Heat schedule on the Nest and then using the automation to turn on/off Eco mode to control the heating (instead of changing the temp). Not ideal, but it works. Eco mode allows you to have a 2nd set of target temperatures and switch to them instead of the schedule.

henger commented 1 year ago

Did you get back any information? It's winter and my automations are not working = wife mad. Nest has to go if no solution is provided :(

I'm not sure what your automations do exactly, but I was able to temporarily work around it by setting up a Heat schedule on the Nest and then using the automation to turn on/off Eco mode to control the heating (instead of changing the temp). Not ideal, but it works. Eco mode allows you to have a 2nd set of target temperatures and switch to them instead of the schedule.

Thank you for the suggestion, unfortunately it not helps in my case. I have 5 TRVs on my radiators along with 5 temp sensors and based on the individual room temps I should be able to turn on my boiler through the nest integration. @allenporter I'm I right that your new versions pushed to HA 2023.1.5 are not related to this issue?

allenporter commented 1 year ago

Correct, we believe this is not a home assistant issue. Nest engineers are having a look with the help of some volunteers who shared data examples of the issue.

japrichard commented 1 year ago

I have the same problem with my nest. Anyone found any solutions? Thanks

edhahn4444 commented 1 year ago

Add me to the list. I'm guessing no updates but started happening to me yesterday(2/15/23) Mid day

henger commented 1 year ago

Out of curiosity what is your nest learning thermostat software version and where are you located? Mine is 5.9.5-2 and I'm in Hungary. My thermostat's software never updated despite nest released many versions mine always states my software is the latest version which is not valid.

edhahn4444 commented 1 year ago

North East, USA. 6.2-27

edhahn4444 commented 1 year ago

This reddit post fixed it for me https://www.reddit.com/r/homeassistant/comments/zti807/google_nest_integration_fyi/ I added the Google Assistant SDK almost exactly a week before my issues started. I had duplicate entries in the application credentials part of Integrations. Deleting the new one then reboot and my Nest integration is working again. Not sure this will work for everyone but might be worth a try.

allenporter commented 1 year ago

@edhahn4444 that is unrelated to the issue being discussed here.

allenporter commented 1 year ago

Some of you were experiencing #88239 (outage from nest that started today, not this issue from oct/nov)

edhahn4444 commented 1 year ago

@edhahn4444 that is unrelated to the issue being discussed here.

Is it possible that it was the outage and it just happened to be resolved at the same time I deleted the credentials and then rebooted. I had the exact symptoms described above. I was receiving sensor data from the thermostat sensors and was able to change the mode but as soon as I tried to change the temperature it would turn off the thermostat. In the logbook I would receive this message " turned off triggered by service climate.set_temperature 3:19:18 PM - 17 hours ago - Eric Hahn "

satu commented 1 year ago

I had exactly the same problem and it seems like it went away on its own.

allenporter commented 1 year ago

Very interesting. I told this to the Google Nest engineers yesterday and they didn't think it was related, but it was from one user. I'll report back that multiple people say it's resolved.

Is anyone else still seeing this problem?

code-to-core commented 1 year ago

For me, the Oct/Nov issue seems totally resolved as of whatever Google did yesterday. Controlling Nest Thermostat from both HomeAssistant and Alexa working properly again.

wlinard commented 1 year ago

It's also resolved it for me. I've just been able to change the temperature through Home Assistant for the 1st time since integrating Nest.

yayitazale commented 1 year ago

Resolved for me too

progrmr commented 1 year ago

Yup, I can also confirm it now works for me both from HA and Alexa app.

progrmr commented 1 year ago

I would mark this issue as resolved but I don't have the permissions to do that in this repo.

japrichard commented 1 year ago

FIxed for me. woo hoo. Thanks google and anyone else who worked to bring this to their attention.

tsaps-byte commented 1 year ago

I am having the same issue as listed on this thread. Set temperature with app on my phone and the heating starts and then set to "off". I have read this thread and do not see how the issue was resolved. Any help is greatly appreciated. Similar to this thread, noticed the reoccurring issue back in Nov/Dec.

allenporter commented 1 year ago

I am having the same issue as listed on this thread. Set temperature with app on my phone and the heating starts and then set to "off". I have read this thread and do not see how the issue was resolved. Any help is greatly appreciated. Similar to this thread, noticed the reoccurring issue back in Nov/Dec.

Google was made aware of the issue. When I said users said it was fixed they said they were still working on it fwiw. I'm no longer tracking this with them however. There is not a home assistant bug here from everything we know.

tsaps-byte commented 1 year ago

Thank you for the clarification Allen.

Wilco89 commented 1 year ago

This bug is back, worked fine for weeks, but this morning when i woke up my house was chill, and my thermostat was on off,

and 16.5 degreess celcius, so yesterday evening 10pm it still worked, but at 6 the temp change to 21.5 did put the thermostat to off. also tested it manually but i can say its back @allenporter

I know you can't do anything about it, but the changes made by Google this night did brake it.

japrichard commented 1 year ago

This bug is also back for me since yesterday after no problems for a few weeks.

allenporter commented 1 year ago

Hi, Google has been made aware of the issue as I mentioned last week. I don't think they need any extra data, and this isn't a home assistant bug.