Comments (40)
I'll work on the new 2FA over the weekend. Hopefully that will fix the problem.
from ha-dyson.
I've added 2FA support to libdyson
(https://github.com/shenxn/libdyson). Download or clone the repo, then run python3 get_devices.py
to get credentials. You may also need to install some dependencies using pip3 install -r requirements.txt
.
from ha-dyson.
@ripburger you need to run that python code snippet (quoted above) after installing the libpurecool library from bfayers (linked above).
https://adamj.eu/tech/2019/03/11/pip-install-from-a-git-repository/
python -m pip install https://github.com/bfayers/libpurecool/archive/fix_auth.zip
from ha-dyson.
I also managed to get the credentials by using my android phone.
https://play.google.com/store/apps/details?id=app.greyshirts.sslcapture&hl=en&gl=US
I used this to monitor the Dyson app for a couple of seconds (by pressing the triangle icon with the 1
, and selecting Dyson Link), and lo and behold, the credentials.
The serial and credentials are separated by an X
, at least in my case
from ha-dyson.
cheers.
I am on iOS so was looking for it's equivalent, but Apple won't let you do it (security).
Probably, You may wish to make friends with Android people LOL
from ha-dyson.
Thx! But I am still stuck on getting the credentials. I am running Home Assistant on a PI4, and have no idea how to get them. Any suggestions? :)
from ha-dyson.
@proatwork I keep getting Unable to login to Dyson account
. I can use the email and password I supplied to sign in on the website. I can also curl https://appapi.cp.dyson.com/v1/userregistration/userstatus
and see that my account is active with the US
country.
Any tips?
from ha-dyson.
Hey @soffes
Are you using the libpurecool fork above?
The credentials should be the ones you use for the Dyson mobile app
If I have some free time tomorrow I will write a step by step of how I managed to make it work
from ha-dyson.
@proatwork I tried this:
$ python3 -m pip install https://github.com/bfayers/libpurecool/archive/fix_auth.zip
$ python3 dyson.py
dyson.py
is your script from above. From reading the integration documentation it says US
is a known working language
. From reading the libpurecool code it actually passes the "language" as a country
in the URL so I think US
is correct.
I verified that the credentials I used work in the iOS app and can control my fan.
Any help would be awesome. Super appreciate your time on this! :)
from ha-dyson.
pi@raspberrypi:[~]$ python3.7 -m pip install https://github.com/bfayers/libpurecool/archive/fix_auth.zip
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/bfayers/libpurecool/archive/fix_auth.zip
Using cached https://github.com/bfayers/libpurecool/archive/fix_auth.zip
Requirement already satisfied: netifaces in /home/pi/.local/lib/python3.7/site-packages (from libpurecool==0.6.4) (0.10.9)
Requirement already satisfied: paho_mqtt in /home/pi/.local/lib/python3.7/site-packages (from libpurecool==0.6.4) (1.5.1)
Requirement already satisfied: pycryptodome in /home/pi/.local/lib/python3.7/site-packages (from libpurecool==0.6.4) (3.10.1)
Requirement already satisfied: requests<3,>=2 in /usr/lib/python3/dist-packages (from libpurecool==0.6.4) (2.21.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from libpurecool==0.6.4) (1.12.0)
Building wheels for collected packages: libpurecool
Running setup.py bdist_wheel for libpurecool ... done
Stored in directory: /tmp/pip-ephem-wheel-cache-gm2k7gt0/wheels/7f/8a/a5/8fa837fd233e6ab9b9c1fa2d26046d8db278c5279547827ba9
Successfully built libpurecool
Installing collected packages: libpurecool
Successfully installed libpurecool-0.6.4
pi@raspberrypi:[~]$ python3.7 ~/test.py
yZZpyItgEttmmWqzUxY5HzC+y66j4K51u/O****Kpt5n6DrbrDDBtilqbImu7BcUJNPyBBy6ZIxqd+TTZsI3w==
from ha-dyson.
pi@raspberrypi:[~]$ python3.7 -m pip install https://github.com/bfayers/libpurecool/archive/fix_auth.zip Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting https://github.com/bfayers/libpurecool/archive/fix_auth.zip Using cached https://github.com/bfayers/libpurecool/archive/fix_auth.zip Requirement already satisfied: netifaces in /home/pi/.local/lib/python3.7/site-packages (from libpurecool==0.6.4) (0.10.9) Requirement already satisfied: paho_mqtt in /home/pi/.local/lib/python3.7/site-packages (from libpurecool==0.6.4) (1.5.1) Requirement already satisfied: pycryptodome in /home/pi/.local/lib/python3.7/site-packages (from libpurecool==0.6.4) (3.10.1) Requirement already satisfied: requests<3,>=2 in /usr/lib/python3/dist-packages (from libpurecool==0.6.4) (2.21.0) Requirement already satisfied: six in /usr/lib/python3/dist-packages (from libpurecool==0.6.4) (1.12.0) Building wheels for collected packages: libpurecool Running setup.py bdist_wheel for libpurecool ... done Stored in directory: /tmp/pip-ephem-wheel-cache-gm2k7gt0/wheels/7f/8a/a5/8fa837fd233e6ab9b9c1fa2d26046d8db278c5279547827ba9 Successfully built libpurecool Installing collected packages: libpurecool Successfully installed libpurecool-0.6.4 pi@raspberrypi:[~]$ python3.7 ~/test.py yZZpyItgEttmmWqzUxY5HzC+y66j4K51u/O****Kpt5n6DrbrDDBtilqbImu7BcUJNPyBBy6ZIxqd+TTZsI3w==
Hello, I have the same problem,
I reproduced what you described ☝️ and I get "Unable to login to Dyson account".
I still can logout and login to the mobile app with those credentials. I also tried with a new account without success.
Are there any other step to take into account ?
Thank you.
from ha-dyson.
@krazar
I created my account through https://www.dyson.com/your-dyson, if that makes any difference 🤷
you might want to make sure that you have the bfayers
fork lib installed and not etheralm
or CharlesBlonde
from ha-dyson.
That's really strange.
I can connect with my account on the dyson website (from my region)
And, to be sure, I uninstalled libpurecool and reinstall the version from bfayers from the snippet above.
Nothing changes.
from ha-dyson.
Same here @krazar. The bfayers
fork was working for me until the most recent HA update :/
from ha-dyson.
Not able to get credentials here, either - I finally managed to get get_devices.py
to run :-)
I have tried the mobile login/logout process already.
bash-5.0# python get_devices.py
Please choose your account region
1: Mainland China
2: Rest of the World
Region [1/2]: 2
Region code: US
Email: [email protected]
Password:
Traceback (most recent call last):
File "/config/custom_components/libdyson-main/libdyson/cloud/account.py", line 127, in login_email_password
response = self.request(
File "/config/custom_components/libdyson-main/libdyson/cloud/account.py", line 109, in request
raise DysonInvalidAuth
libdyson.exceptions.DysonInvalidAuth
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "get_devices.py", line 23, in <module>
account.login_email_password(email, password, region)
File "/config/custom_components/libdyson-main/libdyson/cloud/account.py", line 138, in login_email_password
raise DysonLoginFailure
libdyson.exceptions.DysonLoginFailure
from ha-dyson.
ok, i'm new to this don't shoot me, but when i enter into the bash session inside my home assistant docker session, i've tried to execute the bfayers python code, except i get the following:
bash-5.0# python3 dyson.py
Traceback (most recent call last):
File "dyson.py", line 12, in <module>
from .dyson_pure_cool import DysonPureCool
ImportError: attempted relative import with no known parent package
is the path for the package correct:
/usr/local/lib/python3.8/site-packages/libpurecool
I think I am missing something here to get the credential info, any help is appreciated!
from ha-dyson.
@kintaroju I managed to get get_devices.py
from https://github.com/shenxn/libdyson/ to run.
Still having a problem logging in, but that's a different problem.
from ha-dyson.
@eiddor i am guessing it's related to the new 2FA issue? lol
from ha-dyson.
@eiddor i am guessing it's related to the new 2FA issue? lol
Yeah, that's what I suspect.
from ha-dyson.
@eiddor totally hear you. I think if the developer can somehow trigger the 2FA email and integrate the 2FA value I think we can be in the clear.
from ha-dyson.
@eiddor totally hear you. I think if the developer can somehow trigger the 2FA email and integrate the 2FA value I think we can be in the clear.
That may work ok for Dyson Local and grabbing the credentials once, but I don't know how well it would scale for the native HA Dyson implementation or @shenxn's Dyson Cloud.
I'm not a dev, so maybe I'm missing something - I think it's more a matter of Dyson catching their API up with their mobile app.
from ha-dyson.
@eiddor , you are right, but let's see what developer can do.
if the developer can figure this out, big thank you in advance!
from ha-dyson.
I manually copied the github folder and when I go into the libepurcool folder and run dyson.py I get this.
C:\Python\libpurecool\libpurecool>python dyson.py
Traceback (most recent call last):
File "dyson.py", line 12, in
from .dyson_pure_cool import DysonPureCool
ImportError: attempted relative import with no known parent package
from ha-dyson.
@monsieurlatte you're not supposed to run that :)
create a new .py file and paste the snippet from the first comment then run that
from ha-dyson.
Thanks, that helps a ton, figured it out, now I just get the same as everyone else with the whole unable to log into dyson account.
from ha-dyson.
I also managed to get the credentials by using my android phone.
https://play.google.com/store/apps/details?id=app.greyshirts.sslcapture&hl=en&gl=USI used this to monitor the Dyson app for a couple of seconds (by pressing the triangle icon with the
1
, and selecting Dyson Link), and lo and behold, the credentials.
The serial and credentials are separated by anX
, at least in my case
that's awesome, dont see anything for iOS in my first look through the app store.
from ha-dyson.
Haven't tested, but maybe you can make it work with Bluestacks
from ha-dyson.
@monsieurlatte this might help if you've used Wireshark before https://stackoverflow.com/a/8512455
from ha-dyson.
@monsieurlatte this might help if you've used Wireshark before https://stackoverflow.com/a/8512455
Thanks, I'll look into that!
from ha-dyson.
So here's something, I updated the App on my phone, opened the dyson link app on the phone made sure it connected and all that. Then I just added in the HACS Dyson Cloud integration and now it works? Seems like you need the new Dyson app to trigger something to allow it to work.
from ha-dyson.
Confirmed! Just opening the app and then rerunning the script with no changes fixed it for me! Thanks so much ❤️
from ha-dyson.
Now, I can get the credentials.
Thank you !
from ha-dyson.
Just tried your libdyson and it works like hot cakes. Do you plan to integrate it with your Dyson local implementation @shenxn to simplify the process?
from ha-dyson.
@kintaroju Use ha-dyson-cloud
(https://github.com/shenxn/ha-dyson-cloud). Set up Dyson Cloud with your account first, then all your devices will be shown as discovered entities.
from ha-dyson.
hey, nice managed to get my dysons fans connected using the packet readrer on my Android phone. Question, for some, I have:
Dyson Purifier Hot+Cool Formaldehyde HP09
Dyson Pure Hot+Cool™ HP04
- What is the difference between "Dyson Pure Hot+Cool (new)" and "Dyson Pure Hot+Cool"?
- Also, I manged to add the HP09 as a "Dyson Pure Hot+Cool (new)" seems to work...but definitly not seeing the formaldehyde numbers nor the catalyst life for the formaldehyde..I guess a future update?
from ha-dyson.
managed to get my dysons fans connected using the packet readrer on my Android phone
How did you do this? I have been unable to get credentials using libdyson after months of trying.
I have credentials for Homebridge, but there doesn't seem to be a way to convert them to work in Homeassistant.
from ha-dyson.
managed to get my dysons fans connected using the packet readrer on my Android phone
How did you do this? I have been unable to get credentials using libdyson after months of trying.
I have credentials for Homebridge, but there doesn't seem to be a way to convert them to work in Homeassistant.
Scroll up to the instructions from monsierlatte, and that's what I followed. Once I got the username and credentials, sometimes I had to try a couple of times before it actually submitted successfully probably due to Wi-Fi connection to the fan.
from ha-dyson.
cheers.
I am on iOS so was looking for it's equivalent, but Apple won't let you do it (security).
from ha-dyson.
You may wish to make friends with Android people
Ha, yes! 👍
from ha-dyson.
Maybe this post helps you: #178
from ha-dyson.
Related Issues (20)
- Dyson Purifier Humidify Cool Formaldehyde (358K) not supported HOT 10
- Dyson Cloud never worked, using Dyson Local only now HOT 7
- Type 438K Fails to Connect HOT 3
- Stopped working? HOT 20
- Core 2022.2.0: Sensor has device class temperature, state class measurement and unit °C with non-numeric value: off
- Support Request - Add Device - Dyson HP07 Purifier Hot and Cool - Device Type 527k HOT 12
- No Formaldehyde Value HOT 2
- New device type Dyson purifier cool formaldehyde HOT 4
- New actively maintained integration! Collaborators welcome! Details inside. HOT 8
- Wifi-less "Dyson Pure Humidity+Cool" is not supported
- state class measurement and unit °C thus indicating it has a numeric value; however, it has the non-numeric value: off HOT 4
- Failed to find the device using discovery
- Not working on Home Assistant v2023.6 HOT 1
- ha-dyson failing with "cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson'" HOT 3
- Oscillation/angle setting
- Deactivate preset mode, or preset mode none
- Planned deprecation of direction, oscillate, preset_mode and set_speed HOT 1
- Local integration stopped working in HA 2024.1 HOT 4
- Depreciation warning in logs HOT 1
- ValueError: invalid literal for int() with base 10: 'off'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-dyson.