Resmed_myair_sensors - This is a Home Assistant custom component to pull daily CPAP data from ResMed's myAir service using an undocumented API

Overview

resmed_myair

GitHub Release GitHub Activity License

hacs Project Maintenance Discord Community Forum

This component will set up the following platforms.

Platform Description
sensor Show info from the myAir API.

Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called resmed_myair.
  4. Download all the files from the custom_components/resmed_myair/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "ResMed myAir CPAP Sensors"
  8. Enter your myAir username and password

Features

This integration creates sensors from your myAir CPAP date like AHI Events/hr, Usage Minutes, Mask On/Off count, Mask Leak%. There is also a 'Last Sleep Data Recorded' to tell you the last date that myAir has recorded. This can be used to, say, notify you of your scores when they are updated in myAir in the morning.

By the nature of CPAP date, sensors will only update once per day(assuming your CPAP is used every day). For this reason, the integration only polls every 30 minutes.

Known Issues

This integration was reversed engineered from the myAir website. There are no guarentees that this will continue to work, as this is up to the whims of ResMed. Please DO NOT rely on this for any health-related matters.

This integration currently only connects to the Americas. If you are in Europe or Asia, please open an issue and offer yourself as a test subject.

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines

Comments
  • Multiple instances of the integration doesn't work for EU users

    Multiple instances of the integration doesn't work for EU users

    Is your feature request related to a problem? Please describe. When adding a second login from the EU, the second integration won't add as it says it is a duplicate

    Describe the solution you'd like A second instance of the integration should work

    Describe alternatives you've considered N/A

    Additional context General support for multiple instances was added to the integration in #3. This works in the US, but the problem is the integration relies on each CPAP having a unique serial number.

    This is setup in the US version, but in the EU version the serial number is not plumbed through. This is because it does not show up on the dashboard which is the only information I had an example from when adding EU support, as I do not have an EU account and cannot create one.

    To address this I need a HAR file for the MyAccount Profile

    1. Login to myAir
    2. Open the developer console.
    3. Open the 'My Account' page.(https://myair.resmed.eu/MyAccount.aspx)
    4. Export a HAR file
    5. Send this HAR file to me or attach it here. For step 4, here are some instructions for Chrome: https://support.google.com/admanager/answer/10358597?hl=en

    Be careful to NOT enter your password when you have the network tab open. This may end up including your myAir password in the har file which we want to avoid. Login first and then open the developer console, open the page, and capture the HAR file.

    bug 
    opened by prestomation 23
  • Allow multiple CPAP devices to be tracked

    Allow multiple CPAP devices to be tracked

    Is your feature request related to a problem? Please describe. We have multiple CPAP users in our house but this integration is only able to track the 1st machine that was added

    Describe the solution you'd like I would like to be able to monitor multiple CPAP machines

    Describe alternatives you've considered My only work around I've found that remotely works is that if I disable the currently working device and reboot home assistant it will then pick up the second device. This is not really a feasible solution obviously.

    Additional context image

    opened by aurvandel 10
  • Bump pyjwt from 2.1.0 to 2.3.0

    Bump pyjwt from 2.1.0 to 2.3.0

    Bumps pyjwt from 2.1.0 to 2.3.0.

    Release notes

    Sourced from pyjwt's releases.

    2.3.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/jpadilla/pyjwt/compare/2.2.0...2.3.0

    2.2.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/jpadilla/pyjwt/compare/2.1.0...2.2.0

    Changelog

    Sourced from pyjwt's changelog.

    v2.3.0 <https://github.com/jpadilla/pyjwt/compare/2.2.0...2.3.0>__

    Fixed

    
    - Revert "Remove arbitrary kwargs." `[#701](https://github.com/jpadilla/pyjwt/issues/701) <https://github.com/jpadilla/pyjwt/pull/701>`__
    

    Added

    • Add exception chaining [#702](https://github.com/jpadilla/pyjwt/issues/702) <https://github.com/jpadilla/pyjwt/pull/702>__

    v2.2.0 <https://github.com/jpadilla/pyjwt/compare/2.1.0...2.2.0>__

    Changed

    
    - Remove arbitrary kwargs. `[#657](https://github.com/jpadilla/pyjwt/issues/657) <https://github.com/jpadilla/pyjwt/pull/657>`__
    - Use timezone package as Python 3.5+ is required. `[#694](https://github.com/jpadilla/pyjwt/issues/694) <https://github.com/jpadilla/pyjwt/pull/694>`__
    

    Fixed

    - Assume JWK without the &quot;use&quot; claim is valid for signing as per RFC7517 `[#668](https://github.com/jpadilla/pyjwt/issues/668) &lt;https://github.com/jpadilla/pyjwt/pull/668&gt;`__
    - Prefer `headers[&quot;alg&quot;]` to `algorithm` in `jwt.encode()`. `[#673](https://github.com/jpadilla/pyjwt/issues/673) &lt;https://github.com/jpadilla/pyjwt/pull/673&gt;`__
    - Fix aud validation to support {'aud': null} case. `[#670](https://github.com/jpadilla/pyjwt/issues/670) &lt;https://github.com/jpadilla/pyjwt/pull/670&gt;`__
    - Make `typ` optional in JWT to be compliant with RFC7519. `[#644](https://github.com/jpadilla/pyjwt/issues/644) &lt;https://github.com/jpadilla/pyjwt/pull/644&gt;`__
    -  Remove upper bound on cryptography version. `[#693](https://github.com/jpadilla/pyjwt/issues/693) &lt;https://github.com/jpadilla/pyjwt/pull/693&gt;`__
    

    Added

    • Add support for Ed448/EdDSA. [#675](https://github.com/jpadilla/pyjwt/issues/675) &lt;https://github.com/jpadilla/pyjwt/pull/675&gt;__
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
opened by dependabot[bot] 7
  • Login from AU

    Login from AU

    Version of the custom_component

    Latest as of today

    Configuration

    
    Installed via HACS and configured via the devices page.
    
    

    Describe the bug

    I'm located in Australia and unable to login. It just says Unknown error occurred. I'm trying to login with NA. EU also says the same, but to also Please verify via myair2.resmed.com.

    Originally posted this on the HA forums and directed to post a bug here. https://community.home-assistant.io/t/resmed-cpap-sensor-integration-in-hacs/373367/19

    HAR file sent via PM on HA forum.

    Debug log

    Logger: aiohttp.server
    Source: custom_components/resmed_myair/client/new_client.py:236
    Integration: ResMed myAir CPAP Sensors (documentation, issues)
    First occurred: 1:30:09 PM (4 occurrences)
    Last logged: 3:11:50 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 98, 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 78, in ban_middleware
        return await handler(request)
      File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 181, 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 157, 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 110, in post
        result = await self._flow_mgr.async_configure(flow_id, data)
      File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in async_configure
        result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
      File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
        result: FlowResult = await getattr(flow, method)(user_input)
      File "/config/custom_components/resmed_myair/config_flow.py", line 51, in async_step_user
        device: MyAirDevice = await get_device(
      File "/config/custom_components/resmed_myair/config_flow.py", line 31, in get_device
        device = await client.get_user_device_data()
      File "/config/custom_components/resmed_myair/client/new_client.py", line 236, in get_user_device_data
        device = records_json["data"]["getPatientWrapper"]["fgDevices"][0]
    TypeError: 'NoneType' object is not subscriptable
    
    opened by cjsmns 5
  • Bump pyjwt from 2.3.0 to 2.5.0

    Bump pyjwt from 2.3.0 to 2.5.0

    Bumps pyjwt from 2.3.0 to 2.5.0.

    Release notes

    Sourced from pyjwt's releases.

    2.5.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/jpadilla/pyjwt/compare/2.4.0...2.5.0

    2.4.0

    Security

    What's Changed

    ... (truncated)

    Changelog

    Sourced from pyjwt's changelog.

    v2.5.0 <https://github.com/jpadilla/pyjwt/compare/2.4.0...2.5.0>__

    Changed

    
    - Skip keys with incompatible alg when loading JWKSet by @DaGuich in `[#762](https://github.com/jpadilla/pyjwt/issues/762) <https://github.com/jpadilla/pyjwt/pull/762>`__
    - Remove support for python3.6 by @sirosen in `[#777](https://github.com/jpadilla/pyjwt/issues/777) <https://github.com/jpadilla/pyjwt/pull/777>`__
    - Emit a deprecation warning for unsupported kwargs by @sirosen in `[#776](https://github.com/jpadilla/pyjwt/issues/776) <https://github.com/jpadilla/pyjwt/pull/776>`__
    - Remove redundant wheel dep from pyproject.toml by @mgorny in `[#765](https://github.com/jpadilla/pyjwt/issues/765) <https://github.com/jpadilla/pyjwt/pull/765>`__
    - Do not fail when an unusable key occurs by @DaGuich in `[#762](https://github.com/jpadilla/pyjwt/issues/762) <https://github.com/jpadilla/pyjwt/pull/762>`__
    - Update audience typing by @JulianMaurin in `[#782](https://github.com/jpadilla/pyjwt/issues/782) <https://github.com/jpadilla/pyjwt/pull/782>`__
    - Improve PyJWKSet error accuracy by @JulianMaurin in `[#786](https://github.com/jpadilla/pyjwt/issues/786) <https://github.com/jpadilla/pyjwt/pull/786>`__
    - Mypy as pre-commit check + api_jws typing by @JulianMaurin in `[#787](https://github.com/jpadilla/pyjwt/issues/787) <https://github.com/jpadilla/pyjwt/pull/787>`__
    

    Fixed

    
    - Adjust expected exceptions in option merging tests for PyPy3 by @mgorny in `[#763](https://github.com/jpadilla/pyjwt/issues/763) &lt;https://github.com/jpadilla/pyjwt/pull/763&gt;`__
    - Fixes for pyright on strict mode by @brandon-leapyear in `[#747](https://github.com/jpadilla/pyjwt/issues/747) &lt;https://github.com/jpadilla/pyjwt/pull/747&gt;`__
    - docs: fix simple typo, iinstance -&gt; isinstance by @timgates42 in `[#774](https://github.com/jpadilla/pyjwt/issues/774) &lt;https://github.com/jpadilla/pyjwt/pull/774&gt;`__
    - Fix typo: priot -&gt; prior by @jdufresne in `[#780](https://github.com/jpadilla/pyjwt/issues/780) &lt;https://github.com/jpadilla/pyjwt/pull/780&gt;`__
    - Fix for headers disorder issue by @kadabusha in `[#721](https://github.com/jpadilla/pyjwt/issues/721) &lt;https://github.com/jpadilla/pyjwt/pull/721&gt;`__
    

    Added

    • Add to_jwk static method to ECAlgorithm by @​leonsmith in [#732](https://github.com/jpadilla/pyjwt/issues/732) &lt;https://github.com/jpadilla/pyjwt/pull/732&gt;__
    • Expose get_algorithm_by_name as new method by @​sirosen in [#773](https://github.com/jpadilla/pyjwt/issues/773) &lt;https://github.com/jpadilla/pyjwt/pull/773&gt;__
    • Add type hints to jwt/help.py and add missing types dependency by @​kkirsche in [#784](https://github.com/jpadilla/pyjwt/issues/784) &lt;https://github.com/jpadilla/pyjwt/pull/784&gt;__
    • Add cacheing functionality for JWK set by @​wuhaoyujerry in [#781](https://github.com/jpadilla/pyjwt/issues/781) &lt;https://github.com/jpadilla/pyjwt/pull/781&gt;__

    v2.4.0 &lt;https://github.com/jpadilla/pyjwt/compare/2.3.0...2.4.0&gt;__

    Security

    Changed

    
    - Explicit check the key for ECAlgorithm by @estin in https://github.com/jpadilla/pyjwt/pull/713
    - Raise DeprecationWarning for jwt.decode(verify=...) by @akx in https://github.com/jpadilla/pyjwt/pull/742
    

    Fixed

    
    - Don't use implicit optionals by @rekyungmin in https://github.com/jpadilla/pyjwt/pull/705
    &lt;/tr&gt;&lt;/table&gt; 
    </code></pre>
    </blockquote>
    <p>... (truncated)</p>
    </details>
    <details>
    <summary>Commits</summary>
    

    <ul> <li><a href="https://github.com/jpadilla/pyjwt/commit/c9006103b56359b3ad788bb2e380ef17dfe59b05"><code>c900610</code></a> Bump version to 2.5.0 (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/801">#801</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/5ecbafc366ebc4940ce4eac81350bc41887a4433"><code>5ecbafc</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/791">#791</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/f827be366cc2560266a412697b5194ee4782b510"><code>f827be3</code></a> Mypy as pre-commit check + api_jws typing (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/787">#787</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/e8780abdd561963e3b0ca49ecec8b8519a793f75"><code>e8780ab</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/788">#788</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/fc5b94eb3575254caba599218246616c75fecdc7"><code>fc5b94e</code></a> Add cacheing functionality for JWK set (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/781">#781</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/ae3da7469ff8c28b726e082cd671997e09b19d55"><code>ae3da74</code></a> Add type hints to jwt/help.py and add missing types dependency (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/784">#784</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/435e826da56a105da51176355a29cdc00420f4c1"><code>435e826</code></a> Improve PyJWKSet error accuracy (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/786">#786</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/98a5c1d61ee180f5b3574e142f5938d24146ee99"><code>98a5c1d</code></a> Update audience typing (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/782">#782</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/0bef0fbff5c245668578a43774d8620bdba4a6f7"><code>0bef0fb</code></a> Fix for headers disorder issue (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/721">#721</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/c8fda69f09bc293960c141288633fbd1399e0b2b"><code>c8fda69</code></a> Fix typo: priot -&gt; prior (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/780">#780</a>)</li> <li>Additional commits viewable in <a href="https://github.com/jpadilla/pyjwt/compare/2.3.0...2.5.0">compare view</a></li> </ul> </details>

    <br />

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 2
  • Bump pyjwt from 2.3.0 to 2.4.0

    Bump pyjwt from 2.3.0 to 2.4.0

    Bumps pyjwt from 2.3.0 to 2.4.0.

    Release notes

    Sourced from pyjwt's releases.

    2.4.0

    Security

    What's Changed

    New Contributors

    Full Changelog: https://github.com/jpadilla/pyjwt/compare/2.3.0...2.4.0

    Changelog

    Sourced from pyjwt's changelog.

    v2.4.0 <https://github.com/jpadilla/pyjwt/compare/2.3.0...2.4.0>__

    Security

    
    - [CVE-2022-29217] Prevent key confusion through non-blocklisted public key formats. https://github.com/jpadilla/pyjwt/security/advisories/GHSA-ffqj-6fqr-9h24
    

    Changed

    
    - Explicit check the key for ECAlgorithm by @estin in https://github.com/jpadilla/pyjwt/pull/713
    - Raise DeprecationWarning for jwt.decode(verify=...) by @akx in https://github.com/jpadilla/pyjwt/pull/742
    

    Fixed

    
    - Don't use implicit optionals by @rekyungmin in https://github.com/jpadilla/pyjwt/pull/705
    - documentation fix: show correct scope for decode_complete() by @sseering in https://github.com/jpadilla/pyjwt/pull/661
    - fix: Update copyright information by @kkirsche in https://github.com/jpadilla/pyjwt/pull/729
    - Don't mutate options dictionary in .decode_complete() by @akx in https://github.com/jpadilla/pyjwt/pull/743
    
    Added
    
    • Add support for Python 3.10 by @hugovk in https://github.com/jpadilla/pyjwt/pull/699
    • api_jwk: Add PyJWKSet.getitem by @woodruffw in https://github.com/jpadilla/pyjwt/pull/725
    • Update usage.rst by @guneybilen in https://github.com/jpadilla/pyjwt/pull/727
    • Docs: mention performance reasons for reusing RSAPrivateKey when encoding by @dmahr1 in https://github.com/jpadilla/pyjwt/pull/734
    • Fixed typo in usage.rst by @israelabraham in https://github.com/jpadilla/pyjwt/pull/738
    • Add detached payload support for JWS encoding and decoding by @fviard in https://github.com/jpadilla/pyjwt/pull/723
    • Replace various string interpolations with f-strings by @akx in https://github.com/jpadilla/pyjwt/pull/744
    • Update CHANGELOG.rst by @hipertracker in https://github.com/jpadilla/pyjwt/pull/751 </code></pre> </blockquote> </details> <details> <summary>Commits</summary>

    <ul> <li><a href="https://github.com/jpadilla/pyjwt/commit/83ff831a4d11190e3a0bed781da43f8d84352653"><code>83ff831</code></a> chore: update changelog</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/4c1ce8fd9019dd312ff257b5141cdb6d897379d9"><code>4c1ce8f</code></a> chore: update changelog</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/96f3f0275745c5a455c019a0d3476a054980e8ea"><code>96f3f02</code></a> fix: failing advisory test</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/9c528670c455b8d948aff95ed50e22940d1ad3fc"><code>9c52867</code></a> Merge pull request from GHSA-ffqj-6fqr-9h24</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/24b29adfebcb4f057a3cef5aaf35653bc0c1c8cc"><code>24b29ad</code></a> Update CHANGELOG.rst (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/751">#751</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/31f5acb8fb3ec6cdfe2b1b0a4a8f329b5f3ca67f"><code>31f5acb</code></a> Replace various string interpolations with f-strings (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/744">#744</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/5581a31c21de70444c1162bcfa29f7e0fc86edda"><code>5581a31</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/748">#748</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/3d4d82248f1120c87f1f4e0e8793eaa1d54843a6"><code>3d4d822</code></a> Don't mutate options dictionary in .decode_complete() (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/743">#743</a>)</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/1f1fe15bb41846c602b3e106176b2c692b93a613"><code>1f1fe15</code></a> Add a deprecation warning when jwt.decode() is called with the legacy verify=...</li> <li><a href="https://github.com/jpadilla/pyjwt/commit/35fa28e59d99b99c6a780d2a029a74d6bbba8b1e"><code>35fa28e</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://github-redirect.dependabot.com/jpadilla/pyjwt/issues/740">#740</a>)</li> <li>Additional commits viewable in <a href="https://github.com/jpadilla/pyjwt/compare/2.3.0...2.4.0">compare view</a></li> </ul> </details>

    <br />

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 2
  • Register service to force refresh

    Register service to force refresh

    Is your feature request related to a problem? Please describe. At present, there can be an up to 30 minute delay before the data is refreshed after the machine is turned off.

    Describe the solution you'd like It would be useful for there to be a service registered that force refreshed the integration's data, that way it could be triggered via an automation to refresh when the CPAP machine turns off (assuming energy monitoring to monitor that separately). This would allow fresh data to be displayed on dashboards and the like.

    Describe alternatives you've considered There are no alternatives.

    Additional context Add any other context or screenshots about the feature request here.

    opened by blhoward2 2
  • Minor change to instructions to avoid confusion.

    Minor change to instructions to avoid confusion.

    In line 7 of the setup instructions, change "HA" to "HACS".

    This avoids people attempting to add the integration via the normal HA integration menu. (Which it does do, it just doesn't work!)

    In the HACS UI go to "Configuration" -> "Integrations" click "+" and search for "ResMed myAir CPAP Sensors"

    Note: Thanks for making this integration, you're awesome!

    opened by anmghstnet 1
  • Integration not found

    Integration not found

    Hi,

    I was using this integration (EU) to my satisfaction but after I updated it today (via HACS) and restarted it gave me error integration not found. So I removed the integration in HACS, be sure it's removed in .config\custom_components and after reboot I re-added it again followed by another boot. This time no error, integration found in HACS but not in HA. Just no Resmed integration found. What is wrong?

    Screen Shot 2022-01-16 at 12 37 39 Screen Shot 2022-01-16 at 12 45 19
    opened by xfader2018 1
  • Fix integration load on HAOS 2022.04b due to PyJWT

    Fix integration load on HAOS 2022.04b due to PyJWT

    Upgraded pyJWT Also updated the python version used in our github actions, as it seems HAOS required 3.9 now

    Also upgraded the devcontainer, as the one we were using seems to have atrophied

    opened by prestomation 0
  • Add exception/error message when OTP is enabled on an account.

    Add exception/error message when OTP is enabled on an account.

    Users from some countries, like France, have OTP-by-mail turned on by ResMed with no way to disable.

    Detection for this is added in this change, along with a useful error message in the config flow

    opened by prestomation 0
  • Bump pyjwt from 2.3.0 to 2.6.0

    Bump pyjwt from 2.3.0 to 2.6.0

    Bumps pyjwt from 2.3.0 to 2.6.0.

    Release notes

    Sourced from pyjwt's releases.

    2.5.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/jpadilla/pyjwt/compare/2.4.0...2.5.0

    2.4.0

    Security

    What's Changed

    ... (truncated)

    Changelog

    Sourced from pyjwt's changelog.

    v2.6.0 <https://github.com/jpadilla/pyjwt/compare/2.5.0...2.6.0>__

    Changed

    
    - bump up cryptography >= 3.4.0 by @jpadilla in `[#807](https://github.com/jpadilla/pyjwt/issues/807) <https://github.com/jpadilla/pyjwt/pull/807>`_
    - Remove `types-cryptography` from `crypto` extra by @lautat in `[#805](https://github.com/jpadilla/pyjwt/issues/805) <https://github.com/jpadilla/pyjwt/pull/805>`_
    

    Fixed

    
    - Invalidate token on the exact second the token expires `[#797](https://github.com/jpadilla/pyjwt/issues/797) &lt;https://github.com/jpadilla/pyjwt/pull/797&gt;`_
    - fix: version 2.5.0 heading typo by @c0state in `[#803](https://github.com/jpadilla/pyjwt/issues/803) &lt;https://github.com/jpadilla/pyjwt/pull/803&gt;`_
    

    Added

    v2.5.0 &lt;https://github.com/jpadilla/pyjwt/compare/2.4.0...2.5.0&gt;__

    Changed

    • Skip keys with incompatible alg when loading JWKSet by @​DaGuich in [#762](https://github.com/jpadilla/pyjwt/issues/762) <https://github.com/jpadilla/pyjwt/pull/762>__
    • Remove support for python3.6 by @​sirosen in [#777](https://github.com/jpadilla/pyjwt/issues/777) <https://github.com/jpadilla/pyjwt/pull/777>__
    • Emit a deprecation warning for unsupported kwargs by @​sirosen in [#776](https://github.com/jpadilla/pyjwt/issues/776) <https://github.com/jpadilla/pyjwt/pull/776>__
    • Remove redundant wheel dep from pyproject.toml by @​mgorny in [#765](https://github.com/jpadilla/pyjwt/issues/765) <https://github.com/jpadilla/pyjwt/pull/765>__
    • Do not fail when an unusable key occurs by @​DaGuich in [#762](https://github.com/jpadilla/pyjwt/issues/762) <https://github.com/jpadilla/pyjwt/pull/762>__
    • Update audience typing by @​JulianMaurin in [#782](https://github.com/jpadilla/pyjwt/issues/782) <https://github.com/jpadilla/pyjwt/pull/782>__
    • Improve PyJWKSet error accuracy by @​JulianMaurin in [#786](https://github.com/jpadilla/pyjwt/issues/786) <https://github.com/jpadilla/pyjwt/pull/786>__
    • Mypy as pre-commit check + api_jws typing by @​JulianMaurin in [#787](https://github.com/jpadilla/pyjwt/issues/787) <https://github.com/jpadilla/pyjwt/pull/787>__

    Fixed

    
    - Adjust expected exceptions in option merging tests for PyPy3 by @mgorny in `[#763](https://github.com/jpadilla/pyjwt/issues/763) <https://github.com/jpadilla/pyjwt/pull/763>`__
    - Fixes for pyright on strict mode by @brandon-leapyear in `[#747](https://github.com/jpadilla/pyjwt/issues/747) <https://github.com/jpadilla/pyjwt/pull/747>`__
    - docs: fix simple typo, iinstance -> isinstance by @timgates42 in `[#774](https://github.com/jpadilla/pyjwt/issues/774) <https://github.com/jpadilla/pyjwt/pull/774>`__
    - Fix typo: priot -> prior by @jdufresne in `[#780](https://github.com/jpadilla/pyjwt/issues/780) <https://github.com/jpadilla/pyjwt/pull/780>`__
    - Fix for headers disorder issue by @kadabusha in `[#721](https://github.com/jpadilla/pyjwt/issues/721) <https://github.com/jpadilla/pyjwt/pull/721>`__
    

    Added

    • Add to_jwk static method to ECAlgorithm by @​leonsmith in [#732](https://github.com/jpadilla/pyjwt/issues/732) <https://github.com/jpadilla/pyjwt/pull/732>__
    • Expose get_algorithm_by_name as new method by @​sirosen in [#773](https://github.com/jpadilla/pyjwt/issues/773) <https://github.com/jpadilla/pyjwt/pull/773>__
    • Add type hints to jwt/help.py and add missing types dependency by @​kkirsche in [#784](https://github.com/jpadilla/pyjwt/issues/784) <https://github.com/jpadilla/pyjwt/pull/784>__
    • Add cacheing functionality for JWK set by @​wuhaoyujerry in [#781](https://github.com/jpadilla/pyjwt/issues/781) <https://github.com/jpadilla/pyjwt/pull/781>__

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 1
  • Broken in latest home assistant versions

    Broken in latest home assistant versions

    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.
    
    
    opened by Madj42 12
  • EU Login - Unknown error occurred

    EU Login - Unknown error occurred

    Hi there Attempting to add my new EU - MyAir account using the integration installed via HACS. I've tried a few times including reinstalls and restarts.

    HA error log below: I'm outside my ability so I'm not sure how to interpret the below. Does the last line "Attempt to decode JSON with unexpected mimetype" shed any light?

    Thanks David

    This error originated from a custom integration.

    Logger: aiohttp.server Source: custom_components/resmed_myair/client/legacy_client.py:85 Integration: ResMed myAir CPAP Sensors (documentation, issues) First occurred: 9:06:48 AM (1 occurrences) Last logged: 9:06:48 AM

    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 31, in get_device await client.connect() File "/config/custom_components/resmed_myair/client/legacy_client.py", line 85, in connect authn_json = await authn_res.json() File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1103, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: application/xml', url=URL('https://myair.resmed.eu/authenticationids/externalwebservices/restotprequestselect.php')

    opened by DavidBurstein 1
  • Integration does not work when email OTP is enabled on myAir account

    Integration does not work when email OTP is enabled on myAir account

    Version of the custom_component

    VERSION = "0.0.0-dev" in the const.py file Version 0.1.4 from the HACS info page

    Configuration

    no config could be done

    Describe the bug

    i install resmed_myair from HACS, reboot HA, try to install component, put my credentials and got an "Unknown error occurred" i've also created a Har file, if it can help

    Debug log

    Logger: aiohttp.server Source: custom_components/resmed_myair/client/legacy_client.py:92 Integration: ResMed myAir (documentation, issues) First occurred: 14:47:35 (1 occurrences) Last logged: 14:47:35

    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 98, 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 219, 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 164, 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 111, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/config/custom_components/resmed_myair/config_flow.py", line 51, in async_step_user device: MyAirDevice = await get_device( File "/config/custom_components/resmed_myair/config_flow.py", line 31, in get_device device = await client.get_user_device_data() File "/config/custom_components/resmed_myair/client/legacy_client.py", line 92, in get_user_device_data equipment[1].renderContents().decode("utf8").split(" ", 1) IndexError: list index out of range home-assistant.log

    opened by Dorval1 19
  • Solidify beta/release process

    Solidify beta/release process

    Is your feature request related to a problem? Please describe. Today HACS users pull directly from master. There is no good way to test changes with certain users without impacting all users

    Describe the solution you'd like Start publishing prod/prerelease releases, and ask these beta users to use prerelease versions through HACCS

    Describe alternatives you've considered Sending zip files of prerelease files

    Additional context N/A

    opened by prestomation 1
  • Releases(0.1.10)
    Owner
    Preston Tamkin
    Preston Tamkin
    Python Client for ESPHome native API. Used by Home Assistant.

    aioesphomeapi aioesphomeapi allows you to interact with devices flashed with ESPHome. Installation The module is available from the Python Package Ind

    ESPHome 76 Jan 04, 2023
    PBA: Pleco Breeding Assistant

    A small monitor that reports the external, fishroom and water change parameters to have suitable water parameters and induce breeding. These two features already represent 50% of the "reproductive su

    Mirko Mancin 1 Jan 19, 2022
    An emulated LED scoreboard for Major League Baseball ⚾

    An LED scoreboard for Major League Baseball. Displays a live scoreboard for your team's game on that day.

    Tyler Porter 8 Apr 08, 2022
    Sleep Functionality for Adafruit MacroPad RP2040

    Adafruit-MacroPad-RP2040 Sleep Functionality for Adafruit MacroPad RP2040 Details This is a modification of AdaFruit project bundle found here specifi

    9 Dec 18, 2022
    Example Python code for building RPi-controlled robotic systems

    RPi Example Code Example Python code for building RPi-controlled robotic systems These python files have been compiled / developed by the Neurobionics

    Elliott Rouse 2 Feb 04, 2022
    BMP180 sensor driver for Home Assistant used in Raspberry Pi

    BMP180 sensor driver for Home Assistant used in Raspberry Pi Custom component BMP180 sensor for Home Assistant. Copy the content of this directory to

    747Developments 1 Dec 17, 2021
    The ABR Control library is a python package for the control and path planning of robotic arms in real or simulated environments.

    The ABR Control library is a python package for the control and path planning of robotic arms in real or simulated environments. ABR Control provides API's for the Mujoco, CoppeliaSim (formerly known

    Applied Brain Research 277 Jan 05, 2023
    Mini Pupper - Open-Source,ROS Robot Dog Kit

    Mini Pupper - Open-Source,ROS Robot Dog Kit

    MangDang 747 Dec 28, 2022
    Extremely simple PyBadge examples to demonstrate different aspects of CircuitPython using PyBadge hardware.

    BeginnerPyBadge I purchased a PyBadge recently. I'm new to hardware. I was surprised how hard it was to find easy examples demonstrating how different

    Rubini LaForest 2 Oct 21, 2021
    CO2Ampel - This RaspberryPi project uses weather data to estimate the share of renewable energy in the power grid

    CO2Ampel This RaspberryPi project uses weather data to estimate the share of ren

    Felix 4 Jan 19, 2022
    Open source home automation that puts local control and privacy first.

    Home Assistant Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiast

    Home Assistant 57k Jan 01, 2023
    Small Robot, with LIDAR and DepthCamera. Using ROS for Maping and Navigation

    🤖 RoboCop 🤖 Small Robot, with LIDAR and DepthCamera. Using ROS for Maping and Navigation Made by Clemente Donoso, 📍 Chile 🇨🇱 RoboCop Lateral Fron

    Clemente Donoso Krauss 2 Jan 04, 2022
    Software framework to enable agile robotic assembly applications.

    ConnTact Software framework to enable agile robotic assembly applications. (Connect + Tactile) Overview Installation Development of framework was done

    Southwest Research Institute Robotics 29 Dec 01, 2022
    ArduinoWaterHeaterIOT - IoT Probe of a solar PV water heating system - Arduino, Python, MQTT, MySQL

    ArduinoWaterHeaterIOT IoT Probe of a solar PV water heating system - Arduino, Raspberry Pi, Python, MQTT, MySQL The Arduino sends the AC and DC watts

    Jacques Fourie 1 Jan 11, 2022
    The project is an open-source and low-cost kit to get started with underactuated robotics.

    Torque Limited Simple Pendulum Introduction The project is an open-source and low-cost kit to get started with underactuated robotics. The kit targets

    34 Dec 14, 2022
    A dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc. written in Python

    Weather Clock for Raspberry PI This project is a dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc.

    Markus Geiger 1 May 01, 2022
    A python module for interacting with rolimon's, a roblox value site.

    rpi - rolimon's python interaction rpi is an open source python-based rolimon's api wrapper. It provides an end-to-end pipeline in which each componen

    Acier 11 Nov 08, 2022
    A ESP32 project template with a web interface built in React

    ESP AP Webserver demo.mp4 This is my experiment with "mobile app development" for the ESP32. The project consists of two parts, the ESP32 code and the

    8 Dec 15, 2022
    🐱 Petkit feeder components for HomeAssistant

    Petkit for HomeAssistant Installing Download and copy custom_components/xiaomi_miot folder to custom_components folder in your HomeAssistant config fo

    62 Dec 29, 2022
    AERO 421: Spacecraft Attitude, Dynamics, and Control Final Project.

    AERO - 421 Final Project Redevelopment Spacecraft Attitude, Dynamics, and Control: Simulation to determine and control a satellite's attitude in LEO.

    Gagandeep Thapar 3 Dec 16, 2022