-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Unknown error just after typing email address in. #59
Comments
Seems Dyson changes it's login process again. I'll try to fix it later. I would recommend set up Dyson local using device WiFi SSID if your device support that. |
Same issue on my end. My TP04 did not come with WiFi SSID "support" but getting the identity using libdyson does work as a workaround for people with some experience. |
Removed comment, my login failed because I forgot I was connected to a corporate VPN, so login probably failed because I was in a different region. |
@pbrunier can you detail what you mean by this? Running If you could supply a bit more detail on what you did, happy to do own legwork. |
I was trying to set up my TP04 and faced the same error as OP described. but then I opened my Dyson app from mobile after that I could go through and asked for the password and code (sent by email) and then a successful login :). Perhaps you can try this way. procedure:
|
🙏 @arifroni that worked a treat, now connected, many thanks. Hope you don't mind me fleshing out the steps, I locked my account getting it wrong order first few times:
|
This method worked for me too but when i then try and add my local device, i get Failed to connect. Any tricks to get past this? I have a TP07 device. |
I am having the same issue with failing to connect. |
What device do you have? |
TP04 |
I am also unable to add Dyson Cloud integration. It asks for the e-mail address and comes back with 'Failed to connect'. I tried the trick of waiting on the e-mail screen and opening the Dyson Link app ... but that didn't improve things for me. The e-mail address is correct as I've logged into the Link app with it. I thought this might be to do with the new version of HA (core-2021.8.3) which I upgraded to and then lost access to my Dyson TP04. |
same issue after upgrading to HA 2021.8.x. I have downgraded to HA 2021.7 to get Dyson working again. |
Hey @appler1d3r thanks for letting me know it wasn't just me. I've downgraded (and restored to a snapshot) to get the Dyson working again. Is there information that we can extract in the working state that can be used after the upgrade? Or do I need to learn how to use the libdyson method. If it looks like the only way is via libdyson, can someone give me some basic advice:
Thanks |
@fhopley My first thought was exactly what you asked - why core update should break this? I tried turning on the logging for dyson local. But that didnt show anything other than unable to connect. My suspicion is that the core update has bumped some of the underlying python libs that breaking the link to Dyson equipment and re-connection is not successful through integration itself. When you restore the snapshot, it doesnt have to reconnect as the link to the local device is intact. I didnt spend much time on debugging. I also had a Dyson plugin that I integrated in Homebridge as a workaround if I'd to upgrade to 2021.8.x at any point. Assuming you have a dyson account and the devices are added under that, try following.
This is what I got as the output (I have scrubbed some of the data with XXXX) Serial: J7Z-AU-PCA0XXXX I only have one device. Now next step is to add the device using Dyson Local integration in HA using the above information. Please note I was not successful at first attempt. I had to restart HA couple of times get it working. Twice it said failed to connect. I provided the IP of my dyson device as well rather than forcing discovery. Also, closed and opened Dyson Link app on my phone and made sure it is connected to the device. |
Thx for the step-by-step guide. After installing, when I run get_devices.py (step 3), I get the following error message: File "get_devices.py", line 15 Any clue what I'm doing wrong here? |
Not sure. Have you verified that you have entered the mobile number in correct format with out the country code? So either the number format you entered is wrong or there are some dep libraries missing from step 1 or step 2 |
Thanks for the Detailed Instructions. I have been following them to try and add my device TP07. I still get a failed to connect error, but i also noticed that Home assistant seems to crash for a moment and i see this in the log:
|
sorry @fhopley dont think I can help here much. Looks like the device is timing out. For me, it took couple of attempts and restart of HA. Also, I kept the app open and running on the phone to make sure that the Dyson device is active and able to connect. It is a silly thing - but can you try restarting you router? Worth a shot. |
@appler1d3r - thanks for your reply. Unfortunately, I'm not getting to any verification. Immediately, after entering the "python3 get_devices.py" line, I get the SytnaxError. |
@MarcusKapun I suspect that you might be missing some files or python libraries on your system or it could be that .py file somehow got modified. May be you can re clone or download the whole repo again to different machine or location. Also make sure that pip3 install -r requirements.txt does run successfully. Is this a Mac or Windows or some other Linux machine? This is the python I'm having on my Mac and the .py scripts are getting validated without any issues.
For some reason the runtime compilation is failing. I did try different changes to my get_deviced.py file to replicate the issue, but couldnt replicate the exact Invalid Syntax error. |
thanks @appler1d3r for the detailed instructions. I tried to follow but have hit a snag. The code is downloaded, the requirements installed (although I had to add a '-- user' to the pip3 command to get that to work), but now I'm stuck at running 'get_devices.py'. When trying to run get_devices.py - I can successfully enter that I'm in the 'rest of the world', provide my region 'AU', and my e-mail address. However it then dies with what looks like an SSL error. I've pasted what appears to be the key line of log below: File "/Users/fhopley/Library/Python/3.7/lib/python/site-packages/urllib3/util/ssl_.py", line 402, in ssl_wrap_socket File "/Users/fhopley/Library/Python/3.7/lib/python/site-packages/urllib3/util/ssl_.py", line 404, in ssl_wrap_socket Any advice much appreciated - I'm getting a bit worried as I might be stuck on an old version of HA indefinitely! Or maybe at least until @shenxn gets the new login api sorted. |
hi @wranglatang thanks! The link you gave was for Dyson Local, rather than dev for libdyson - but I found it thanks to your advice and it worked to get the credentials. Looks like I might be ok to try the upgrade again! |
Thanks to @appler1d3r details instructions I was able to add my TP-07 Fan to HA 2021.8.6 on Linux using the Dyson Local repository. (The Dyson Cloud would not connect). My observations...
|
hey guys, having this same issue. Dyson integration stopped working (previously setup via Dyson Cloud. I removed the integration and re-added it. Immediately after entering the email address I have associated with my Dyson Account it said "Failed to Connect". I followed the above instructions from @appler1d3r. Downloaded libdyson-dev, ran 'pip3 install -r requirements.txt' all good, then ran python3 get_devices.py and now I get the below.
*not sure why it's not formatting correctly |
You can try few things. Requirements.txt should have already installed zeroconf. |
Thank you @appler1d3r. I ran those and it updated zeroconf then after running "python3 get_devices.py" it then said "No module named phao". I ran those commands to force phao_mqtt and it also updated. Next I ran "python3 get_devices.py" again and now I get;
|
I am not a Python expert, but it looks like you are missing the Python requests Module in your current Python installation. Try this. Hope this could fix that error up. |
Thank you guys very much for your help! It took a bit to fix up those module's but after a couple hours I was able to get output from get_devices.py and setup locally! |
I'm also trying to find the credentials for my Pure Hot + Cool Fan I get this: Any ideas what's happening? |
is that the end of the output? if so, it took me running "get_devices.py" like 4-5 times before it spit it all out. Everytime I did it, it got a little bit further. Just my experience. |
Just tried a few more times and got it to work! |
Same for me. |
Doh! Turns out I picked the wrong model. I had picked 527E rather than 527. All working now! |
Hey, so I also can't login both in Dyson Cloud in HA and in the Python script, I come as far as putting in my Email and then I get an error code. Is there any fix for it? (I tired logging out and an back, in the app while doing the process) |
Getting the same error every time I get up to the email part of the script:
Tried it multiple times (Option 2 - RoW, Region Code: AU) without any success. Once I type in my email, I get the above error. Edit: Aftter turning My TP04 off and on again, running the script seems to let me progress past the Email stage. |
I got But after I logout and login again in the Dyson app, I re-run script I try again after few minutes. It works. There might be some magics in the app. |
Thanks it works fine. Anyhow would be nice to get the yaml configuration possibility as well. Also be sure to use python3 otherwise you will get the following error:
|
See #66 |
[In Australia] I used US as my country and this work without issue. After submitting it takes a couple of seconds to return with a screen requesting password and validation code. The validation code will turn up in your email. Put in both values and the system works without issue (so far). A couple of extra prompts on the screen would be helpful, such as "verification code emailed from Dyson for login"... or similar. This step left me scratching my head for a couple of seconds and the email ended up in the spam folder. Aside from that the process was pretty simple. I have a Purifier Hot and Cold and Purifier Cool, both cloud connected. |
I'm new to HA and trying to get it to use your plugin for my dyson devices.
I ahve added both repo's to the HACS, and trying to install teh dyson-cloud integration.
Get through teh Country - GB, and then it asks for my email - type in my email, and click submit, and all i get then is an error:-
Unknown error occurred
stack trace from error in log is as follows;-
This error originated from a custom integration.
Logger: aiohttp.server
Source: custom_components/dyson_cloud/config_flow.py:71
Integration: dyson_cloud (documentation, issues)
First occurred: 15:39:07 (1 occurrences)
Last logged: 15:39:07
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, 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 76, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, 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 144, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 155, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 63, 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 202, 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 260, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/dyson_cloud/config_flow.py", line 71, in async_step_email
self._verify = await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/libdyson/cloud/account.py", line 127, in login_email_otp
response = self.request(
File "/usr/local/lib/python3.8/site-packages/libdyson/cloud/account.py", line 119, in request
raise DysonInvalidAuth
libdyson.exceptions.DysonInvalidAuth
The text was updated successfully, but these errors were encountered: