Google Home component

How does the Google Home componnent for BT tracker work please? Do I just add the

googlehome:
devices:
- host: IP ADDRESS

Or do I also need to add

device_tracker:
platform: bluetooth_tracker

?? I did both, and have some mess in my devices. What is the right config? Thanks!

I just added the first part and it started to populate my known_devices.yaml.

But I can’t get the other configuration options to work. Tried to add a rssi_threshold but when checking the config it just says it’s an invalid config and tells me to check the component information page https://www.home-assistant.io/components/googlehome/. Said component page lists rssi_threshold as a valid configuration option.
So something has changed and the information isn’t updated.

This component behaves little strange but in my config rssi_threshold is accepted.

Be sure to add rssi_threshold under devices like this:

googlehome:
  devices:
    - host: 192.168.10.13
      device_types: 1
      rssi_threshold: -90

I added this new component, but my known devices file start to populate with track: true on all devices…
Is there any way to put new_device_defaults option, like all devices configurations?

    new_device_defaults:
      track_new_devices: false
      hide_if_away: false

The Google Home “Hub” configuration variables work, but I get errors if I create a Google Home device tracker, so track_new_devices: false isn’t working.

configuration.yaml

googlehome:
  devices:
  - host: 192.168.1.10
    device_types: 2
    rssi_threshold: -90
    track_alarms: true

device_tracker:
  - platform: googlehome
    host: 192.168.1.10
    new_device_defaults:
      track_new_devices: false
      hide_if_away: false

home-assistant.log

2019-02-22 22:51:58 WARNING (MainThread) [homeassistant.components.googlehome.device_tracker] To use this you need to configure the 'googlehome' component
2019-02-22 22:51:58 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform googlehome

I’ve got a lot of new errors this morning, and a whooooole lot of new device clunking up my interface.

Anyone have a solution for temporarily even hiding these automatically, till we wait for more info on a fix?

home-assistant.log

2019-02-23 02:38:53 ERROR (MainThread) [googledevices] Timeout contacting http://192.168.1.10:8008/setup/assistant/alarms
2019-02-23 02:38:53 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.living_room_timer fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 02:38:53 ERROR (MainThread) [googledevices] Timeout contacting http://192.168.1.10:8008/setup/assistant/alarms
2019-02-23 02:38:53 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.living_room_alarm fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 02:38:56 ERROR (MainThread) [googledevices] Timeout contacting http://192.168.1.10:8008/setup/bluetooth/scan
2019-02-23 02:38:56 ERROR (MainThread) [googledevices] Error connecting to - 192.168.1.10
2019-02-23 02:39:01 WARNING (Thread-3) [pychromecast.socket_client] [Living Room:8009] Heartbeat timeout, resetting connection
2019-02-23 02:39:04 ERROR (MainThread) [googledevices] Timeout contacting http://192.168.1.10:8008/setup/assistant/alarms
2019-02-23 02:39:04 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.living_room_alarm fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 02:39:04 ERROR (MainThread) [googledevices] Timeout contacting http://192.168.1.10:8008/setup/assistant/alarms
2019-02-23 02:39:04 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.living_room_timer fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 02:39:04 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.10:8008/setup/bluetooth/scan_results - Cannot connect to host 192.168.1.10:8008 ssl:None [Connection refused]
2019-02-23 02:39:06 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.10:8008/setup/bluetooth/scan - Cannot connect to host 192.168.1.10:8008 ssl:None [Connection refused]
2019-02-23 02:39:06 ERROR (MainThread) [googledevices] Error connecting to - 192.168.1.10
2019-02-23 02:39:07 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.10:8008/setup/assistant/alarms - Cannot connect to host 192.168.1.10:8008 ssl:None [Connection refused]
2019-02-23 02:39:07 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.living_room_timer fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 02:39:07 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.10:8008/setup/assistant/alarms - Cannot connect to host 192.168.1.10:8008 ssl:None [Connection refused]
2019-02-23 02:39:07 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.living_room_alarm fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 02:46:25 WARNING (Thread-4) [pychromecast.socket_client] [TV:8009] Heartbeat timeout, resetting connection
2019-02-23 03:42:26 ERROR (MainThread) [googledevices] Timeout contacting http://192.168.1.11:8008/setup/bluetooth/scan
2019-02-23 03:42:26 ERROR (MainThread) [googledevices] Error connecting to - 192.168.1.11
2019-02-23 03:42:26 ERROR (MainThread) [googledevices] Timeout contacting http://192.168.1.11:8008/setup/assistant/alarms
2019-02-23 03:42:26 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.bedroom_timer fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 03:42:26 ERROR (MainThread) [googledevices] Timeout contacting http://192.168.1.11:8008/setup/assistant/alarms
2019-02-23 03:42:26 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.bedroom_alarm fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 03:42:33 WARNING (Thread-5) [pychromecast.socket_client] [Bedroom:8009] Heartbeat timeout, resetting connection
2019-02-23 03:42:36 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.11:8008/setup/assistant/alarms - Cannot connect to host 192.168.1.11:8008 ssl:None [Connection refused]
2019-02-23 03:42:36 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.bedroom_alarm fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 03:42:36 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.11:8008/setup/assistant/alarms - Cannot connect to host 192.168.1.11:8008 ssl:None [Connection refused]
2019-02-23 03:42:36 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.bedroom_timer fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 03:42:36 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.11:8008/setup/bluetooth/scan - Cannot connect to host 192.168.1.11:8008 ssl:None [Connection refused]
2019-02-23 03:42:36 ERROR (MainThread) [googledevices] Error connecting to - 192.168.1.11
2019-02-23 03:42:38 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.11:8008/setup/bluetooth/scan_results - Cannot connect to host 192.168.1.11:8008 ssl:None [Connection refused]
2019-02-23 03:42:40 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.11:8008/setup/bluetooth/scan - Cannot connect to host 192.168.1.11:8008 ssl:None [Connection refused]
2019-02-23 03:42:40 ERROR (MainThread) [googledevices] Error connecting to - 192.168.1.11
2019-02-23 03:42:40 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.11:8008/setup/assistant/alarms - Cannot connect to host 192.168.1.11:8008 ssl:None [Connection refused]
2019-02-23 03:42:40 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.bedroom_timer fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 03:42:40 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.11:8008/setup/assistant/alarms - Cannot connect to host 192.168.1.11:8008 ssl:None [Connection refused]
2019-02-23 03:42:40 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.bedroom_alarm fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/googlehome/sensor.py", line 70, in async_update
    alarms = data.get('alarms')[self._condition]
