Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken in latest home assistant versions #26

Closed
Madj42 opened this issue Jun 22, 2022 · 12 comments
Closed

Broken in latest home assistant versions #26

Madj42 opened this issue Jun 22, 2022 · 12 comments

Comments

@Madj42
Copy link

Madj42 commented Jun 22, 2022

Version of the custom_component

0.1.10

Configuration

Configuration is done via wizard.


## Describe the bug
Component stopped working in latest versions.  When trying to remove and reads it, it displays the error below.

## Debug log

This error originated from a custom integration.

Logger: aiohttp.server
Source: custom_components/resmed_myair/client/new_client.py:247
Integration: ResMed myAir CPAP Sensors (documentation, issues)
First occurred: 7:08:01 PM (3 occurrences)
Last logged: 7:08:17 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, 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 100, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 220, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 205, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 109, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 260, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 335, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/resmed_myair/config_flow.py", line 52, in async_step_user
    device: MyAirDevice = await get_device(
  File "/config/custom_components/resmed_myair/config_flow.py", line 32, in get_device
    device = await client.get_user_device_data()
  File "/config/custom_components/resmed_myair/client/new_client.py", line 247, in get_user_device_data
    device = records_json["data"]["getPatientWrapper"]["fgDevices"][0]
TypeError: 'NoneType' object is not subscriptable




```text

Add your logs here.

@aurvandel
Copy link

I'm getting the same behavior.

@notmayo
Copy link

notmayo commented Dec 20, 2022

No longer working in 2022.12.X

@kellcomnet2
Copy link

Confirmed not working +1

@kellcomnet2
Copy link

‘’’
Unexpected error fetching myAir update data: 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/resmed_myair/coordinator.py", line 38, in _async_update_data
self.device = await self.myair_client.get_user_device_data()
File "/config/custom_components/resmed_myair/client/new_client.py", line 247, in get_user_device_data
device = records_json["data"]["getPatientWrapper"]["fgDevices"][0]
TypeError: 'NoneType' object is not subscriptable
‘’’

@prestomation
Copy link
Owner

Sorry folks. While I still use a ResMed CPAP, it has a CDMA radio and this network has been dismantled in my area. Due to this I am no longer able to effectively maintain this integration.

device = records_json["data"]["getPatientWrapper"]["fgDevices"][0]
TypeError: 'NoneType' object is not subscriptable

This implies that the ResMed website is now working differently than it used to and is unlikely to be related to HomeAssistant changes. Unfortunatly ResMed does not maintain a documented API so this integration works by reverse engineering the ResMed website and we are at their whim if they decide to change it.

Where are you all located? Has the myAir website changed for you? We previously saw that in Europe that 2FA email codes were required which was never implemented. Is this what you are seeing in your area now on the myAir website? This is something that someone would have to reverse engineer and figure out how to add to this integration

@kellcomnet2
Copy link

Interesting, when I just signed in to the website I had to agreed to a new user agreement and change my password, restarting ha to see if it loads any different

@kellcomnet2
Copy link

Ha pulled in latest data after logging into website, agreeing to terms, changing password then updating password in ha and restarting ha

@notmayo
Copy link

notmayo commented Dec 22, 2022

I'm in the US with a US account as well. I just logged into the app and had to accept another privacy or usage policy as well. This, like the other poster, resolved the error.

Note: I didn't have to update my account password for resmed.

@kellcomnet2
Copy link

I'm in the US with a US account as well. I just logged into the app and had to accept another privacy or usage policy as well. This, like the other poster, resolved the error.

So you didn’t have to change password? Interesting

@aurvandel
Copy link

aurvandel commented Dec 22, 2022 via email

@m1ckyb
Copy link

m1ckyb commented Dec 27, 2022

Same as everyone else, logged in to myair website, acc;epted TOS, started working again!

@Madj42
Copy link
Author

Madj42 commented Dec 27, 2022

Same here as well.

@Madj42 Madj42 closed this as completed Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants