Giter Site home page Giter Site logo

hagooglewifi's Introduction

Google WiFi Home Assistant Integration

Buy me a coffee hacs_badge

This integration provides control and monitoring of the Google WiFi system within Home Assistant.

Platforms:

Binary Sensor:

The binary_sensor platform will show the access points that are configured in your system and their connection status to the Internet (on = connected).

Additionally there is a custom service to allow you to reset either a single access point or the whole wifi system:

Service: googlewifi.reset
Parameter Description Example
entity_id Access point or system to restart. binary_sensor.this_access_point

Device Tracker:

The device_tracker platform will report the connected (home/away) status of all of the devices which are registered in your Google Wifi network. Note: Google Wifi retains device data for a long time so you should expect to see many duplicated devices which are not connected as part of this integration. There is no way to parse out what is current and what is old.

Switch:

The switch platform will allow you to turn on and off the internet to any connected device in your Google Wifi system. On = Internet On, Off = Internet Off / Paused. Additionally there are two custom services to allow you to set and clear device prioritization.

Service: googlewifi.prioritize
Parameter Description Example
entity_id The entity_id of the device you want to prioritize. switch.my_iphone
duration The duration in hours that you want to prioritize for. 4
Service: googlewifi.prioritize_reset
Parameter Description Example
entity_id The entity_id of a device on the system you want to clear. switch.my_iphone

Note: Only one device can be prioritized at a time. If you set a second prioritization it will clear the first one first.

Light:

The light platform allows you to turn on and off and set the brightness of the lights on each of your Google Wifi hubs. (Just for fun).

Sensor:

The sensor platform adds upload and download speed monitoring to your Google Wifi system. Automatic speed testing can be enabled and disabled from the integration options (default on), as can the interval for the tests (default 24 hours).

Service: googlewifi.speed_test
Parameter Description Example
entity_id A speed sensor entity_id of the google system. sensor.google_wifi_system_upload_speed

Note: You must select the main wifi system. Individual devices can not be tested.

Install through HACS:

Add a custom repository in HACS pointed to https://github.com/djtimca/hagooglewifi

The new integration for Google WiFi should appear under your integrations tab.

Click Install and restart Home Assistant.

Install manually:

Copy the contents found in https://github.com/djtimca/hagooglewifi/custom_components/googlewifi to your custom_components folder in Home Assistant.

Restart Home Assistant.

Configure the integration:

To install this integration you will need a Google Refresh Token which you can get by following the instructions at: https://www.angelod.com/onhubauthtool

Note that using the Chrome Plugin is much easier.

Once installed, restart Home Assistant and go to Configuration -> Integrations and click the + to add a new integration.

Search for Google WiFi and you will see the integration available.

Enter the refresh token in the integration configuration screen and hit submit.

Enjoy!

hagooglewifi's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hagooglewifi's Issues

Platform googlewifi does not generate unique ID

I' installed packet v 0.1.28 on HA 2021.9.4 and have error:

Logger: homeassistant.components.device_tracker
Source: helpers/entity_platform.py:566
Integration: Device tracker (documentation, issues)
First occurred: 2:55:25 PM (1 occurrences)
Last logged: 2:55:25 PM*

Platform googlewifi does not generate unique IDs. ID 7C49345E82411EAC9C4201489890ABDAC7FDE5315E27D47967FEFE9059BBC629 already exists - ignoring device_tracker.huawei_nova_3e_huawei_android_device

Search string 7C49345E82411EAC9C4201489890ABDAC7FDE5315E27D47967FEFE9059BBC629 only exist in 2 file in .storage folder:
--> 1 hit in core.device_registry file as:

            {
                "config_entries": [
                    "7e581854fa76d168ca95dc18cd625e47"
                ],
                "connections": [],
                "identifiers": [
                    [
                        "googlewifi",
                        "7C49345E82411EAC9C4201489890ABDAC7FDE5315E27D47967FEFE9059BBC629"
                    ]
                ],
                "manufacturer": "Google",
                "model": "Connected Client",
                "name": "HUAWEI nova 3e (Huawei Android device)",
                "sw_version": null,
                "entry_type": null,
                "id": "bd7c1db0997ac82954dfd79c85ae16ba",
                "via_device_id": "75c2d23b42ef69a4eb4e2b60d7a9c40d",
                "area_id": null,
                "name_by_user": null,
                "disabled_by": null
            },

