Get credentials
See original GitHub issueUpdate:
@shenxn: https://github.com/shenxn/ha-dyson/issues/5#issuecomment-791887983
I’ve added 2FA support to
libdyson
(https://github.com/shenxn/libdyson). Download or clone the repo, then runpython3 get_devices.py
to get credentials. You may also need to install some dependencies usingpip3 install -r requirements.txt
.
Old
Not an actual issue, but wanted to make this available for other people
I’ve managed to get credentials in two ways:
1. Using libpurecool
Use this fork of libpurecool (fix_auth branch): https://github.com/bfayers/libpurecool/tree/fix_auth
python3 -m pip install https://github.com/bfayers/libpurecool/archive/fix_auth.zip
- Create a new file called
whatever.py
- Paste this in:
#!/usr/bin/python3
from libpurecool.dyson import DysonAccount
dyson_account = DysonAccount("email","password","lang")
logged = dyson_account.login()
if not logged:
print('Unable to login to Dyson account')
exit(1)
devices = dyson_account.devices()
for device in devices:
print(device.serial);
print(device.name);
print(device.credentials);
print(" ");
- Open your DysonLink app and stare at the welcome screen 😃
python3 whatever.py
- Cross your fingers 🤞 and hope it works.
⚠️ Don’t try to loging in too fast/spam the script or you’ll get IP blocked by Dyson I’ve also noticed that I’m getting immediately denied login if I’m going through a VPN
2. Using an Android phone
You can probably do this with an iOS device, but I haven’t tested (https://stackoverflow.com/a/8512455)
- Download the
Packet Capture
app from Google Playstore (https://play.google.com/store/apps/details?id=app.greyshirts.sslcapture&hl=en&gl=US) - Open Dyson Link and leave it running in the background
- Run the Packet Capture app, allow it to create a VPN if you’re prompted
- Hit the play button with the
1
and choose the Dyson Link app - Switch to the Dyson Link app, it will probably do a quick refresh of the welcome page
- Switch back to Packet Capture and stop capturing
- Look through the captured packets for something like this:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:39 (3 by maintainers)
Top GitHub Comments
I’ll work on the new 2FA over the weekend. Hopefully that will fix the problem.
I’ve added 2FA support to
libdyson
(https://github.com/shenxn/libdyson). Download or clone the repo, then runpython3 get_devices.py
to get credentials. You may also need to install some dependencies usingpip3 install -r requirements.txt
.