hawky358 / hass_ids_hyyp

Home Assistant integration for IDS Hyyp
GNU General Public License v3.0
12 stars 3 forks source link

Keep getting error when trying to login to Hyyp #28

Closed THERON-SMITR closed 3 months ago

THERON-SMITR commented 3 months ago

2024-08-21 15:42:48.807 ERROR (MainThread) [custom_components.ids_hyyp.config_flow] Unexpected exception Traceback (most recent call last): File "/config/custom_components/ids_hyyp/config_flow.py", line 85, in async_step_user token_data = await self.hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ids_hyyp/config_flow.py", line 50, in _validate_and_create_auth fcm_token = hyyp_client.get_intial_fcm_credentials() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyhyypapihawkmod/client.py", line 233, in get_intial_fcm_credentials return self.fcm_register.register(sender_id=GCF_SENDER_ID) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyhyypapihawkmod/push_receiver.py", line 237, in register fcm = self.fcm_register(sender_id=sender_id, token=subscription["token"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyhyypapihawkmod/push_receiver.py", line 229, in fcm_register return {"keys": keys, "fcm": json.loads(resp_data.decode("utf-8"))} ^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'decode'

hawky358 commented 3 months ago

Hello,

Thanks. This is the same as issue #27. It seems like google is actually slowly shutting down the API. I've been internally testing a version which uses the new google FCM v1 API. Seems to be ok.

I've released it now as v1.7.2b2. Please try this version on your side and see if it works. (It's available on HACS)

Remember to restart HASS once, after configuring the integration.

hawky358 commented 3 months ago

Fix released as 1.7.3