• Stars
    star
    2,972
  • Rank 15,227 (Top 0.3 %)
  • Language
    Python
  • License
    MIT License
  • Created about 4 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This tool/script retrieves tokens for all devices connected to Xiaomi cloud and encryption keys for BLE devices.

GitHub Latest Release GitHub All Releases Ko-Fi buycoffee.to PayPal.Me Revolut.Me

Xiaomi Cloud Tokens Extractor

This tool/script retrieves tokens for all devices connected to Xiaomi cloud and encryption keys for BLE devices.

You will need to provide Xiaomi Home credentials (not ones from Roborock app):

  • username (e-mail or Xiaomi Cloud account ID)
  • password
  • Xiaomi's server region (cn - China, de - Germany etc.). Leave empty to check all available

In return all of your devices connected to account will be listed, together with their name and IP address.

Windows

Download and run token_extractor.exe.

Linux & Home Assistant (in SSH & Web Terminal)

Execute following command:

bash <(curl -L https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/raw/master/run.sh)

If installation fails try Docker version

Docker & Home Assistant (in SSH & Web Terminal)

Execute following command:

bash <(curl -L https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/raw/master/run_docker.sh)

To run this command in HA you have to disable protected mode in addon's settings and restart it

Manual run in python

Download and unpack archive:

wget https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/releases/latest/download/token_extractor.zip
unzip token_extractor.zip
cd token_extractor

Install dependencies and run script:

pip3 install -r requirements.txt
python3 token_extractor.py

Troubleshooting

If you have problems with using this tool try following solutions:

  • Make yourself sure that you provide correct credentials (e.g. not ones from Roborock app!)
  • Remove Cloudflare DNS
  • Disable network ad blockers (AdGuard, PiHole, etc.) and restrictions (UniFi Country Restriction etc.)
  • Open 2FA link on the same device that runs Tokens Extractor

Home Assistant additional tools

Support

If you want to support my work with a donation you can use one of the following platforms:

Platform Payment methods Link Comment
Ko-fi
  • PayPal
  • Credit card
  • Buy Me a Coffee at ko-fi.com
  • No fees
  • Single or monthly payment
  • buycoffee.to
  • BLIK
  • Bank transfer
  • Postaw mi kawÄ™ na buycoffee.to
    PayPal
  • PayPal
  • PayPal Logo
  • No fees
  • Revolut
  • Revolut
  • Credit Card
  • Revolut
  • No fees
  • More Repositories

    1

    lovelace-xiaomi-vacuum-map-card

    This card provides a user-friendly way to fully control map-based vacuums in Home Assistant. Supported brands include Xiaomi (Roborock/Viomi/Dreame/Roidmi/Valetudo/Valetudo RE), Neato, Wyze, Roomba, Ecovacs (and probably more).
    TypeScript
    1,304
    star
    2

    Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor

    This custom integration provides a way to present a live view of a map for Xiaomi (Roborock/Viomi/Roidmi/Dreame) vacuums without a need for rooting.
    Python
    1,077
    star
    3

    Home-Assistant-Taskbar-Menu

    This application is a simple Home Assistant client for Windows. It can display Lovelace views, control entities and show persistent notifications.
    C#
    320
    star
    4

    Home-Assistant-custom-components-Tauron-AMIplus

    This sensor uses unofficial API to get energy usage and generation data from https://elicznik.tauron-dystrybucja.pl.
    Python
    120
    star
    5

    Home-Assistant-custom-components-Google-Keep

    This sensor uses gkeepapi library to download a list of notes from https://keep.google.com/.
    Python
    65
    star
    6

    Home-Assistant-Lovelace-HTML-Jinja2-Template-card

    This card displays provided Jinja2 template as an HTML content of a card. It uses exactly the same engine as Home Assistant in Developer tools.
    62
    star
    7

    Home-Assistant-Lovelace-Local-Conditional-card

    This card can show and hide a specific card on current device while not affecting other windows. It does not require any integration to run.
    TypeScript
    61
    star
    8

    Home-Assistant-custom-components-Saver

    This custom component allows you to save current state of any entity and use its data later to restore it.
    Python
    59
    star
    9

    lovelace-google-keep-card

    This is a companion card for Google Keep sensor. It displays notes downloaded by integration in a friendly way, similar to Google Keep app.
    52
    star
    10

    lovelace-html-card

    This card displays provided data as an HTML content of a card.
    46
    star
    11

    Home-Assistant-custom-components-Xiaomi-Vacuum-Map-Camera

    Python
    35
    star
    12

    Home-Assistant-custom-components-Burze.dzis.net

    This integration uses official API to get weather warnings for Poland and storm warnings for Europe from https://burze.dzis.net.
    Python
    33
    star
    13

    Home-Assistant-custom-components-Custom-Templates

    This integration adds possibility to use new functions in Home Assistant Jinja2 templating engine.
    Python
    31
    star
    14

    PiotrMachowski

    This repository is used to present a library of my custom elements for Home Assistant.
    27
    star
    15

    Home-Assistant-custom-components-iMPK

    This sensor uses unofficial API retrieved by decompilation of iMPK application to provide a list of MPK Wrocław news available in original app.
    Python
    15
    star
    16

    Home-Assistant-Xiaomi-Vacuum-garage

    This repo contains my configuration responsible for automation of vacuums garage
    14
    star
    17

    Home-Assistant-custom-components-Hydro-IMGW

    This custom integration retrieves data from hydro stations from hydro.imgw.pl.
    Python
    13
    star
    18

    Home-Assistant-custom-components-Antistorm

    This sensor uses official API to get storm warnings from https://antistorm.eu.
    Python
    12
    star
    19

    Home-Assistant-custom-components-MPK-KR

    Python
    11
    star
    20

    Home-Assistant-custom-components-Rozkladzik

    This sensor uses unofficial API to get data from https://www.rozkladzik.pl and provide information about departures for chosen stop.
    Python
    10
    star
    21

    Home-Assistant-picture-elements-Xiaomi-Vacuum-black

    8
    star
    22

    Home-Assistant-Lovelace-Nixie-Clock-Card

    Home Assistant Lovelace Nixie Clock Card
    6
    star
    23

    Home-Assistant-custom-components-MPK-Lodz

    Python
    6
    star
    24

    Home-Assistant-custom-components-Froggy

    This custom integration retrieves opening status of Żabka shops.
    Python
    5
    star
    25

    Home-Assistant-custom-components-Looko2

    This sensor uses official API to get air quality data from https://looko2.com.
    Python
    5
    star
    26

    Home-Assistant-test-components-SmartThings

    Python
    3
    star
    27

    Home-Assistant-custom-components-Dom-5

    This custom integration retrieves data from Dom 5 - housing cooperative management system.
    Python
    3
    star
    28

    Python-package-vacuum-map-parser-base

    Python
    2
    star
    29

    Home-Assistant-custom-components-MPK-Rzeszow

    Python
    2
    star
    30

    Home-Assistant-custom-components-GNE-PV-Monitoring

    This sensor uses official API to get data from GNE
    Python
    2
    star
    31

    Home-Assistant-Lovelace-Nixie-Card

    This card displays a state of an entity using images of nixie tubes
    1
    star