TypeError: 'NoneType' object is not subscriptable
2019-02-23 03:42:41 ERROR (MainThread) [googledevices] ClientError contacting http://192.168.1.11:8008/setup/bluetooth/scan_results - Cannot connect to host 192.168.1.11:8008 ssl:None [Connection refused]
2019-02-23 09:23:18 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1883497264] Received invalid command: system_health/info

Devices added overnight.

switching to Lovelace or not using default_view would get rid of those entities :wink:

That’s the way BT works… random device ID’s and they change regularly so you end up with thousands of devices and I don’t see any way to find a device I might actually want to track either so presence detection is a wash with this for me anyway. I’m on an iPhone… I don’t really want to track my BT keyboard lol

I’m having the opposite problem of all the devices some people are seeing. I’ve had this feature enabled for 2 days now, and devices for my wife’s phone + 4 google homes have finally shown up in HA, but mine hasn’t. I don’t know what I have to do to get it to work.

I haven’t seen any other device_trackers at all. I’m going to try lowering the rssi_threshold (I just had it at the default level).

Lowering the rssi_threshold made a few more device_tracker entities appear, but not my phone. I can successfully pair my phone with the google home to use it as a speaker, but I cant’ get this component to detect it :expressionless:

I actually put my phone overnight on top of them Mini, it is still not detected. Just a single device was detected and it’s MAC address is unknown to me, it is not one of my devices.
Other than that, I also have a problem like @derikj: if I add a device tracker with googlehome as platform, I get an error that I have to set up googlehome platform first.

That would be one way to do it yeah. I’ll look into it.

I think that depends on the device? My Mi Band has a static address, same with the homes, phone and BT headsets.

Have you tried manually adding your phone in known_devices.yaml ?

Have you also tried manually adding it? Also, maybe check that your phone is “discoverable” if that’s a thing?

Anyone else getting these errors?

2019-02-24 14:04:51 ERROR (MainThread) [googledevices] Timeout contacting http://192.168.1.11:8008/setup/bluetooth/scan_results

I didn’t try manually adding my phone because RPi’s built-in bluetooth managed to find it without that and it is still working without a problem. I might try it because I intend doing room presence with google homes.

And yes, I got that same error for a brief period after taking a backup snapshot.

I tried adding them manually, and of course, they now show up as device_trackers, but their states never get updated.

On top of that, I can’t figure out what the google homes actually are detecting. When I perform a scan to pair a new device, no MAC addresses match those that have appeared as device trackers. I thought the Google Homes might have been detecting each other, but even that doesn’t appear to be the case.

I’m stumped. This seems like a really cool feature, but I just can’t get it to work.

I started having issues with Google Home and bluetooth speakers about 10 days ago. I cannot find was there a firmware update, but I suspect there was.
Since then, Google Home is unable to connect to said speakers until i turn pairing mode on them. It didn’t need to since I paired it the first time, which was 2 months ago. It just connected automatically once paired.
I played a bit with Postman and API that this component uses and indeed, Google Home no longer finds any device that isn’t in pairing/discoverable mode, which makes it unusable for bluetooth tracking iOS devices. Bluetooth on RPi still tracks iOS flawlessly. So my issues lies with Google Home, not this component. Does someone know where could I report this behavior?

Wanted to bump this as I started experience the same roughly two months ago. Was using the Home for room tracking and it all suddenly stopped one day. Curious to know if there’s any kind of fix coming or not.

Not as far as I know. I contacted Google support, spent a few hours on the phone. They claim there was no firmware updates meanwhile and said that having to pair devices every time they disconnect is expected behaviour. I switched all my Google devices for Echos because of that.

My google BT tracking component stopped adding _ of BT devices some time ago. I dont see any BT device anymore in my device tracker. It simply stopped working.

I also noticed i have all those discovered BT devices in my known_devices.yaml, but not in the HA devices as there were some times ago.

Yeah mine no longer seem to see any bluetooth devices even when I go to the scan results link. It’s like they simply stopped scanning for devices. I can still pair with all of them though.