--> 2 hit in core.entity_registry file as:

            {
                "entity_id": "device_tracker.huawei_nova_3e_huawei_android_device",
                "config_entry_id": "7e581854fa76d168ca95dc18cd625e47",
                "device_id": "bd7c1db0997ac82954dfd79c85ae16ba",
                "area_id": null,
                "unique_id": "7C49345E82411EAC9C4201489890ABDAC7FDE5315E27D47967FEFE9059BBC629",
                "platform": "googlewifi",
                "name": null,
                "icon": null,
                "disabled_by": null,
                "capabilities": null,
                "supported_features": 0,
                "device_class": null,
                "unit_of_measurement": null,
                "original_name": "HUAWEI nova 3e (Huawei Android device)",
                "original_icon": "mdi:wifi"
            },
            ...

            {
                "entity_id": "switch.huawei_nova_3e_huawei_android_device",
                "config_entry_id": "7e581854fa76d168ca95dc18cd625e47",
                "device_id": "bd7c1db0997ac82954dfd79c85ae16ba",
                "area_id": null,
                "unique_id": "7C49345E82411EAC9C4201489890ABDAC7FDE5315E27D47967FEFE9059BBC629",
                "platform": "googlewifi",
                "name": null,
                "icon": null,
                "disabled_by": "integration",
                "capabilities": null,
                "supported_features": 0,
                "device_class": null,
                "unit_of_measurement": null,
                "original_name": "HUAWEI nova 3e (Huawei Android device)",
                "original_icon": "mdi:wifi"
            },

I guest 2 entity : switch and device_tracker are conflict by using the same unique_id": "7C49345E82411EAC9C4201489890ABDAC7FDE5315E27D47967FEFE9059BBC629".
How to troubleshoot this problem ?

Thank for any advice !!!

After restarting HASS all devices are showing as unknown

Supervisor 2020.12.7; Home Assistant OS 5.8; RPi 3

After restarting HASS all devices are showing as unknown. The only fix is to remove and reconfigure. I see many log items corresponding to network devices:

2020-12-26 12:16:22 ERROR (MainThread) [homeassistant.components.device_tracker] Platform googlewifi does not generate unique IDs. ID 5D448C27F353C88E5A7D3DDF795547FF7945901918DEAB3C5EA6D54DA57D8B89 already exists - ignoring device_tracker.amazon

I also see:
2020-12-26 12:19:50 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Google Wifi for googlewifi Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/config/custom_components/googlewifi/__init__.py", line 61, in async_setup_entry await api.connect() File "/usr/local/lib/python3.8/site-packages/googlewifi/__init__.py", line 171, in connect success = await self.get_api_token() File "/usr/local/lib/python3.8/site-packages/googlewifi/__init__.py", line 148, in get_api_token await self.get_access_token() File "/usr/local/lib/python3.8/site-packages/googlewifi/__init__.py", line 140, in get_access_token response = await self.post_api(url, headers, payload) File "/usr/local/lib/python3.8/site-packages/googlewifi/__init__.py", line 37, in post_api async with self._session.post( File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 1124, in __aenter__ self._resp = await self._coro File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 626, in _request break File "/usr/local/lib/python3.8/site-packages/aiohttp/helpers.py", line 656, in __exit__ raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError

I'd be happy to help T/S and provide additional logging.

Unable to reinstall via HACS

After today's round of fixing, I am attempting to reinstall via HACS but on startup the following error appears in the logs. I've tried removing and reinstalling. Not sure what else to try.

  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 211, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 128, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 63, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 72, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 153, in async_init
    flow, result = await task
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 171, in _async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 710, in async_create_flow
    integration.get_platform("config_flow")
  File "/usr/src/homeassistant/homeassistant/loader.py", line 524, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 529, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/custom_components/googlewifi/__init__.py", line 8, in <module>
    from googlewifi import GoogleHomeIgnoreDevice, GoogleWifi, GoogleWifiException
  File "/usr/local/lib/python3.9/site-packages/googlewifi/__init__.py", line 8, in <module>
    from .v1_pb2 import GetHomeGraphRequest
  File "/usr/local/lib/python3.9/site-packages/googlewifi/v1_pb2.py", line 2677, in <module>
    _sym_db.RegisterMessage(globals()['None'])
  File "/usr/local/lib/python3.9/site-packages/google/protobuf/symbol_database.py", line 84, in RegisterMessage
    self.RegisterMessageDescriptor(desc)
  File "/usr/local/lib/python3.9/site-packages/google/protobuf/symbol_database.py", line 95, in RegisterMessageDescriptor
    self.pool._AddDescriptor(message_descriptor)
  File "/usr/local/lib/python3.9/site-packages/google/protobuf/descriptor_pool.py", line 238, in _AddDescriptor
    self._CheckConflictRegister(desc, desc.full_name, desc.file.name)
  File "/usr/local/lib/python3.9/site-packages/google/protobuf/descriptor_pool.py", line 191, in _CheckConflictRegister
    raise TypeError(error_msg)
