question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update:

@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 run python3 get_devices.py to get credentials. You may also need to install some dependencies using pip3 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

  1. Create a new file called whatever.py
  2. 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(" ");
  1. Open your DysonLink app and stare at the welcome screen 😃
  2. python3 whatever.py
  3. 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)

  1. Download the Packet Capture app from Google Playstore (https://play.google.com/store/apps/details?id=app.greyshirts.sslcapture&hl=en&gl=US)
  2. Open Dyson Link and leave it running in the background
  3. Run the Packet Capture app, allow it to create a VPN if you’re prompted
  4. Hit the play button with the 1 and choose the Dyson Link app
  5. Switch to the Dyson Link app, it will probably do a quick refresh of the welcome page
  6. Switch back to Packet Capture and stop capturing
  7. Look through the captured packets for something like this: Screenshot_20210305-024635

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:39 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
shenxncommented, Mar 5, 2021

I’ll work on the new 2FA over the weekend. Hopefully that will fix the problem.

2reactions
shenxncommented, Mar 6, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the PowerShell Get-Credential Cmdlet and all things ...
Typically, to create a PSCredential object, you'd use the Get-Credential cmdlet. The Get-Credential cmdlet is the most common way that ...
Read more >
Get-Credential - PowerShell Command - PDQ
The Get-Credential cmdlet prompts the user for a password or a user name and password. By default, an authentication dialog box appears to...
Read more >
Get-Credential - PowerShell - SS64.com
Get a security credential object based on a user name and password. ... When you enter the command, you will be prompted for...
Read more >
CredentialsContainer.get() - Web APIs | MDN
The get() method of the CredentialsContainer interface returns a Promise to a single Credential instance that matches the provided ...
Read more >
gcloud container clusters get-credentials
Accelerate your digital transformation; Whether your business is early in its journey or well on its way to digital transformation, Google Cloud can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found