Google-Nest Offical Device Access Console Finally Released!

Yes, the subscriber_id in HA matches the Subscription name in Google. But the card in HA does not update when real life changes are made to the Nest (though when it first starts it gets both temperature and target temperature properly).

Is there some debugging I can do directly on the subscription to see if that is updating on the Google side? Or link something else to that?

Also, more generally, it would be very helpful to understand how these things update. When I make a change to the secrets.yaml, do I need to restart Home assistant? Do I also need to reload the integration?
And on the Google side, if I change the subscription, or the callback url. do I need to re-start the whole project?

I think the subscription is updating in response to changes in the thermostat. I made several changes in target temperature, and can see a spike in the graph, of the Unacked message count. But that is not reflected in Home Assistant.

Yes, its working but is is not refreshing every x seconds or minutes. I have read thats is normal…

I hope that’s not normal. Every other sensor in HA updates within seconds.

You are right but what is the solution ( and yes I have the correct subscription id :slight_smile:) ?

It updates nearly instantly using the event subscriber, and if that isn’t happening it is a subscriber problem. Check out the trouble shooting instructions for subscribers here https://www.home-assistant.io/integrations/nest/#troubleshooting

This is my report ( it repeats)

2020-11-28 19:26:16 DEBUG (Thread-Heartbeater) [google.cloud.pubsub_v1.subscriber._protocol.heartbeater] Sent heartbeat.
2020-11-28 19:26:17 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-11-28 19:26:17 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 6.951604 seconds.
2020-11-28 19:26:24 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-11-28 19:26:24 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 5.749934 seconds.
2020-11-28 19:26:30 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-11-28 19:26:30 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 4.825307 seconds.
2020-11-28 19:26:35 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-11-28 19:26:35 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 4.379044 seconds.
2020-11-28 19:26:39 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-11-28 19:26:39 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 1.711310 seconds.
2020-11-28 19:26:41 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-11-28 19:26:41 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 3.528541 seconds.
2020-11-28 19:26:44 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] The current deadline value is 10 seconds.
2020-11-28 19:26:44 DEBUG (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Snoozing lease management for 3.465193 seconds.
2020-11-28 19:26:46 DEBUG (Thread-Heartbeater) [google.cloud.pubsub_v1.subscriber._protocol.heartbeater] Sent heartbeat.

my last update was 24 min ago and it refreshed just after the screenshot

image

image

Who can share their graphs with me? I looks like I only get updates when humidtiy is + or - 2% and temperature is + or =- 0,5 degree (would explain the sharp decline and rise in my graphs). But is this a normal behavior of this integration? Who can tell me?

I check my subscriber id @allenporter and that meets the demanded requirements.

There isn’t a way to use the “time to warm” (do not know how it’s called in english, but is the thing that knows the time to warm up your house when you schedule a temp) function available on the nest in home assistant? Or there is a way to update the schedule via home assistant?

My updates are much less frequent than that. I only get a temperature change if I reload the integration.

I don’t think those items are published in the API.
For scheduling, just use scheduler in HA…

1 Like

Were you referring to my post?

That’s not normal. The updates happen within seconds, sometimes even before I can switch from Nest app to the HA app on my phone. See Allen’s post

@dbrunt, Hi Daniel, I’ve posted my debug report. I don’t know how to interpreted it. Are these normal values? How does your graph looks like?

Btw, when I change my temp (phone via Nest app or the Nest) then the value in HA changes within seconds. Also when I change it via HA same result, my nest responds within seconds. The only thing is the refresh rate in my graphs…

Keep up the good work guys, although not easy to set up ( especially the port numbers caused a lot rework on my side) this is a better (futureproof) solution then Badnest which worked like a charm…

1 Like

Actually my thanks were directed towards RonnieBee who told me to clear the port from the ‘External Url’ setting in the General Configuration page. The ‘instructions’ I have been following were in post 263, I had been confused by the mismatch between the callback url and allowed url in OAuth, and didn’t think to look in the settings page,
but Daniel, thank you as well for all your help. I now have the integration loading. (Still some issues with the subscriber, but that’s another thread!)

1 Like

Wow that’s nice!
But this way the thermostat start heating home at fixed time, and i already do that with the alarm on my phone and nodered. If you set a time on the nest schedule the house at that time it’s already at the temp setted (or at least nest tries to do that based on it calculation), looks like i can’t do that right now.
Since it’s a native integration i was hoping that all nest fuctions were available, maybe in the future

So I figured out why updates weren’t coming even though I had set up everything correctly. You need to initiate events for the first time manually.

Initiate events

To initiate events for the first time once the Pub/Sub subscription has been created, make a call to list your devices as a one-time trigger:

curl -X GET 'https://smartdevicemanagement.googleapis.com/v1/enterprises/project/devices' \    -H 'Content-Type: application/json' \    -H 'Authorization: Bearer token'

The subscriber sends that request on start-up to get the initial device list… Very odd that would help, and thanks for the info.

agreed, not sure if this was a unique scenario to me. For others having the same issue, two things worth checking:

  1. the api traffic data/graph
  2. history of ack and unack messages from the pub/sub

for me, both were zero indicating that the messages were not being sent. Once I did the manual initiation, things started to function normally, and I am getting regular updates, and I am seeing activity across both the points above.

@Guddu_Mony Did you follow my instructions from the post above? The Initiate Events definitely doesn’t need to be run:

Yes, I did that step as well as I followed Mulai  |  Device Access  |  Google for Developers before post #263 was updated. I kept skipping page 4 though since the bottom of page 3 references troubleshooting and I did not have anything to troubleshoot at that point so I kept skipping Next 4. Subscribe to Events…. I think I was thinking the integration would do that? Once I completed page 4 everything was working.