https://github.com/273do/switchbotapi-with-python
https://github.com/273do/switchbotapi-with-python
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/273do/switchbotapi-with-python
- Owner: 273Do
- Created: 2024-09-05T03:17:31.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-10-06T09:57:45.000Z (9 months ago)
- Last Synced: 2025-03-24T08:58:20.798Z (4 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 使い方
1. リポジトリをクローンしてください.
2. Docker Desktop のインストールをする.
3. プロジェクトのルート直下で`docker compose build`でビルドを行う.
4. 同様に`docker compose up -d`で起動.
5. 同様に`docker exec -it sb-api-python3 /bin/bash `でコンテナの中に入る.
6. `cd app`で app ディレクトリに移動.
7. app ディレクトリの中に`.env`ファイルを作成.
8. `.env`ファイルに以下を記述する.=の後に必要な記述をする.```
SB_TOKEN=
SECRET_TOKEN=# :を削除してください
DEVICE_ID=
```9. `python3 ファイル名`でプログラムを実行.
10. 終了時は`exit`でコンテナから抜け,`docker compose down`でコンテナを終了させる.