Google-Nest Offical Device Access Console Finally Released!

If I use normal, you will want to set_preset_mode to normal, which won’t work. To leave ECO, you need to set HVAC mode to heat, cool, or heat_cool. This is why I left it as eco only as preset.

I’m not seeing preset_mode: change when nest changes to eco mode and here’s why…
I re-enabled logging in nest.py and the sdm traits from nest are not reflecting MANUAL_ECO mode when the set temperature is less than 19 and Nest is displaying a Leaf. ‘mode’ remains at 'OFF:

'sdm.devices.traits.Humidity': {'ambientHumidityPercent': 42}
'sdm.devices.traits.Connectivity': {'status': 'ONLINE'}
'sdm.devices.traits.Fan': {}
'sdm.devices.traits.ThermostatMode': {'mode': 'HEAT', 'availableModes': ['HEAT', 'OFF']}
'sdm.devices.traits.ThermostatEco': {'availableModes': ['OFF', 'MANUAL_ECO'], 'mode': 'OFF', 'heatCelsius': 15.31998, 'coolCelsius': 24.44444}
'sdm.devices.traits.ThermostatHvac': {'status': 'OFF'}
'sdm.devices.traits.Settings': {'temperatureScale': 'CELSIUS'}
'sdm.devices.traits.ThermostatTemperatureSetpoint': {'heatCelsius': 19.5}
'sdm.devices.traits.Temperature': {'ambientTemperatureCelsius': 23.26999}}
'displayName': 'Living Room'}]}

2020-11-07 00:19:25.708827 INFO nest: 
'sdm.devices.traits.Humidity': {'ambientHumidityPercent': 42}
'sdm.devices.traits.Connectivity': {'status': 'ONLINE'}
'sdm.devices.traits.Fan': {}
'sdm.devices.traits.ThermostatMode': {'mode': 'HEAT', 'availableModes': ['HEAT', 'OFF']}
'sdm.devices.traits.ThermostatEco': {'availableModes': ['OFF', 'MANUAL_ECO'], 'mode': 'OFF', 'heatCelsius': 15.31998, 'coolCelsius': 24.44444},
'sdm.devices.traits.ThermostatHvac': {'status': 'OFF'},
'sdm.devices.traits.Settings': {'temperatureScale': 'CELSIUS'} 
'sdm.devices.traits.ThermostatTemperatureSetpoint': {'heatCelsius': 18}
'sdm.devices.traits.Temperature': {'ambientTemperatureCelsius': 23.26999}}

I confirmed working for me, regardless if pushed into the mode from the app or from HASS.

All I can say, is make sure you are in ECO mode, seen here:


This one is in HEAT mode, but at an economical temp, hence the leaf.

Check the error logs, and let me know if you are seeing any.

ECO is a really a fall back setting that is analogous to HEATCOOL with both temps set very conservatively.

1 Like

Thanks, I had forgotten how the Nest ECO mode works. I wasn’t in ECO mode, just HEAT set to 16C which displays a leaf in Nest but it’s not ECO mode. I was hoping to have the leaf displayed in HA the same way Nest displays it…
BTW, which card are you using?

the shots with the leaf are from www.nest.com and NOT lovelace. This shot is from HASS Lovelace and use the standard Climate card. However, I have a dark theme applied.

Screen Shot 2020-11-06 at 4.40.13 PM

Getting the leaf in lovelace would be possible with some custom card work. Not something that I would tackle, but certainly feasible.

I plan to rework the code a good bit. Will post here when I do. Things got a bit mangled as I learned more about he nuances of the HASS interaction, and some clean up is merited as I plan to use the template for other API’s. Nature Remo for one, and refining the Meraki API a bit more.

1 Like

After posting I reviewed the images again and concluded that they were likely your actual thermostat.
Now that I switched on Nest ECO mode the card does in fact say Idle - Eco now.
I’ve been doing quite a bit of digging based on this post to find a more Nest-like card but struggling to get one to work…

1 Like

Not sure if this is the right place for this…I followed the instructions and now see the humidity and temp readings for my Nest in HA, however the temperature reading it says is on the Nest does not seem to match what is actually on the nest.

It’s been saying like 74.26F for the longest time on the Nest temp entity for the past 6 hours. When I look at the actual wall unit, it’s reading in the 71-72 neighbourhood.

Is there a poll interval?

No, there’s no poll interval, per se. The integration is broken still and only refreshes once at HA startup. They need a google API library update to be integrated into HA. There’s a link above somewhere to the HA bug/deficiency…

3 Likes

Ah my bad, I’ll take a look at that…just started following this thread but probably need to go back more than 50 messages… :joy: Thanks!

If you want something that works albeit slighly more involved to set up (only slightly), try nest.py running inside appdaemon. Install appdaemon via supervisor. It’s working for me now that @dbecknel and I have sorted out a couple of issues. Just click on his name and filter this thread for his messages. The first one has a link to his project.

1 Like

have setup everything on google side and can see temp sensor and humidity sensor. looking to instal the nest.py as mentioned previously . Now i am a complete newby to all this , have installed appdaemon via supervisor, do i just put the nest.py into the apps folder and modify the associated yaml file with all my details ? any help much appreciated and apologies for the really basic questions. I am running HA on qnap on VM with latest release.
this is log from appdaemon,
Add-on: AppDaemon 4
Python Apps and Dashboard using AppDaemon 4.x for Home Assistant

Add-on version: 0.3.1
You are running the latest version of this add-on.
System: HassOS 4.15 (amd64 / qemux86-64)
Home Assistant Core: 0.117.5
Home Assistant Supervisor: 2020.11.0

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] appdaemon.sh: executing…
Looking in links: https://wheels.home-assistant.io/alpine-3.12/amd64/
ERROR: Could not find a version that satisfies the requirement nest.py (from versions: 0.0.1.linux-x86_64)
ERROR: No matching distribution found for nest.py
[13:28:11] FATAL: Failed installing package nest.py
[cont-init.d] appdaemon.sh: exited 1.
[cont-finish.d] executing container finish scripts…
[cont-finish.d] 99-message.sh: executing…

            Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.

nest.py has nothing to do with the NEST integration in HASS that is being worked on, rather it is an app that runs in AppDaemon. As such you need to get AppDaemon running first. Looks like yours is not running yet.

Note that getting the refresh token needed for this to run means stepping through the Google procedures manually, either using curl or postman to make the needed calls to get it. Once you have the refresh token, put the relevant entries in your secrets.yaml file and refer to them. ALL FOUR entries are required, or nest.py will not work. I did not build error handling for this, so it will just get an exception and fail, or continue to run but produce no results.

There is a appdaemon folder in your /config. You need to setup the appdaemon.yaml file to a config that works and to your liking.

Also, you will need a token for authentication to your HASS. This is done on the profile page of the user you want the token from in HASS. Look at the “Long-Lived Access Tokens” at the bottom of the profile page.

Once it is running correctly, you should be able to connect to the dashboard server and see the hello world app running.

Then you have an apps.yaml file under “/config/apps/apps.yaml”
sample appdaemon.yaml

---
secrets: /config/secrets.yaml
appdaemon:
  latitude: <put your value here>
  longitude: <put your value here>
  elevation: 2
  time_zone: <put your value here>
  plugins:
    HASS:
      type: hass
      ha_url: http://<ip goes here>:8123
      token: !secret appdaemon_token
     
http:
  url: http://<ip goes here>:5050
admin:
api:
hadashboard:
logs:

sample apps.yaml

nest:
  module: nest
  class: NESTAPI
  nest_refresh: !secret nest_refresh
  nest_client_id: !secret nest_client_id
  nest_client_secret: !secret nest_client_secret
  nest_project_id: !secret nest_project_id

thanks mate, will step through what you have said see how i get on , once again many thanks for your help

What is the status of this kown issue now? I cannot get it clear. Do we need to install the integration again, or will this be fixed in one of the upcoming releases?

Who knows and can share his/her thoughts?

Thank you for the instructions, much more logical, but I still can not get it done. It would appear my HA has the old Nest integration and I don’t know how to delete it or replace it. I get compile errors when I try to add the project ID. Any thoughts? Thanks, Fred J .


got it running i think and only thing i cant suss out is the refresh token thing ?

https://developers.google.com/nest/device-access/get-started

I would create a 2nd Client ID, and Client secret, which looks like you will need to create another project too. This will ensure that you don’t mess with your working integration.

Follow the directions carefully, you will need curl at the command line, or use postman (application that you can install) so that you can create the correct requests.

Here is where you get the refresh token:

You will now have all 4 elements, client ID, client secret, project ID, and refresh token. Put them in your secrets file, and you are off…

I’ve abandoned the HA Nest integration (for now until it’s up to snuff & working) just to avoid any possible conflicts with my current google project and the refresh token for nest.py. The Nest integration is not needed to have nest.py working.

1 Like

Meant to tag this as reply, see my previous post.

well having troubles getting the google oauth to return anything, as i said im a complete newby so probably something stupid, it just sits there with > guessing im not typeing in correctly. The ? on curl line , do i input that ? The & after red text ? sorry i know these are basics