Google Wifi Integration (Custom Component)

Ah - looks like I forgot to save one change before I pushed the updates last night. Updated and pushed 0.1.5 which should correct that issue.

1 Like

Awesome integration!!!
Waiting for:

  • Routerā€™s Download/Upload rate test results.
  • Number of devices currently connected.
  • Current devices download/upload rate.

Thank you in advance,
Ederson Santos

Unfortunately I those functions havenā€™t been exposed in the unofficial documentation yetā€¦ I will see if I canā€™t get more information on it.

1 Like

Is there an easy way to tell homeassistant to not allow the switches created by this integration to be viewable to the google home app? I like the functionality in homeassistant for creating automations but I donā€™t need to see these switches cluttering my google home app. Just wondering, I love this integration! Great work!

If you are using the Nabu Casa integration to Google Home you can go into the cloud configuration and manage entities. Then you can turn off the switches from this integration (or any other switches/entities you donā€™t want in Google Home) and they will no longer be shared there.

I have two locations with Google wifi routers in my Google wifi app. Administering one for my girlfriends parents. When getting the token it picks the location that is theris and not my own. How to solve?

@edersong Just released version 0.1.6 which adds the first of your wishes.

Adds upload and download sensors for the routerā€™s WLAN speed. By default will run a speed test once every 24 hours (or on startup of HASS), but you can set the options in the integration settings to turn off auto testing or change the interval.

There is also a custom service googlewifi.speed_test to be able to call an update on demand.

Will potentially look at #2 as well in the next couple days since that should be easy enough to pull.

#3 doesnā€™t look possible at this point based on docs Iā€™ve found.

2 Likes

Unfortunately I donā€™t have a second system to test with that way. Had a similar request from someone else on GitHub and have asked for some sample data on their system so I can see how it comes back.

I actually thought it should pull both systems in based on how the data looks, but it doesnā€™t appear to be doing that. Hopefully can get some sample data to test with soon.

1 Like

Thanks for the info, unfortunately Iā€™m not using nabu casa. Iā€™ve tried to find some way to go about excluding the switches from the google assistant integration without having to figure out every switch that was created by this integration and manually adding them one by one to the google assistant configuration to be excluded. The problem that this is causing is when I tell google to turn off a specific device such as the kitchen light, it turns off the light but also switches off its internet access as well which means when I eventually tell it to turn on the light it canā€™t because itā€™s internet connection is turned off. Iā€™m fairly new to homeassistant and yaml so any thoughts or help from others out there would be greatly appreciated. Thanks.

Awesome!
Thank you, @djtimca!

The other option is that when installing this integration you can opt to add all new devices as disabled (you would need to uninstall and reinstall the integration to do this).

Then you can just enable the devices you actually want to be able to turn on/off the internet for (likely not your kitchen light).

@edersong #2 is there now too in v0.1.8 - new sensor for # connected devices on the network.

1 Like

Worked like a charm!!
Thank you, Tim!

I get the connected devices correctly, but still also getting this error:

Logger: homeassistant
Source: custom_components/googlewifi/sensor.py:189
First occurred: 8:01:59 (3 occurrences)
Last logged: 10:05:58

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 119, in _handle_refresh_interval
    await self.async_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 193, in async_refresh
    update_callback()
  File "/config/custom_components/googlewifi/__init__.py", line 244, in _update_callback
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state
    sstate = self.state
  File "/config/custom_components/googlewifi/sensor.py", line 189, in state
    return self.coordinator.data[self._system_id]["connected_devices"]
TypeError: 'NoneType' object is not subscriptable

That is an odd error. I actually create that key during the pull from Google.

Sounds like there might be something a little unique about your Google Wifi setup. Do you have multiple systems? Anything you can think of that might be different? Does this error repeat or just happen once?

I have a 3-pack google wifi and canā€™t think of any special about it.

The error is logged at exactly 61 minutes interval.

Does the interval change if you change the polling interval?

Hi @djtimca,

Seems that the integration is not performing the auto testing each 24 hoursā€¦ mine, I didnā€™t changed the default values and it not performed a test within 3 days.

The polling interval was 60 seconds and I have changed it to 90 seconds. But do you think this is related to the error log each hour?

@stigvi try the latest update I pushed. Not sure if it might help.