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
myair.resmed.eu #2
Comments
Hello, Thanks for opening the issue! I'm unable to test this or gather the required information because I do not have an EU resmed device. These can be obtained by examining what the myAir web site does when logging in. If you are not then here's how you can help:
For step 4, here are some instructions for Chrome: https://support.google.com/admanager/answer/10358597?hl=en I created an EU account just now and the UI looks a little different. There is some risk that EU works differently under the hood, we shall know when we get the HAR file. 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. |
Hi |
This is great, thanks! Unfortunately my suspicion was correct and the EU system is totally different. I think I can make this work though. Can you take one more HAR file? Do the same thing, but load the equipment page. I think it's this one: https://myair.resmed.eu/myAccountEquipment.aspx |
myAir web - Google Chrome 2022-01-04 09-06-20.zip |
Looking forward for the EU version as well. Let me know if you need info from my side as well. |
Thank @gkrallo , this helps! @xfader2018 Great thank you. I'm hoping to have something up tonight(US time) for you two to test. |
@prestomation Great! Nice job. Yes I am looking to use this in HA. I deleted my comment because replied with login problem because of EU version before I saw it was already issued here. |
Ok great! I suspect that other repo will work in the EU if the URL and maybe some other values are changed. I am taking that scraper code for the EU support here. Looks like myAir has rebuilt their website but have only deployed it in the US. I suspect at some point EU will switch as well and we will have to change this package to treat them the same. |
This change adds experimental EU support. This is difficult for me to test as I do not have an EU-registered device, but this should work based upon information gathered from the community in the associated issue. Please report success or failures(along with associated logs) to issue #2 in the repo
@gkrallo and @xfader2018 Please try the latest version. When you add the integration you can now select NA or EU. This is another reminder that I don't have access to an EU device, but I did as much testing as I could using the data from @gkrallo . Please let me know how it works. If there is an error, please report back all resmed-related log entries in the HA log. Collecting another HAR file of your dashboard will also help greatly as this should help me test any failures related to edge cases I did not account for. If you're already downloaded the repo, you may need to click on it in HACS and select "Update Information" to get it to see the newest change. |
Nice! Ok I will look at this. Is the CPAP data you are seeing accurate for last night or is it dec31 data? |
It's the data that also belongs to dec31 so that is correct and not mixed up. It's just not up-to-date. 😉 |
Sorry about that. I've pushed another change. You'll need to 'Update Information' again and upgrade. |
[image: image.png]
[image: image.png]
sensor.cpap_usage_minutes something with the scaling?
Den ons 5 jan. 2022 kl 09:00 skrev Preston Tamkin ***@***.***
…:
Sorry about that. I've pushed another change. You'll need to 'Update
Information' again and upgrade.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXCAABPUMNPP7VF52HV4443UUP3CZANCNFSM5LGD4ZZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
4january.zip |
Oh I see. It's returning hours where US is returning minutes. This was impossible to tell looking at the raw data. I've pushed a fix for this |
Oh whoops 😳 I've pushed another change for the time. for the last date recorded, the integration reports the day as a date, which I think is a better representation than just a string as then you can pass it to automations that expect a date. It is home assistant that decides to show the entire thing. For showing on a dashboard or something it might be best to use your own template to parse out the date in the format that works best for you but I will look more to see if there is a better way to handle dates in HA |
yay! I'm glad others are finding value out of my new year side project! |
Having same problem now after some reboots. Entities became unavailable. Friend of mine has same issue and error. this is in log:
|
I'm the friend xfade mentioned. |
Sorry folks, this is difficult because I don't have access to an EU device. I'm assuming xfader2018 uses his CPAP every day, but you two do not :) Some days had no usage data which is reported as "" instead of 0. I've pushed a fix, so please update through HACS again |
Hi, no worries at all, I'm glad there is some movement and stuff is happening ;) |
I see. Do folks here have feedback on how they would like the integration to work on days the CPAP has no data? It is kind of a deceptively hard problem because of how CPAP data works and how HA works. Do we want it to continue to report the last complete day? If we do this, then when you miss a CPAP day the sensors will still report the last complete day, but the Date sensor will tell you it is behind. Does that make sense? How would people like it to work? |
When I check on EU website on calender view, on a day when device was not used, all values are displayed 0 and it says 'your device has not been used this night', in local language. I think it's best to put 0's in HA on days it has no data, this kind of reflects the behaviour of the myAir website. Also it puts in date/timestamps in influxdb behind HA, so I do get values (even if they are 0) in grafana graphs based on that data. |
got it. so this is what is already happening then right? although I suspect the date sensor is updating to today when it should still list yesterday |
myair.resmed.eu_7 january.har.zip |
I guess on the website it's round off in hours, so 48 minutes is approx 0.45 hour ? Anyway, I created a value template in HA to convert the exact minutes to HH:MM
|
I think something is missing, if it is under 60? ( and yes I might need to glue the mask to the face so I use it mor than 60 minutes.... ) |
What do you all think about this?:
Does this make sense? Feel free to suggest better names too! |
Hi
I will most likely only view used time, maybe with some color conditions if
it is old.
but I dont think seconds in this case is of interest for anyone?
so HH:MM instead of HH:MM:SS for the usage time.
kindly
kp
Den lör 8 jan. 2022 10:06Preston Tamkin ***@***.***> skrev:
… What do you all think about this?:
[image: image]
<https://user-images.githubusercontent.com/845970/148638537-485e3c16-7fba-4c0e-9417-1463111ec771.png>
CPAP Usage Time is a new sensor that is of the format HH:MM:SS so not
everyone has to make their own template sensor. This is the same conversion
you are all doing above from the usageMinutes sensor.
CPAP Sleep Data Last Collected is new, and is the point in time that your
CPAP last reported new data. This will update once per day, I'm assuming
only on days that you have used your CPAP. Not sure how useful this will
be, but it gives you an idea of when your cpap usually communicates
CPAP Most Recent Sleep Date is new. This is the last day for which data
exists. This will also update once a day if you use your CPAP every day.
But if you stop using your CPAP this sensor will stop updating. This can be
used to write automations to remind you to use your cpap if you didn't use
it the day before or something like that
CPAP Current Data Date is what we used to call Last Sleep Date Recorded.
This is the date to which the other current sensors applies. So this will
always update every day, even when you have used your cpap. This changing
can be used to know when the next days data is being read .This will be
more accurate then watching the data sensors change, because it is
technically possible for any of those to stay the same day after day
Does this make sense? Feel free to suggest better names too!
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXCAABKTK64HB25YVQ4DFRLUU75CVANCNFSM5LGD4ZZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Regarding "one show 48 minutes the other 45 ?" Yes ResMed is returning 0.8 hours(which is 48 minutes) but it appears they do some rounding to show on the UI Yes makes sense, we don't have the precision of seconds anyway so will adjust |
I've pushed this change. Please let me know if you have issues |
I'm taking no news as good news, but please don't hesitate to reopen or open a new issue if anyone on the thread has any issues. Thanks! |
@prestomation I believe the EU site code has been changed within the last week (I've noticed subtle visual differences on the mobile site login too), and my data is no longer pulling into HA: I have attached a HAR file as explained above: Please let me know if there is any other information that I can provide to help resolve this issue. Many thanks, |
This is due to the fact that Resmed enabled 2FA in more and more countries. See issue for possible workaround. |
@xfader2018 thanks for your comment. If the workaround is to create a new account in a non-2fa country, I'll not do this and hope for a proper fix - I'd prefer not to lose my account history, and surely ResMed will be imminently rolling out 2fa to the rest of the countries anyway! |
Im new in HA but found this integration, and found out to late that it not was for eu.
I can try to test if that will be an featur in the future
The text was updated successfully, but these errors were encountered: