Open 48mWsPK opened 4 months ago
The issue also occurs when reloading an existing integration.
I delved a little into the error and the issue is here: https://github.com/Andre0512/pyhOn/blob/63752e13d6c8e74284ad72e04306e9fedde58b40/pyhon/connection/auth.py#L123 The response for redirect link is now differs from expected.
I've got the exact same issue since today. I'll be able to try something for this on Thursday sadly.
same here - Haier did some extra redirection I guess to kill existing intergation.
Also same here after reloading the integration
the same :(
same also for me
Hi, @all!
To be honest - I am kind of worried what is happening to @Andre0512 : His last comments are dated end of March, and last activity on GitHub is from April:
I hope all is good for Andre.
@leits - any ideas what we can change to make this work?
Any Python expert here? I specialise in Java so code in auth.py is kind of spagetti code for me. in line:
url = f"{const.AUTH_API}/services/oauth2/authorize/expid_Login?{params_encode}"
async with self._request.get(url) as response:
text = await response.text()
text is now:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<script>
function redirectOnLoad() {
if (this.SfdcApp && this.SfdcApp.projectOneNavigator) { SfdcApp.projectOneNavigator.handleRedirect('/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAZChOZbAMDAwMDAwMDAwMDA...'); } else
if (window.location.replace){
window.location.replace('/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAZChOZbAMDAw....');
} else {
window.location.href ='/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAZChOZbAMDAwMDAwMDA....';
}
}
redirectOnLoad();
</script>
</head>
</html>
so it clearly does not have:
url = '(.+?)
any idea how it looked before ?
I tried to redirect like:
redirect2 = re.findall("window.location.replace\('(.+?)'", text)
async with self._request.get(f"{const.AUTH_API}" + redirect2[0], allow_redirects=True) as response:
text2 = await response.text()
but It return main login HTML page. Any idea how it worked before - I dont think anyone despite of Andre would know. Kinda bummer.
Does anyone of you have v0.14.0-beta.7 installed and can tell if the same error occurs? A push API has been implemented there, maybe it will solve our error.
the problem is not with hon but with pyhon lib underneath hon.
Does anyone of you have v0.14.0-beta.7 installed and can tell if the same error occurs? A push API has been implemented there, maybe it will solve our error.
I tried this just in case, but no, not working using this version for me
2024-07-10 11:55:45.400 ERROR (MainThread) [pyhon.connection.auth] hOn Authentication Error
1 200 - https://account2.hon-smarthome.com/hOnRedirect?startURL=/setup/secur/RemoteAccessAuthorizationPage.apexp?sourcexxxx
ERROR - 200 - https://account2.hon-smarthome.com/hOnRedirect?startURL=/setup/secur/RemoteAccessAuthorizationPage.apexp?sourcexxxx
if (this.SfdcApp && this.SfdcApp.projectOneNavigator) { SfdcApp.projectOneNavigator.handleRedirect('/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsourcexxxx'); } else
window.location.replace('/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsourcexxxx');
window.location.href ='/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsourcexxxxx';
2024-07-10 11:55:45.401 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry xxxxx@gmail.com for hon
File "/config/custom_components/hon/__init__.py", line 34, in async_setup_entry
hon = await Hon(
File "/usr/local/lib/python3.12/site-packages/pyhon/hon.py", line 77, in create
File "/usr/local/lib/python3.12/site-packages/pyhon/hon.py", line 104, in setup
File "/usr/local/lib/python3.12/site-packages/pyhon/connection/api.py", line 86, in load_appliances
async with self._hon.get(f"{const.API_URL}/commands/v1/appliance") as resp:
File "/usr/local/lib/python3.12/contextlib.py", line 210, in __aenter__
File "/usr/local/lib/python3.12/site-packages/pyhon/connection/handler/base.py", line 64, in get
File "/usr/local/lib/python3.12/contextlib.py", line 210, in __aenter__
File "/usr/local/lib/python3.12/site-packages/pyhon/connection/handler/hon.py", line 75, in _intercept
File "/usr/local/lib/python3.12/site-packages/pyhon/connection/handler/hon.py", line 64, in _check_headers
File "/usr/local/lib/python3.12/site-packages/pyhon/connection/auth.py", line 256, in authenticate
File "/usr/local/lib/python3.12/site-packages/pyhon/connection/auth.py", line 104, in _load_login
File "/usr/local/lib/python3.12/site-packages/pyhon/connection/auth.py", line 128, in _introduce
File "/usr/local/lib/python3.12/site-packages/pyhon/connection/auth.py", line 96, in _error_logger
raise exceptions.HonAuthenticationError("Can't login")
pyhon.exceptions.HonAuthenticationError: Can't login
Does anyone of you have v0.14.0-beta.7 installed and can tell if the same error occurs? A push API has been implemented there, maybe it will solve our error.
Same issues with betas:
Try last beta same issue
Il Mer 10 Lug 2024, 13:39 DarkStar @.***> ha scritto:
Does anyone of you have v0.14.0-beta.7 https://github.com/Andre0512/hon/releases installed and can tell if the same error occurs? A push API has been implemented there, maybe it will solve our error.
Same issues with betas:
image.png (view on web) https://github.com/Andre0512/hon/assets/134559937/e06bb1b8-85a4-4b3b-9b1d-17e9ba80d0e3
ā Reply to this email directly, view it on GitHub https://github.com/Andre0512/hon/issues/230#issuecomment-2220292909, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXSCLWNBDLEW4EAWEDCAPTTZLUMORAVCNFSM6AAAAABKS2LP4OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRQGI4TEOJQHE . You are receiving this because you commented.Message ID: @.***>
@zawadzkipiter , where can I find the pyhOn auth.py file?
So https://github.com/Andre0512/pyhOn/pull/29 fixes the login in the python package for me I tried folding that into a fork version of the integration for folks to use, but I'm not really sure what I am doing there :D
Anyway, these small changes should work for you https://github.com/Andre0512/pyhOn/pull/29/files
And the python package is installable via pyhOn @ git+https://github.com/addshore/pyhOn.git@3f39be53f31885fb84d72f91fb4123c2e39e7156
I'm having the exact same issue on both 0.13 and 0.14 beta 7
@addshore hero! How did you reach Andre ?
So Andre0512/pyhOn#29 fixes the login in the python package for me I tried folding that into a fork version of the integration for folks to use, but I'm not really sure what I am doing there :D
Anyway, these small changes should work for you https://github.com/Andre0512/pyhOn/pull/29/files And the python package is installable via
pyhOn @ git+https://github.com/addshore/pyhOn.git@3f39be53f31885fb84d72f91fb4123c2e39e7156
@addshore , on my end fails with:
usage: pyhOn [-h] [-u USER] [-p PASSWORD] [-i [IMPORT]] COMMAND ... pyhOn: error: argument COMMAND: invalid choice: '@' (choose from 'keys', 'export', 'translate')
@addshore , on my end fails with:
usage: pyhOn [-h] [-u USER] [-p PASSWORD] [-i [IMPORT]] COMMAND ... pyhOn: error: argument COMMAND: invalid choice: '@' (choose from 'keys', 'export', 'translate')
Sorry, this is how you would define pyhOn in integration See https://github.com/addshore/hon/commit/c5cff776ee5d6cb331f94714077b259f78818a00 for example I'm not actually sure the best way to update this within HA just yet :)
same issue to me after I have updated HA to the last core 1h ago and restarted
LE - did someone tried to reset the pass in HOS web site and delete the integration and re-added in HASS?
@addshore , on my end fails with: usage: pyhOn [-h] [-u USER] [-p PASSWORD] [-i [IMPORT]] COMMAND ... pyhOn: error: argument COMMAND: invalid choice: '@' (choose from 'keys', 'export', 'translate')
Sorry, this is how you would define pyhOn in integration See addshore@c5cff77 for example I'm not actually sure the best way to update this within HA just yet :)
@addshore, I manually edited /usr/lib/python3.12/site-packages/pyhon/connection/auth.py with your changes,
and the washing machine can be query:
however, Haier integration still fails to setup:
and log details:
Note: I never had this integration installed before. Founded it yesterday, when the issue was there already.
same here
same issue to me after I have updated HA to the last core 1h ago and restarted
LE - did someone tried to reset the pass in HOS web site and delete the integration and re-added in HASS?
Most probably it will have the same result. I never used this integration before, and have the issue, even after manually applying @addshore "fix" on pyhOn. Ref: https://github.com/Andre0512/pyhOn/pull/29/files
I think ill wait for pyhon version officially went up to 0.17.5.
I tried that changes but didnt get it to run.
I bypassed the login process for now and injected the "access_token" "refresh_token" text manually in the auth.py. that works for now.
So, I https://github.com/addshore/hon/commit/c5cff776ee5d6cb331f94714077b259f78818a00 currently installed, and it all appears to be working for me now, but it did require an additional restart of HA too?
If you want to do this the "easy" way, you can add https://github.com/addshore/hon
as a custom HACS repo, and then use the 0.14.0-beta.8-addshore
release that should be available, which has the updated python dependency.
Or you can go for what @dm-christian mentioned above.
Ultimately, i dont plan on maintaining this fork / release / repo, so I hope it gets released here too :)
It was kind of out of the fact that my climate automations stopped working ....
Well i just tried it out with the information here. If someone want to bypass it instead of doin it the right way:
If you manualy log into the given URL in
.... window.location.replace('/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAZChOZbAMDAw....'); ....
you get back this html with
window.location.replace('hon://mobilesdk/detect/oauth/done#access_token=xxxxxxxx.....
in it. grab this url and update the auth.py:
async def _get_token(self) -> bool: self._parse_token_data('hon://mobilesdk/detect/oauth/done#access_token=xxxxxxxxxxxxxxxxxxxx&refresh_token=xxxxxxxxxxxxxxxxx ...') return True
and
async def authenticate(self) -> None: self.clear() try: if not await self._get_token(): raise exceptions.HonAuthenticationError("Can't get token") if not await self._api_auth(): raise exceptions.HonAuthenticationError("Can't get api token") except exceptions.HonNoAuthenticationNeeded: return
Thats quite hacky for sure :)
Your beta is not working on my end:
logs:
This error originated from a custom integration.
Logger: pyhon.connection.auth
Source: custom_components/hon/__init__.py:34
integration: Haier hOn (documentation, issues)
First occurred: 16:55:23 (1 occurrences)
Last logged: 16:55:23
hOn Authentication Error 1 200 - https://account2.hon-smarthome.com/hOnRedirect?startURL=/setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAZCiE8UBMDAwMDAwMDAwMDAwMDAwAAAA-jAe22-s8U9nfJq7CMUyE9-a5-Y59Cs9IrEEwKHVM9OOQ_Py1thaLqdxLgpexHh7zeFa1x1-Ya47ORlpEuU2VthP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k3LAOVD045EMwsuOH59J5SL9XCeny0UEKHVF-5ME18HM3XatEgwD9I7YAMoEiZ3N5CXCp0kTEMEZe2lWNPcFSapYtl4Mn2j7jNFee9JA5w5zCpF5Lib0PWz-N6UZUacG5qugVpUC1al-L-r71oMlkj_2s3GMCtGMishzbi_C_Tzktl5S8Fh2Z_J647wAYfPYhgQP3iBzFV33cLl-x1nnWrYEMhqZa1EGi0Msb58bfEV2t0ta132ZFxE-yWbb0o25ON0ZOtFsDc_54vdNVZ_IhSDj_qz4OFVQP2TrGbIuKkApHSglPQCzoxbf2Cq2Q3FxFlpFvbBLmOPiphGzTkhh5DHOTKAYgXYZ9niaKib8gLIGmgJu2hOK7BVYxWxwx-jIL0wRr_wVknW6NvXQNwq2Dw3wWUpbPEWBMUCjU8QZKG35X-fQeAkS4paX3RKzbXVM4_jYpqbF2zg_GvXQQqfukt0fcS9EA31dUhQwb0Hiy8egrFtzqA1PT7yC6jqooLw110fiNzz8hSj66A%253D%253D%26display%3Dtouch =============== Response =============== <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> <script> function redirectOnLoad() { if (this.SfdcApp && this.SfdcApp.projectOneNavigator) { SfdcApp.projectOneNavigator.handleRedirect('/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAZCiE8UBMDAwMDAwMDAwMDAwMDAwAAAA-jAe22-s8U9nfJq7CMUyE9-a5-Y59Cs9IrEEwKHVM9OOQ_Py1thaLqdxLgpexHh7zeFa1x1-Ya47ORlpEuU2VthPDj9xsd6_J88xcW-yTPflUii9SWvs5WbiY6OqTf_KcVBuvvG_Vxr2l-F9X9bYDTu0t2ZNlL0kqlXLSdT_sPQMhbLDBKzEcKi1pWq4-Hpqn4Qh4rt3AZH_JZeKSMZrvjTdQkqe5-mdZQ-xcUC8C0D5AJvz8Cm9k3LAOVD045EMwsuOH59J5SL9XCeny0UEKHVF-5ME18HM3XatEgwD9I7YAMoEiZ3N5CXCp0kTEMEZe2lWNPcFSapYtl4Mn2j7jNFee9JA5w5zCpF5Lib0PWz-N6UZUacG5qugVpUC1al-L-r71oMlkj_2s3GMCtGMishzbi_C_Tzktl5S8Fh2Z_J647wAYfPYhgQP3iBzFV33cLl-x1nnWrYEMhqZa1EGi0Msb58bfEV2t0ta132ZFxE-yWbb0o25ON0ZOtFsDc_54vdNVZ_IhSDj_qz4OFVQP2TrGbIuKkApHSglPQCzoxbf2Cq2Q3FxFlpFvbBLmOPiphGzTkhh5DHOTKAYgXYZ9niaKib8gLIGmgJu2hOK7BVYxWxwx-jIL0wRr_wVknW6NvXQNwq2Dw3wWUpbPEWBMUCjU8QZKG35X-fQeAkS4paX3RKzbXVM4_jYpqbF2zg_GvXQQqfukt0fcS9EA31dUhQwb0Hiy8egrFtzqA1PT7yC6jqooLw110fiNzz8hSj66A%3D%3D'); } else if (window.location.replace){ window.location.replace('/NewhOnLogin?display=touch%2F&ec=302&startURL=%2F%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAZCiE8UBMDAwMDAwMDAwMDAwMDAwAAAA-jAe22-s8U9nfJq7CMUyE9-a5-Y59Cs9IrEEwKHVM9OOQ_Py1thaLqdxLgpexHh7zeFa1x1-Ya47ORlpEuU2VthPDj9xsd6_J88xcW-yTPflUii9SWvs5WbiY6OqTf_KcVBuvvG_Vxr2l-F9X9bYDTu0t2ZNlL0kqlXLSdT_sPQMhbLDBKzEcKi1pWq4-Hpqn4Qh4rt3AZH_JZeKSMZrvjTdQkqe5-mdZQ-xcUC8C0D5AJvz8Cm9k3LAOVD045EMwsuOH59J5SL9XCeny0UEKHVF-5ME18HM3XatEgwD9I7YAMoEiZ3N5CXCp0kTEMEZe2lWNPcFSapYtl4Mn2j7jNFee9JA5w5zCpF5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NVZ_IhSDj_qz4OFVQP2TrGbIuKkApHSglPQCzoxbf2Cq2Q3FxFlpFvbBLmOPiphGzTkhh5DHOTKAYgXYZ9niaKib8gLIGmgJu2hOK7BVYxWxwx-jIL0wRr_wVknW6NvXQNwq2Dw3wWUpbPEWBMUCjU8QZKG35X-fQeAkS4paX3RKzbXVM4_jYpqbF2zg_GvXQQqfukt0fcS9EA31dUhQwb0Hiy8egrFtzqA1PT7yC6jqooLw110fiNzz8hSj66A%3D%3D'; } } redirectOnLoad(); </script> </head> </html> ========================================
I will try @dm-christian approach
Update1: Still the same issue. My assumption is if you have the integration already installed, this will work. If not... wait for @Andre0512 to fix it or use other integrations.
Update2: Integration: https://github.com/gvigroux/hon works without issues
Update2: Integration: https://github.com/gvigroux/hon works without issues !
Oh thats good to hear.
Just looked into it. It doesnt rely on pyhon for the login process. its using a different approach to authenticate.
If @addshore's changes are to be used, it looks like @Andre0512 needs to take in the changes.
Or we need a proper pyhOn fork for this to work.
If there is a fork of pyhOn with a different name at pypi.org - https://pypi.org/project/pyhOn/ , and a hon fork that refences the forked pyhOn python library - things can get moving again.
Seems the most reasonable course of action given how Andre has dissapeared and there is no activity from him for months now.
Anyone up for the task?
Update2: Integration: https://github.com/gvigroux/hon works without issues !
Oh thats good to hear.
Just looked into it. It doesnt rely on pyhon for the login process. its using a different approach to authenticate.
As mentioned above, @addshore changes on auth.py worked for me (pyhOn command + authentication, returned values), but the problem was with Haier integration.
the fix is done, but it needs the owner approval
Is possible to have a recap what i do to fix manually?
Tnx
Il Mer 10 Lug 2024, 18:50 Alex @.***> ha scritto:
the fix is done, but it needs the owner approval
ā Reply to this email directly, view it on GitHub https://github.com/Andre0512/hon/issues/230#issuecomment-2221009750, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXSCLWJZMYMCBQRUQGHVXPDZLVQ6NAVCNFSM6AAAAABKS2LP4OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRRGAYDSNZVGA . You are receiving this because you commented.Message ID: @.***>
@Z4RR0 hon HomeAssistant integration relies on pyhOn. @addshore has a fix for pyhOn, but that needs to get pulled by Andre.
Otherwise, the path is fork pyhOn on pypi.org with a different name, adjust a fork of hon HA integration to use the forked pypi module, and everything should work.
@Andre0512, is I see. There is an action for you to do to fix this issue. I have the same, could you please pull this?
the issue is that the owner is not active since April...
I've tried another integration (mentioned by @dm-christian): https://github.com/gvigroux/hon for now it's a good alternative. there aren't some sensors, but I think it's sufficient for me: and there are some services I don't remember in Andre integration: I have to change some of my node-red flows, but it looks better for my solution - in one call_service I can set temperature, fan speed and direction,
I have tried https://github.com/gvigroux/hon but login fail
I'd uninstalled Andre integration prior to new haier integration (they use the same folder custom_integration/hon) - maybe this is a clue.
Me too don't work
Well, I am a bit lost... The hOn integration has been working for me, however, I noticed some time ago that the ambient temperature is not being updated automatically even after a few minutes. It updates on a param change (e.g. increase temperature, change the direction angle etc.). I assumed I could play with different versions to compare results. After I restarted the core, I lost hOn.
So, I was fighting with different versions also with the latest v0.14.0-beta.8-addshore the entire afternoon today, but always failed to login. At about 4 pm I decided to give a downgraded version of the core a try, and, to my surprise, the integration has got recovered. I had then v0.14.0-beta.8-addshore. Finally, I restored all settings to the newest, now, I am running the latest core, and it is all fine š¤
Can it be so that Haier plays somehow badly during the day?
Can it be so that Haier plays somehow badly during the day?
Well Haier definetly likes to play with the community as we saw how they treatened Andre for his work.
I think they pushed him so hard around that he is scared to work on the project again so the community has to solve this kind of problems by there own.
For now im glad that my hacky solution works for me. I have 7 AC Devices that work well with my automations. I was worried yesterday then they just disappeared in my home assistant after i restarted it.
I hope that one with the right amount of python knowledge will fix it and makes the integration work out of the box again.
But im pretty sure that this was not the last time Haier tries to mess up this solution. Its a shame. The products are working but the try to keep the controller in the box they made. This shitty hOn App that is slow and buggy as hell. I rather use the IR remotes than this peace of crap.
@dm-christian how did you fixed? I've tried v0.14.0-beta.8-addshore even downgrade core but still no luck
Just modified manifest.json of v0.13.0 by changing the pyhOn requirements to what @addshore updated:
"requirements": [
"pyhOn @ git+https://github.com/addshore/pyhOn.git@3f39be53f31885fb84d72f91fb4123c2e39e7156"
],
At the moment, the integration works fine for me on both old 2024.6.4 and new 2024.7.2 cores,
which confirms perhaps what has already been said - the issue is in pyhOn. Having that version set, I hope for automatic state updates. We'll see. I eventually accept one minute delay, but let it happen.
There is a setting "iot_class": "cloud_polling"
in v13 compared to "iot_class": "cloud_push"
to be found since v14. I'm pretty lame in programming such things, if you could please answer, whether it is a key setting for the updates or not only that, or even not at all.
@jm314159 pyHon need to manual install after the manifest edit?
@jm314159 pyHon need to manual install after the manifest edit?
I edited the manifest locally, then uploaded all files to /config/custom_components/hon
, removed /config/custom_components/hon/__pycache__
, and restarted HA core.
@jm314159 thank this work for me but I have to downgrade ha core and then work also with up to date core
So far non of those trick didn't help... :(
As mentioned few days back, in my case, https://github.com/gvigroux/hon worked. It is poor in features, but at least I was able to see my washing machine.
@dm-christian how did you fixed? I've tried v0.14.0-beta.8-addshore even downgrade core but still no luck
I did not fix the problem i bypassed it. you need to follow my instructions. Log in to get your access key and edit the auth.py.
As i saw today the "refresh token" mechanism fails in this hack. So after 2 days it logs me out and doesnt connect from it self again.
Ill try another aproach today.
Hi Guys, is there any plan to fix this? Make a temporary repository and issue a fix there?
Describe the bug Trying to setup a newly created non-Gmail account results in hOn Authentication Error 1 200 - https://account2.hon-smarthome.com/hOnRedirect?startURL=/setup/secur/RemoteAccessAuthorizationPage.apexp?source....
To Reproduce Steps to reproduce the behavior:
Expected behavior Successfully setup the hOn HA integration
Screenshots
Environment (please complete the following information):
2024.7.1
v0.13.0
andv0.14.0-beta7
Additional context n/a
Home Assistant Logs Check
System
->Logs
if you can find any logs related to this integration and post it here.Device Log
Data Archive For further analysis, please add your appliance data archive here (if available) Navigate to
Settings
->Device & Services
->Haier hOn
-> your device and press the Create Data Archive button. Then open notifications to download the data zip archive. To attach the file: