Solution to track your google home alarms and timers and trigger different home assistant events

This is great! I’ll give it a shot and see how it goes. :smiley:

Update 2: Read up on where to place the ‘custom_components’-dir (under config), and now I see the same behaviour as islamek.

Was just testing to see if I can make it work, I got the integration called Google Home, but after clicking it the “Please wait while the integration is being installed” popup shows and just stays there.

Same issue here… I’m on the latest version of Home Assistant OS. This is what I’m seeing in the logs:

2021-02-13 21:34:11 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package grpcio-tools: ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ysur6iq4/grpcio-tools/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ysur6iq4/grpcio-tools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-yq1mef3f
         cwd: /tmp/pip-install-ysur6iq4/grpcio-tools/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-ysur6iq4/grpcio-tools/setup.py", line 151, in <module>
        if check_linker_need_libatomic():
      File "/tmp/pip-install-ysur6iq4/grpcio-tools/setup.py", line 80, in check_linker_need_libatomic
        cpp_test = subprocess.Popen([cxx, '-x', 'c++', '-std=c++11', '-'],
      File "/usr/local/lib/python3.8/subprocess.py", line 854, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/usr/local/lib/python3.8/subprocess.py", line 1702, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'c++'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.2.4; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.
2021-02-13 21:34:11 ERROR (MainThread) [aiohttp.server] Error handling request
1 Like

Hey all.
Just a little update on the progress.

Starting with the great news, the three of us, together with @DurgNomis-drol and @ArnyminerZ have joined forces to work on this together. We have pretty high ambitions on the integration, but it requires quite a bit of work before it works.

You can follow our progress or share some insights/ideas in our shared repo, however, it is still under active development. We are both refactoring and working on underlying python glocaltokens package as well as HACS integration that will enable lots of great Google Home features within Home Assistant.
If you are a developer - we would be happy you join us! :boom:

P.S. We’ll post some updates here, when there is something to play/test with.

8 Likes

Looking forward to trying this out

Hey hey :boom:

Soooo, after a few weeks of hard work, there is something finally out that can be tested and hopefully found useful :slight_smile:
Big thanks to all who contributed for putting much effort into making it work. :rocket:

Please see Google Home custom integration that implements a solution to track google home alarms and timers in a neat manner.
Also, check a UI custom card that @DurgNomis-drol has been working on to show timers in a beautiful way.

Drop a github :star: if you find it useful and please help to contribute with issues/PRs to make it even better.

Edit: If you encounter any unexpected behavior please open the corresponding issue in github

7 Likes

Wow! This is exactly what I was looking for! I have installed it trough HACS. Added the integration with an app password. But I do not see the sensors appearing in the entities. I presumed that the devices are discovered automagicly. Is there any way I can debug this on my setup? Or a possibility to add the devices manually?

Edit: Found something! In de HA core log:

2021-03-17 09:50:19 ERROR (MainThread) [custom_components.google_home] Unexpected error fetching sensor data: 'fire_time' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151, in async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 139, in _async_update_data return await self.update_method() File "/config/custom_components/google_home/api.py", line 180, in update_google_devices_information coordinator_data = await gather( File "/config/custom_components/google_home/api.py", line 150, in get_alarms_and_timers device.set_timers(resp.get(JSON_TIMER)) File "/config/custom_components/google_home/models.py", line 52, in set_timers self._timers = [ File "/config/custom_components/google_home/models.py", line 55, in <listcomp> fire_time=timer[FIRE_TIME],

Ok. The issue was that there was an active timer on one of my devices. When I have removed the timer and restarten my instance the entities showed up.

1 Like

How do you get to the Add google home device page?
I have the authentication done but no devices show up

All I’m getting is authentication failed even though I’m using the right email and app password.

This I found in my logs:

Logger: glocaltokens.client
Source: /usr/local/lib/python3.8/site-packages/glocaltokens/client.py:169
First occurred: 17:36:51 (6 occurrences)

Hey folks. Installed this last night and it worked flawlessly. Some time today the devices went to “unavailable”.

Log:
Logger: pychromecast.socket_client
Source: /usr/local/lib/python3.8/site-packages/pychromecast/socket_client.py:658 
First occurred: 3:20:23 (3 occurrences) 
Last logged: 13:34:36

[Bedroom Mini - HomeMink(192.168.xx.xx):xxxx] Heartbeat timeout, resetting connection

Edit.
Sorry I’m an idiot. I hadn’t verified the email link confirming the app password. Normal service has resumed.

@gijsje @nckslater

Please try this integration instead. I believe that @ArnyminerZ integration does not work any more because of some underlying changes, but i am not sure.

We will soon push a new release that should contain a lot of bug fixes. Until then when install through HACS, please choose master.

Same error

Logger: custom_components.google_home
Source: custom_components/google_home/config_flow.py:97
Integration: Google Home (documentation, issues)
First occurred: 7:52:08 (3 occurrences)
Last logged: 7:52:43

And

Logger: glocaltokens.client
Source: /usr/local/lib/python3.8/site-packages/glocaltokens/client.py:169
First occurred: 7:52:08 (3 occurrences)
Last logged: 7:52:43

[!] Could not get master token.

Can you please open an issue over at github so we can track it there :smile:

1 Like

I have the same error on Hassbian (Home Assistant Core), but fine with Hass.io (Home Assistant).

Hi,
i am very new to HA, need some help.
do you have an example how to setup the google_home sensor ‘sensor.kitchen_timers’ ?
Thanks

type: ‘custom:googletimers-card’
entity: sensor.kitchen_timers
alarms_entity: sensor.kitchen_alarms
title: Kitchen

Just choose the manual card at the button of the card picker in lovelace and paste the code from the example in there. Where entity is the name of the entity that contains the timers. Or see this link for an example.

Example

type: 'custom:googletimers-card'
entity: sensor.kokken_timers
title: Køkken

Entity name has to be the name of the entity for your device. You can find the one you want in the integration page by clicking on entities located right under the icon for the integration. Your timers sensor will been named like this sensor."Your device name"_timers. Where “You device name” is the name that you have given it when you added it to the Google Home App. :smile:

If you have not restart HA after adding the custom card, you either have to restart or clear the browser cache. :smile:

Sorry, i tried everything, underneath 2 printscreens of my Google Home App.
is that the device name ?