TypeError: Conflict register for file "google/internal/home/foyer/v1.proto": google.internal.home.foyer.v1.None is already defined in file "glocaltokens/google/internal/home/foyer/v1.proto". Please fix the conflict by adding package name on the proto file, or use different name for the duplication.```

Consistent KeyError: 'traffic' error

I've tried to track down this one myself as well a looked to see if it was asked and answered but couldn't find, so I apologize if it was.

I'm repeatedly getting the following error. It will process fully sometimes, but not often than not I get this exception and all devices lose their states and attributes.

UPDATE: After more digging #39 reported same key error, but with others asking with it. I always get the traffic key error.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/googlewifi/__init__.py", line 171, in _async_update_data
    system_data = await self.api.get_systems()
  File "/usr/local/lib/python3.8/site-packages/googlewifi/__init__.py", line 191, in get_systems
    return await self.structure_systems(response)
  File "/usr/local/lib/python3.8/site-packages/googlewifi/__init__.py", line 291, in structure_systems
    devices[this_station["station"]["id"]]["traffic"] = this_station["traffic"]
KeyError: 'traffic'

Add attribute for the network frequency used by a device (2.4GHz or 5GHz)

Please, add the attribute to show which frequency is been used by a device (2.4GHz or 5GHz).
This information is shown by Home App so I assume that it's not difficult to implement and it's a handy way to manage the network usage and devices performance.
I would appreciate.
Thank you in advance,

Ederson Santos

Error: Abort Single Instance Allowed - maybe caused by multiple GWifi locations

When adding the Google Wifi integration I get the following error message:
[%key:common::config_flow::abort::single_instance_allowed%]

hagooglewifi version: 0.1.25
Home Assistant: 2021.4.5

It may be caused by the fact, that I manage two Google Wifi installations on different locations but it I'm sure it has been working some weeks ago when I last tried out this integration.

Two networks across different houses problem

I have two networks across two houses. Several sensors are coming up “unknown”.
connected devices
Download speed and traffic *
Upload speed and traffic *
Guest devices
the ones marked with * show data for the network that my HA instance is on but “unknown” for the other sensors. The sensors without * show data for my other network but unknown on the sensors marked with *. Very strange!! Any help would be greatly appreciated.
also getting errors in log attached

Logger: homeassistant.components.sensor
Source: custom_components/googlewifi/sensor.py:264
Integration: Sensor (documentation, issues)
First occurred: 25 May 2021, 21:19:06 (2 occurrences)
Last logged: 25 May 2021, 21:19:06

Error adding entities for domain sensor with platform googlewifi
Error while setting up googlewifi platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 558, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 581, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 334, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 340, in _stringify_state
state = self.state
File "/config/custom_components/googlewifi/sensor.py", line 264, in state
self._state = self.coordinator.data[self._system_id][
KeyError: 'connected_devices'

Also

This error originated from a custom integration.

Logger: custom_components.googlewifi
Source: custom_components/googlewifi/init.py:171
Integration: Google WiFi (documentation, issues)
First occurred: 8:52:49 (6 occurrences)
Last logged: 13:49:20

Unexpected error fetching GoogleWifi data: 'operationState'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 180, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/googlewifi/init.py", line 171, in _async_update_data
system_data = await self.api.get_systems()
File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 191, in get_systems
return await self.structure_systems(response)
File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 284, in structure_systems
sensitive_info = await self.get_sensitive_info(system_id=this_system["id"], station_ids=station_ids)
File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 616, in get_sensitive_info
status = status["operationState"]
KeyError: 'operationState'

[custom_components.googlewifi] Unexpected error fetching GoogleWifi data: 'operationState'

Every now and then all devices go unavailable for a little while, and I can see the following error in logs:

2021-04-15 15:06:43 ERROR (MainThread) [custom_components.googlewifi] Unexpected error fetching GoogleWifi data: 'operationState'
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 173, in _async_refresh
self.data = await self._async_update_data()
File "/home/homeassistant/.homeassistant/custom_components/googlewifi/init.py", line 171, in _async_update_data
system_data = await self.api.get_systems()
File "/srv/homeassistant/lib/python3.8/site-packages/googlewifi/init.py", line 191, in get_systems
return await self.structure_systems(response)
File "/srv/homeassistant/lib/python3.8/site-packages/googlewifi/init.py", line 284, in structure_systems
sensitive_info = await self.get_sensitive_info(system_id=this_system["id"], station_ids=station_ids)
File "/srv/homeassistant/lib/python3.8/site-packages/googlewifi/init.py", line 616, in get_sensitive_info
status = status["operationState"]
KeyError: 'operationState'

Installing on a brand new setup - getting errors in HA log

Apologies if I don't get basic domain lingo - it's only a couple of hours since my very first install of Home Assistant.

After having added the Google Wifi package, I'm getting this error:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/googlewifi/sensor.py", line 32, in async_setup_entry
    for system_id, system in coordinator.data.items():
AttributeError: 'NoneType' object has no attribute 'items'

It's the same error for all of these:
image

Any suggestions?

Entities go offline (unknown state) often

Version: 0.0.8
Entities often go to unknown state and recover automatically.
image

Error trace:

``
Logger: custom_components.googlewifi
Source: custom_components/googlewifi/init.py:126
Integration: Google WiFi (documentation)
First occurred: 4 November 2020, 22:17:44 (27 occurrences)
Last logged: 9:01:27

Unexpected error fetching GoogleWifi data:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 217, in structure_systems
for this_device in devices_list["stations"]:
KeyError: 'stations'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/config/custom_components/googlewifi/init.py", line 121, in _async_update_data
system_data = await self.api.get_systems()
File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 142, in get_systems
return await self.structure_systems(response)
File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 229, in structure_systems
raise GoogleWifiException(error)
googlewifi.GoogleWifiException: 'stations'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/googlewifi/init.py", line 126, in _async_update_data
raise PlatformNotReady from error
homeassistant.exceptions.PlatformNotReady
``

Amount of connected devices to guest network

First of all thank you for this helpful integration!
Would be great to have a sensor to show if either someone is connected to the guest network or even to show how many devices are connected to it. So you can use this sensor for your automations without adding each "guest" to a group of device trackers.

Turning switches off does not pause internet for that device

When i turn any of the switches off for a device im still seeing the device online through the app and the actual device itself. When i click the switch off it turns back on by itself after a few seconds.

Google Wifi Version 0.1.24

Home Assistant core-2021.4.4

Google Refresh Token

To install this integration you will need a Google Refresh Token which you can get by following the instructions at: https://www.angelod.com/onhubauthtool

There are no instructions there on what in the hell I'm supposed to be doing. Perhaps you should consider explaining what in the hell a person is supposed to be doing with this stupid little junky webpage.

Intergration not in list

installed the repository via HACS and instructions say to go to configuration and integrations and search to install there but it is not listed.

Error doing job: Task exception was never retrieved

System:
HassIO is running on a Raspberry PI 4 with 4Gb of RAM

Core
Version
core-2021.8.8
Newest Version
core-2021.8.8

Supervisor
Version
supervisor-2021.08.1
Newest Version
supervisor-2021.08.1

Host
Operating System
Home Assistant OS 6.2
Deployment
production

Log info:

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/googlewifi/switch.py:210
Integration: Google WiFi Integration (documentation, issues)
First occurred: September 1, 2021, 9:54:55 PM (1176 occurrences)
Last logged: 11:24:20 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
    update_callback()
  File "/config/custom_components/googlewifi/__init__.py", line 308, in _update_callback
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 464, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 498, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 468, in _stringify_state
    if not self.available:
  File "/config/custom_components/googlewifi/switch.py", line 210, in available
    self.coordinator.data[self._system_id]["devices"][self._item_id].get(
KeyError: 'B15F4BC3FC43157370628CDD396AE15274EC48F6DF60BCB9CD5C1B9A4E727C30'

When this happen
I couldn't pinpoint what triggers this error. It starts just after restarting the HA and keeps repeting.

Displaying data usage for the past month

On the google wifi app you can see how much data has been used on the whole network over the last month / 30 days. Would it be possible to get this in home assistant?

Multiple Networks Are Combined into the One

I'm part of two Google home households that both use Google Wifi/Nest Wifi systems, and when I installed this integration on my home assistant network, it showed all the devices from both networks - is there a way to specify only one of the Google Wifi Systems?

Device tracker never reports devices home

All the device trackers of my Goole wifi detected devices report away or unavailable and never home status. I installed and configured the integration as the documentation describes. Is there something more to it like configure some device tracker settings?

Missing requirements

I installed through HACS but can't get it setup correctly, when trying to add integration it gets stuck on "Please wait while the integration is being installed".

The log gives me two related errors:
Logger: homeassistant.util.package
Source: util/package.py:98
First occurred: December 4, 2020, 10:53:54 PM (1 occurrences)
Last logged: December 4, 2020, 10:53:54 PM

Unable to install package googlewifi==0.0.16: Could not find a version that satisfies the requirement googlewifi==0.0.16 (from versions: ) No matching distribution found for googlewifi==0.0.16

and

Logger: aiohttp.server
Source: requirements.py:131
First occurred: December 4, 2020, 10:53:54 PM (1 occurrences)
Last logged: December 4, 2020, 10:53:54 PM

Error handling request
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 118, in impl
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/config/config_entries.py", line 136, in post
return await super().post(request)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/data_validator.py", line 60, in wrapper
result = await method(view, request, *args, **kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/data_entry_flow.py", line 73, in post
"show_advanced_options": data["show_advanced_options"],
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/data_entry_flow.py", line 119, in async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config_entries.py", line 532, in async_create_flow
await async_process_deps_reqs(self.hass, self._hass_config, integration)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 344, in async_process_deps_reqs
hass, integration.domain
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/requirements.py", line 75, in async_get_integration_with_requirements
hass, integration.domain, integration.requirements
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/requirements.py", line 131, in async_process_requirements
raise RequirementsNotFound(name, [req])
homeassistant.requirements.RequirementsNotFound: Requirements for googlewifi not found: ['googlewifi==0.0.16'].

Google wifi regularly crashes

It seems that since I installed this module my Google wifi router regularly crashes. I suspect the module might be polling for data too frequently.
I'll disable the module and report back in a couple of days, see if the crashes have stopped.

UX: Placeholder text is too long

Upon trying to install/configure this integration, the following dialog shows up:

screenshot

It isn't helpful if we can't see the full placeholder text. In special, having to type the URL manually is bad UX, instead the dialog should provide a clickable link.

Owner of multiple wifi points

I manage my parent's wifi points as well as mine. Is it possible as part of the integration to choose which group to use? I messed around with the API and looks as if an array of groups is passed if the user has more than one.

Won't Populate Entities after being installed

Fresh install of this add-on, restarted the core and I am consitently receiving this error

2021-01-21 11:14:29 WARNING (MainThread) [homeassistant.config_entries] Config entry for googlewifi not ready yet. Retrying in 40 seconds
2021-01-21 11:15:03 ERROR (MainThread) [homeassistant.components.google_assistant.http] Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 404
2021-01-21 11:15:33 ERROR (MainThread) [homeassistant.components.google_assistant.http] Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 404
2021-01-21 11:15:34 WARNING (MainThread) [homeassistant.config_entries] Config entry for googlewifi not ready yet. Retrying in 80 seconds

uninstalled it, restarted, re-installed it, using a new key, same issue.

all devices are away !

Hi, very nice integration, I have installed through HACS on Hassio. Everything seems fine but alle the devices are set as away, not even one is at home... suggestions ?

Configuration enhancement

Hi, thank you for this beautiful integration of google wifi! You're awesome!
In reference to the enhancement you made in #4, I would like to suggest there be added a configuration to select which home to be included, and/or make the home show as an attribute at the different entities (to use as device trackers for multiple homes?).

Cheers, and happy holidays! 👍

Error in fetching GoogleWiFi data

I removed the custom component completely to install it again, since I changed some names in the google wifi app.
Afterwards I found it wont show me the access points so I went to the logs and saw it wasn't fetching the data.
I set the logger to debug for googlewifi and this is the content:

2020-12-21 20:00:56 ERROR (MainThread) [custom_components.googlewifi] Error fetching GoogleWifi data: Error connecting to GoogleWifi:
2020-12-21 20:00:56 DEBUG (MainThread) [custom_components.googlewifi] Finished fetching GoogleWifi data in 19.879 seconds
2020-12-21 20:00:56 WARNING (MainThread) [homeassistant.config_entries] Config entry for googlewifi not ready yet. Retrying in 5 seconds
2020-12-21 20:01:19 ERROR (MainThread) [custom_components.googlewifi] Error fetching GoogleWifi data: Error connecting to GoogleWifi:
2020-12-21 20:01:19 DEBUG (MainThread) [custom_components.googlewifi] Finished fetching GoogleWifi data in 17.960 seconds
2020-12-21 20:01:19 WARNING (MainThread) [homeassistant.config_entries] Config entry for googlewifi not ready yet. Retrying in 10 seconds
2020-12-21 20:01:48 ERROR (MainThread) [custom_components.googlewifi] Error fetching GoogleWifi data: Error connecting to GoogleWifi:
2020-12-21 20:01:48 DEBUG (MainThread) [custom_components.googlewifi] Finished fetching GoogleWifi data in 18.263 seconds
2020-12-21 20:01:48 WARNING (MainThread) [homeassistant.config_entries] Config entry for googlewifi not ready yet. Retrying in 20 seconds

Sadly I can't debug it further, since there is no message sadly.
And I also wanted to ask, if it is possible to configure the integration using the configuration.yaml file instead of the integration panel? It is tedious to always remove and add the integration for troubleshooting..

Cannot add integration through HACS

Cannot add integration through HACS, I'm using the (as of writing) latest version of HACS (version 1.15.2)

When clicking "Explore & Add Repositories" and searching for "Google Wifi", I get no response:
image

When trying to add the repository via "Custom Repositories", I cannot add it:
image

Error setting up entry GoogleRouter for googlewifi

image
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 269, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/googlewifi/init.py", line 61, in async_setup_entry
await api.connect()
File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 171, in connect
success = await self.get_api_token()
File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 160, in get_api_token
response = await self.post_api(oath_url, headers, payload)
File "/usr/local/lib/python3.8/site-packages/googlewifi/init.py", line 37, in post_api
async with self._session.post(
File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 1117, in aenter
self._resp = await self._coro
File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 619, in _request
break
File "/usr/local/lib/python3.8/site-packages/aiohttp/helpers.py", line 656, in exit
raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError

local_auth_token must follow the correct format

This may be a duplicate of #34, but I'm not 100% sure. Just started noticing these errors in my logs:

2021-05-09 23:05:10 ERROR (SyncWorker_2) [glocaltokens.client] [Device - Nest Wifi router] local_auth_token must follow the correct format
2021-05-09 23:05:10 ERROR (SyncWorker_2) [glocaltokens.client] [Device - Google Wifi router] local_auth_token must follow the correct format
2021-05-09 23:05:10 ERROR (SyncWorker_2) [glocaltokens.client] [Device - Google Wifi router] local_auth_token must follow the correct format
2021-05-09 23:05:10 ERROR (SyncWorker_2) [glocaltokens.client] [Device - Google Wifi router] local_auth_token must follow the correct format

As far as I can tell, everything is working... but I'm curious if these errors are potentially a sign of trouble down the road?

error create entity

`2021-01-18 19:27:07 INFO (MainThread) [homeassistant.components.switch] Setting up switch.googlewifi
2021-01-18 19:27:07 INFO (MainThread) [homeassistant.components.light] Setting up light.googlewifi
2021-01-18 19:27:07 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.googlewifi
2021-01-18 19:27:07 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up googlewifi platform for binary_sensor
File "/config/custom_components/googlewifi/binary_sensor.py", line 29, in async_setup_entry
2021-01-18 19:27:07 ERROR (MainThread) [homeassistant.components.device_tracker] Error while setting up googlewifi platform for device_tracker
File "/config/custom_components/googlewifi/device_tracker.py", line 31, in async_setup_entry
2021-01-18 19:27:07 ERROR (MainThread) [homeassistant.components.switch] Error while setting up googlewifi platform for switch
File "/config/custom_components/googlewifi/switch.py", line 45, in async_setup_entry
2021-01-18 19:27:07 ERROR (MainThread) [homeassistant.components.light] Error while setting up googlewifi platform for light
File "/config/custom_components/googlewifi/light.py", line 30, in async_setup_entry
2021-01-18 19:27:07 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up googlewifi platform for sensor
File "/config/custom_components/googlewifi/sensor.py", line 32, in async_setup_entry

`

Home Assistant Warning for version key in manifest file.

I am receiving the following warning in the HA logs.

2021-04-14 21:27:38 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'googlewifi'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'googlewifi'

Too fucking arrogant to offer instructions

Owner of this garbage project is too fucking arrogant to offer instructions on what a person is supposed to do at the link they provide as one of the necessary steps. If it is a fucking necessary step to your fucking project, you fucking meatheaded mouth breathing piece of shit, you need to offer fucking instructions on what the fuck a person is supposed to be able to achieve here, or an alternate method of doing so, because there is fucking NOTHING at the fucking link that explains what to do, nor does any link provided on said webpage result in anything other than a refused connection or a completely blank fucking webpage.

Stupid bitch.

Unable to fetch data from Google Wifi

I am running home assistant on raspberry pi4.
I have the error: Unable to fetch data from Google Wifi

on configuration.yaml i have the sensor: google_wifi

TypeError: 'NoneType' is not iterable

In addition to the error traffic error reported in another issue, I've been getting this one:

`This error originated from a custom integration.

Logger: custom_components.googlewifi
Source: custom_components/googlewifi/init.py:171
Integration: Google WiFi Integration (documentation, issues)
First occurred: 6:36:10 PM (2 occurrences)
Last logged: 6:54:29 PM

