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
Can't login to dyson_cloud #42
Comments
I'm not sure what causes this. What is the environment your HA runs on? |
Centos 7.9.2009 (Core) |
Sorry I cannot reproduce this problem. I'll try to setup a VM. |
Installed hass in a docker container and now it works |
Having more or less the same error when installing Dyson Cloud. (Dyson local is present in HACS, but not installed in HA. Getting: Error handling request (might it have something to to with the two-phase autentication Dyson has put in in the app? You now have to add not only your email and password but also a code that, during login, is sent to you via email.) |
@FransHalsjes see #59. |
I am seeing the “Failed to connect” error as soon as I enter my e-mail address as well. My config is as follows: Home Assistant OS 6.3 on Raspberry Pi 4 I have debug logs enabled, but nothing appears to get logged when this happens. |
I'm also getting this. core-2021.9.6 on FreeBSD 12. I believe it's related to their CloudFlare configuration.
If I visit "https://appapi.cp.dyson.com" in my browser, I get a page generated by CloudFlare: Error 1020 Ray ID: 68e28170a8b5640a • 2021-09-13 15:45:57 UTC This website is using a security service to protect itself from online attacks. |
I am having a similar issue, and I have tried to isolate the problem by removing from the equation the HA part, even using the command line tool
I have run the command line directly from inside the RBP using the supervisor shell and from my Mac OS running:
same results in both environments... HTH |
The original response had me thinking I was somehow being blocked by CloudFlare (https://appapi.cp.dyson.com is indeed a 403 generated by them), but in fact I was not. I had planned to try again later with a different IP address, but came back to it recently and tried over several VPNs and public networks with the same result. I then realized that a
Actually returned JSON, so, I wasn't actually being blocked. It seems something is wrong with their SSL configuration or something. I worked around this issue, at least temporarily, by passing This obviously isn't a real fix, but I was at least able to get my air purifier's password so that I could control it with HomeAssistant. |
The problem is inside libdyson, previously Dyson used its own CA to make ssl certificates, now they have switched to CloudFlare and the lib needs to be updated. An update to fix this error is in the works |
Thanks for the quick reply, as you said it isn't a real fix, but it does the trick when everything you need is to extract the credentials :-) It worked for me at the second attempt... and I have now configured the Dyson using the Dyson Local module in the HA configuration page. What I have noticed though, is that setting it to Auto doesn't change the fan speed, but only the Humidity settings... perhaps some more tweaking is necessary on my side? |
I pushed an update to both ha-dyson and libdyson to account for the certificate change on Dyson's part, can you all try it and tell me if it works ? This way I can go ahead and close this issue. Thank you very much ! |
Thanks for the push, I have tried the new version a couple of times, and I keep on getting this error, which is interestingly happening before I am prompted for a password:
When I tried without SSL validation, I also got this error one time, and the second time after the warning for the SSL lack of validation it actually prompted for a password... and it worked. Now I have tried several times, but I never reach the point at which a password prompt appears... is it a synchronization issue? |
I pushed a critical fix to the libdyson repo and yup, it is a synch issue. You need to actually disconnect your phone from the Dyson Link app, then right after that, use the script, and then you should be good to go (or at least that worked on my machine with a TP04) |
The fix definitely removed the SSL problem, perhaps an explanation about having to disconnect the phone app would be helpful. For me it worked after some attempt even without removing the link from my phone... so there is something weird in the way the remote connection is handled, this is why I preferred to chose the local connection with the data at hand. |
What seems to be happening is that for some reason, the Dyson app will mark the account as inactive after a successful link to Dyson Cloud. The app probably sends another requests to "wake" the account up. Anyway I'm gonna close this issue and add something about it in the readme for the time being. Thanks all for your help ! :) |
Hi All, |
I've got the same problem - either an unexpected error or simply 'aborted' right after I entered my email. This is a new integration for me, so I didn't have it working before. I've tried logging out from the app but that didn't help. I also cannot use the wifi method for local connect since there's no wifi sticker to be found anywhere: the device uses bluetooth for the initial setup instead of it's own wifi hotspot it seems. |
same problem here, after entering the mail adress |
After numerous attempts to get the cloud version working without succes, I finally did manage to get the local version running by using the manual method. I ran the python script from within Visual Studio Code on Windows 10. Maybe required certificates are present there that are missing in Home Assistant OS? |
can i news for the problem? |
having the same issue |
Maybe this post helps you: #178 |
When I try to install dyson_cloud, I always get "Failed to connect". When I try manually with libdyson, I get:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 343, in ssl_wrap_socket
context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data)
ssl.SSLError: [X509] PEM lib (_ssl.c:4062)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 976, in validate_conn
conn.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 370, in connect
ssl_context=context,
File "/usr/local/lib/python3.7/site-packages/urllib3/util/ssl.py", line 345, in ssl_wrap_socket
raise SSLError(e)
urllib3.exceptions.SSLError: [X509] PEM lib (_ssl.c:4062)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 725, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='appapi.cp.dyson.com', port=443): Max retries exceeded with url: /v3/userregistration/email/userstatus?country=GB (Caused by SSLError(SSLError(9, '[X509] PEM lib (_ssl.c:4062)')))
The text was updated successfully, but these errors were encountered: