Skip to content

Commit

Permalink
Adjust to run a released version
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrMachowski committed Jun 14, 2021
1 parent 9b6b3f7 commit d9c4c6d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
35 changes: 13 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,34 @@ You will need to provide Xiaomi Home credentials (_not ones from Roborock app_):
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](https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/raw/master/token_extractor.exe).
Download and run [token_extractor.exe](https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/releases/latest/download/token_extractor.exe).

## Home Assistant - [SSH & Web Terminal](https://github.com/hassio-addons/addon-ssh)
## Linux & Home Assistant (in [SSH & Web Terminal](https://github.com/hassio-addons/addon-ssh))

Download and run script:
Execute following command:
```bash
wget https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/raw/master/token_extractor.py
python3 token_extractor.py
bash <(curl -L https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/raw/master/run.sh)
```

## Docker

Clone this repository:
```bash
git clone https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor.git
```

Go to cloned directory:
```bash
cd Xiaomi-cloud-tokens-extractor
```

Build and run script using docker:
Execute following command:
```bash
docker run --rm -it $(docker build -q .)
bash <(curl -L https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/raw/master/run_docker.sh)
```

## Other platforms
## Manual run in python

Install dependencies:
Download and unpack archive:
```bash
pip3 install requests
wget https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/releases/latest/download/token_extractor.zip
unzip token_extractor.zip
cd token_extractor
```

Download and run script:
Install dependencies and run script:
```bash
wget https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/raw/master/token_extractor.py
pip3 install -r requirements.txt
python3 token_extractor.py
```

Expand Down
9 changes: 9 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

wget https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/releases/latest/download/token_extractor.zip
unzip token_extractor.zip
cd token_extractor
pip3 install -r requirements.txt
python3 token_extractor.py
cd ..
rm -rf token_extractor
10 changes: 10 additions & 0 deletions run_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

wget https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/releases/latest/download/token_extractor_docker.zip
unzip token_extractor_docker.zip
cd token_extractor_docker
docker_image=$(docker build -q .)
docker run --rm -rf $docker_image
docker rmi $docker_image
cd ..
rm -rf token_extractor_docker

0 comments on commit d9c4c6d

Please sign in to comment.