Unexpected error fetching GoogleWifi data: 'NoneType' object is not iterable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/googlewifi/init.py", line 171, in _async_update_data
system_data = await self.api.get_systems()
File "/usr/local/lib/python3.9/site-packages/googlewifi/init.py", line 191, in get_systems
return await self.structure_systems(response)
File "/usr/local/lib/python3.9/site-packages/googlewifi/init.py", line 289, in structure_systems
for this_station in system_metrics.get("stationMetrics"):
TypeError: 'NoneType' object is not iterable
`

Unexpected error fetching GoogleWifi data: 'traffic'

System:
HassIO is running on a Raspberry PI 4 with 4Gb of RAM

Core
Version
core-2021.8.8
Newest Version
core-2021.8.8

Supervisor
Version
supervisor-2021.08.1
Newest Version
supervisor-2021.08.1

Host
Operating System
Home Assistant OS 6.2
Deployment
production

Log info:

This error originated from a custom integration.

Logger: custom_components.googlewifi
Source: custom_components/googlewifi/__init__.py:171
Integration: Google WiFi Integration (documentation, issues)
First occurred: September 1, 2021, 2:24:44 PM (974 occurrences)
Last logged: 11:34:15 AM

Unexpected error fetching GoogleWifi data: 'traffic'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/googlewifi/__init__.py", line 171, in _async_update_data
    system_data = await self.api.get_systems()
  File "/usr/local/lib/python3.9/site-packages/googlewifi/__init__.py", line 191, in get_systems
    return await self.structure_systems(response)
  File "/usr/local/lib/python3.9/site-packages/googlewifi/__init__.py", line 291, in structure_systems
    devices[this_station["station"]["id"]]["traffic"] = this_station["traffic"]
KeyError: 'traffic'

When this happen
I couldn't pinpoint what triggers this error. It starts just after restarting the HA and keeps repeating.

current in/out usage?

(Q1) Is there a way with to see total (internet) in/out bps?

(Q2) show specific device ie kids computer in/out bps?

(Q3) If there's a switch connected to a google mesh router, how will those devices on the switch show up?

Home Assistant integration planned?

This integration looks very interesting! Thanks for the work.

Is it planned to integrate it into home assistant core?
Can I try to do a PR for this integration?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.